Do not think it is going to work...

回答: 猜自己的帽子数字guest0072010-06-06 18:33:58

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.

所有跟帖: 

Your output is wrong -twfx- 给 twfx 发送悄悄话 (129 bytes) () 06/07/2010 postreply 18:52:34

Sorry, you are right. And here is the proof of the correctness. -innercool- 给 innercool 发送悄悄话 innercool 的博客首页 (463 bytes) () 06/07/2010 postreply 19:26:05

请您先登陆,再发跟帖!