当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

7177:Link with Equilateral Triangle

题目描述
Link has a big equilateral triangle with side length $n$. The big triangle consists of $n^2$ small equilateral triangles with side length $1$.

Link is going to fill numbers into each vertex of the small triangle with the following limits:

· The number filled in should be $0$, $1$, or $2$.
· The left side of the big triangle should not be filled with $0$. The right side of the big triangle should not be filled with $1$. The bottom side of the big triangle should not be filled with $2$.
· For each small triangle with side length $1$, the sum of three vertices should not be a multiple of $3$.



Link went crazy when he tried to do so because he couldn't find any triangle satisfying all conditions above. Now, he turns to you for help.

Please tell Link: Is it possible to fill the triangle so that it satisfies all conditions above?
输入解释
Each test contains multiple test cases. The first line contains the number of test cases $T$ ($1 \le T \le 1000$). Description of the test cases follows.

For each test case, there is only one line containing a single integer $n$ ($1 \leq n \leq 10^3$).
输出解释
For each test case, output ${\rm Yes}$ if it is possible to do so. Output ${\rm No}$ if it is impossible to do so.
输入样例
2
1
2
输出样例
No
No

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-7177

最后修改于 2022-09-15T06:17:11+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
16000/8000MS(Java/Others) 262144/262144K(Java/Others)