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

建议使用的浏览器:

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

6202:cube cube cube

题目描述
Rubick has a strange cube. Can you restore Rubik's cube in 3 steps (including 3)?
Rubik's cube is shown in the following picture:



The plane expansion of the Rubik's cube is shown in the following figure, each number represents the color corresponding to each cube.



The following picture explains how to rotate this strange cube. If you still feel confused, you can refer to
http://www.bilibili.com/video/av8452301/?from=search&seid=11750270100959783079 .


输入解释
The first line contains an integer $T$ ($T \leq 10$), the number of test cases.
Each test case consists of 72 integers which correspond to the colors of each location of the Rubik's Cube. Each number represents one color, it's guaranteed that there are exactly 8 colors and each color appears 9 times.
输出解释
For each test case, if you can restore the Rubik's cube in 3 steps, output "YES", else output "NO". (both without quote)
输入样例
1
1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2
3 3 3 3 3 3 3 3 3
4 4 4 4 4 4 4 4 4
5 5 5 5 5 5 5 5 5
6 6 6 6 6 6 6 6 6
7 7 7 7 7 7 7 7 7
8 8 8 8 8 8 8 8 8
输出样例
YES
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-6202

最后修改于 2020-10-25T23:29:16+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
6000/3000MS(Java/Others) 327680/327680K(Java/Others)