QOJ.ac

QOJ

時間限制: 4 s 記憶體限制: 256 MB 總分: 100

#4439. Link 与等边三角形

统计

Link 有一个边长为 $n$ 的大等边三角形。这个大三角形由 $n^2$ 个边长为 $1$ 的小等边三角形组成。

Link 打算在小三角形的每个顶点上填入数字,并满足以下限制: 填入的数字应为 $0, 1$ 或 $2$。 大三角形的左侧边上不能填入 $0$。大三角形的右侧边上不能填入 $1$。大三角形的底边上不能填入 $2$。 * 对于每个边长为 $1$ 的小三角形,其三个顶点上的数字之和不能是 $3$ 的倍数。

Link 在尝试填数时感到非常困惑,因为他找不到任何满足上述所有条件的三角形。现在,他向你寻求帮助。

请告诉 Link:是否有可能填好这个三角形,使其满足上述所有条件?

当 n=2 时的示例

输入格式

每个测试包含多个测试用例。第一行包含测试用例的数量 $T$ ($1 \le T \le 1000$)。 接下来是各测试用例的描述。 对于每个测试用例,只有一行,包含一个整数 $n$ ($1 \le n \le 10^3$)。

输出格式

对于每个测试用例,如果可以做到,输出 Yes,否则输出 No。

样例

样例输入 1

2
1
2

样例输出 1

No
No

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.