|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||4||3||3||75.000%|
You are playing against Chewbacca in a tough battle of Galactic Tic-Tac-Toe, which is just like simple Tic-Tac-Toe except that the playing board is 5 × 5 and the goal is to get 4 in a row. In response to a brilliant move, Chewbacca protests loudly and plays his next move, setting you up to win. However, before you can claim victory, Han Solo takes this opportunity to warn you that it’s not wise to upset a Wookiee. After all, they’re known to pull people’s arms out of their sockets when they lose. Wisely, you decide on a new strategy: Let the Wookiee win!
Input consists of a series of 5 × 5 playing boards, each separated by a blank line. Each square in a row is separated by a single space. You are ‘O’, Chewie is ‘X’, and empty squares are denoted by ‘*’. For each board, there is exactly one empty square that you can play that does not cause you to win and does not block any of Chewie's winning moves on his next turn. The final board is followed immediately by the word “Finished” on the next line.
For each board, print a line consisting of the number of the square that you should play to avoid having your arms pulled out of their sockets. The numbering should conform to the following table.
X O * X X O O X X * O O * X X O X O O X X O O X O X X X * O O * * O X O O X * X O * X X O * X O O O Finished