It might be hard to come up with a counterexample for n=16, but an easy example for n=3 is the following:
player's offset: 0 1 2
player's number: 1 0 2
player's output: 2 1 1
No player's output is equal to the number on his hat.
Do not think it is going to work...
所有跟帖:
•
Your output is wrong
-twfx-
♂
(129 bytes)
()
06/07/2010 postreply
18:52:34
•
Sorry, you are right. And here is the proof of the correctness.
-innercool-
♂
(463 bytes)
()
06/07/2010 postreply
19:26:05