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

建议使用的浏览器:

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

3533:Light Switching Game

题目描述

The Light Switching Game is played on a 1000 × 1000 × 1000 cube of cells with a light in each cell, as Figure.1 shows. Initially, most of the lights are off while exactly N lights are on. Two players take moves alternately. A move consists of switching the lights at the corners of a cuboid, i.e. (x1,y1,z1), (x1,y1,z2), (x1,y2,z1), (x1,y2,z2), (x2,y1,z1), (x2,y1,z2), (x2,y2,z1), (x2,y2,z2) where 1 ≤ x1 x2 ≤ 1000, 1 ≤y1 y2 ≤ 1000, 1 ≤z1 z2 ≤ 1000 and the light at the corner (x2,y2,z2) must be on (and turned off after the move). Notice the cuboid is possibly degenerated to a rectangle, a line or even a single cell so that the player may also switching four, two or one besides eight lights in a move. The player loses the game when he can not take a move.


Figure.1

You will find out whether the second player can win if both players play optimally.

输入解释
There are multiple test cases.
Every test case starts with one line containing a single number N indicating the number of lights which is initially on. (N ≤ 100)
Each of the next N lines contains the coordinates (x, y, z) (1 ≤ x, y, z ≤ 1000) showing that the light at this position is on initially.
输出解释
One line for each test case which contains "Yes" or "No" indicating whether the second player can win the game.
输入样例
4
5 11 30
5 19 19
23 15 6
2 26 16
3
9 20 9
8 1 28
30 22 26
输出样例
Yes
No

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3533

最后修改于 2020-10-29T07:03:54+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 131072