|
||||||||||
ChessmenTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1050 Accepted Submission(s): 115 Problem Description You know, Harry, Ron, and Hermione thought they had found some Snape's cabal. They tried to tail after Snape until they went into a strange room. The room was so dark they couldn't see anything at all. But as they stepped into it, light suddenly flooded the room to reveal an astonishing sight. They were standingon the edge of a huge chessboard, behind the black chessmen, which were all taller than they were and carved from what looked like black stone. Facing them, way across the room, were the white pieces. Harry, Ron and Hermione shivered slightly - the towering white chessmen had no faces. 'Now what do we do?' harry whispered. 'It's obvious, isn't it?' said Ron. 'We've got to play our way across the room.' Behind the white pieces they could see another door. 'How?' said Hermione nervously. 'I think,' said Ron, 'we're going to have to be chessmen.' He walked up to a black knight and put his hand out to touch the knight's horse. At once, the stone sprang to life. The horse pawed the ground and the knight turned his helmeted head to look down at Ron. 'Do we - er - have to join you to get across?' The black knight nodded. Ron turned to the other two. 'This wants thinking about ...' he said. 'I suppose we've got to take the place of the back pieces ...' Harry and Hermione stayed quiet, watching Ron think. Finally he said, 'Now, don't be offended or anything, but neither of you are that good at chess -' 'We're not offended,' said Harry quickly. 'Just tell us what to do.' 'Well, Harry, you take the place of that bishop, and Hermione, you go next to him instead of that castle.' 'What about you?' 'I'm going to be a knight,' said Ron. The chessmen seemed to have been listening, because at these words a knight, a bishop and a castle turned there backs on the white pieces and walked off the board leaving three empty squares which Harry, Ron and Hermione took. 'White always plays first in chess,' said Ron,peering across the board. 'Yes ... look ...' A white pawn had moved forward two squares. Now Ron decided to direct the black pieces, but he met a trouble. All the chessmen were so tall that he can't know the whole board. He must memorize the board all by himself if you don't help him. Could you write a magic for him? Input The input will contain several chess manuals. Each one is in the format as sample input. O-O and O-O-O will not appear. Notice that black side may haven't a move in the last turn. The input will always be correct,and end of -1. Output Print the chessboard in FEN. (see also the Hint) Sample Input
Sample Output
Hint Hint Source | ||||||||||
|