摘要: How many Fibs? Description Recall the definition of the Fibonacci numbers: f1 := 1 f2 := 2 fn := f n-1 + f n-2 (n>=3) Given two numbers a and b, calcu 阅读全文
posted @ 2016-07-21 10:43 MartinEden 阅读(266) 评论(0) 推荐(0) 编辑
摘要: Chess Problem Description Alice and Bob are playing a special chess game on an n × 20 chessboard. There are several chesses on the chessboard. They ca 阅读全文
posted @ 2016-07-21 09:44 MartinEden 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 题意和nim游戏差不多,就是取石子的时候最多只能拿原来的一半,比如一堆5个石子最多拿两个。 先用打表的方式看出前面一部分的sg值,然后找规律来做。 打表求sg值的程序才是最重要的。 阅读全文
posted @ 2016-07-21 09:41 MartinEden 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 白书的例题,做法是记好每个数的质因数的个数,然后就可以转化为简单的nim游戏。 阅读全文
posted @ 2016-07-21 09:33 MartinEden 阅读(133) 评论(0) 推荐(0) 编辑