博客搬家:最爱午后红茶
对应 poj 题目:点击打开链接
Triangle War
Time Limit: 1000MS | Memory Limit: 65536K | |
Total Submissions: 3066 | Accepted: 1207 |
Description
Triangle War is a two-player game played on the following triangular grid:
Two players, A and B, take turns filling in any dotted line connecting two dots, with A starting first. Once a line is filled, it cannot be filled again. If the line filled by a player completes one or more triangles, she owns the completed triangles and she is awarded another turn (i.e. the opponent skips a turn). The game ends after all dotted lines are filled in, and the player with the most triangles wins the game. The difference in the number of triangles owned by the two players is not important.
For example, if A fills in the line between 2 and 5 in the partial game on the left below:
Then, she o
Two players, A and B, take turns filling in any dotted line connecting two dots, with A starting first. Once a line is filled, it cannot be filled again. If the line filled by a player completes one or more triangles, she owns the completed triangles and she is awarded another turn (i.e. the opponent skips a turn). The game ends after all dotted lines are filled in, and the player with the most triangles wins the game. The difference in the number of triangles owned by the two players is not important.
For example, if A fills in the line between 2 and 5 in the partial game on the left below:
Then, she o