标签:
这个问题就是OJ题里出现的取石子游戏,http://en.wikipedia.org/wiki/Wythoff%27s_game。
维基里面的通项公式并不适用于算法求解。需要理解下面两条规律:
1、As is true in general for pairs of Beatty sequences, these two sequences are complementary: each positive integer appears exactly once in either sequence.
2、(m,n)中m-n是递增的,逐步加1
数对是递增的:(0,0) (1,2) (3,5) (4,7)(6,10)(8,13)
标签:
原文地址:http://www.cnblogs.com/hustxujinkang/p/4521402.html