当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。
Rubik's Cube is one of the most popular toys in the world. For convenience, let's mark the six faces by 1 to 6 and its expanded view is illustrated in Fig-1. Fig-2 shows the 18 possible moves. This problem considers a variation of Rubik's Cube. In our cube, the 54 stickers are marked by either 0 or 1, instead of six colors. Given the expanded view of a cube, your task is to take several moves that makes all the stickers marked by 1 located on the face marked by 1.
Fig-1
Fig-2
The expanded view of the cube.
Print “yes” or “no” in the first line to indicate “the task could be done” or “the task is impossible”. When “yes” is printed, the second line should be an integer T, the number of moves you take. The following T lines describe your moves by its number as in Fig-2. Any answer with T ≤ 10000 is available.
000 000 000 000100000000 000100000000 000100000000 011 011 011
yes 1 8
时间上限 | 内存上限 |
1000 | 65536 |