| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12253 | Quiz3 (Tic Tac Toe Tree) |
|
Description
Given:
- a series of nodes representing the steps in Tic Tac Toe
- a Tic-Tac-Toe grid (盤面)
Task:Find the path leading to the grid (盤面)
Input
The first integer is the number of nodes. Each node consists of:
- ID
- Parent ID (-1 represent null for root)
- X, Y
- Mark
Each node will have at most 2 children.
The last three lines are the tic-tac-toe grid. Each line has 3 marks (‘X’,’O’,’_’), separated by whitespaces, newline at the end.
The grid (盤面) in input definitely exists and is unique.
Output
IDs of the nodes in the path leading to the grid, separated by whitespaces, followed by a new line
eg. 0 1 3 8 11