QOJ.ac

QOJ

Time Limit: 2.0 s Memory Limit: 512 MB Total points: 100

#15723. Drawing Hell

Statistics

在解决了许多“互质天堂”(coprime heaven)谜题后,你感到有些疲倦。Nozomi 觉得“互质天堂”对她来说也太简单了,而且单人卡牌游戏又太无聊。因此,她想和你玩一个有趣的双人游戏,叫做“画图地狱”(Drawing Hell)。

游戏开始时,你和 Nozomi 在教科书的空白页上画出 $n$ 个幸运点。你和 Nozomi 轮流进行操作,Nozomi 先手。在每个回合中,玩家可以画一条线段连接两个幸运点,前提是该线段不能跨越(或穿过)任何已有的线段和/或幸运点。无法进行操作的玩家输掉游戏。注意,你可以多次连接同一个点,样例输入中的第一个游戏将在三回合内结束。

在上课期间,你和 Nozomi 将玩 $T$ 次这个游戏。众所周知,Nozomi 非常聪明,她会采取最优策略。你是否有机会赢得游戏?

输入格式

第一行包含一个整数 $T$,接下来是 $T$ 组游戏的数据。

每组游戏的第一行包含一个整数 $n$。接下来的 $n$ 行,每行包含两个整数 $x_i, y_i$,表示每个幸运点的坐标。

数据范围

  • $1 \le T \le 1000$
  • $1 \le n \le 1000$
  • $0 \le |x_i|, |y_i| \le 1000$
  • 所有幸运点互不相同。

输出格式

对于每组游戏,如果你在 Nozomi 采取最优策略的情况下仍有获胜的可能,请输出 “OwO”。否则,请输出 “T^T”。

样例

输入样例 1

3
3
0 0
0 4
4 0
4
0 0
0 4
4 0
1 1
4
0 0
0 4
4 0
2 2

输出样例 1

T^T
OwO
T^T

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.