-->
当前位置:首页 > 题库

PROGRAMMING:TicTacToe

Luz5年前 (2021-05-10)题库422
Tic tac toe is a kind of ball game played on a 3 * 3 grid. It is similar to Gobang. It is named because the board does not draw borders and the grid lines are arranged in tic tac toe. The game only needs paper and pen, and then two players representing O and X leave marks in the grid in turn (generally speaking, the first one is x). If any three marks form a straight line, it is the winner( From Baidu Encyclopedia)
Would you please judge if there are any three marks forming a straight line?
###Input format:
In the first line, enter an integer t (1 < = T < = 1000) to represent the T group input. Next, each group enters a tic tac toe game situation.
###Output format:
If there are any three markers in the backhand to form a straight line, output "yes", otherwise output "no".
###Input example:
Here is a set of inputs. For example:
```in
two
OOO
XXX
OOO
OOO
XXO
OXX
```
###Output example:
The corresponding output is given here. For example:
```out
yes
yes
```







answer:If there is no answer, please comment