Certainly, everyone is familiar with tic-tac-toe game. The rules
are very simple indeed. Two players take turns marking the cells in
a
You are given a
-
illegal
— if the given board layout can't appear during a valid game; -
the first
player won
— if in the given board layout the first player has just won; -
the
second player won
— if in the given board layout the second player has just won; -
draw
— if the given board layout has just let to a draw.
The input consists of three lines, each of the lines contains characters ".", "X" or "0" (a period, a capital letter X, or a digit zero).
Print one of the six verdicts:
X0X
.0.
.X.
second
#include
#include
#include
using namespace std;
int a[3][3];
bool check(int x)
{
}
int main()
{
}