摘要: 白书上的例题,用长度作为状态推算sg值。代码写的有点挫。 阅读全文
posted @ 2016-07-22 21:13 MartinEden 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(265) 评论(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) 编辑
摘要: 题目大意是有一种数,它的二进制形式的后几位刚好是它自己。 比如100的二进制形式是1100100,1100100的末尾三个数刚好是100,就符合条件,求第n个符合条件的数。 序列在oeis A181891。 做法的话先是发现这样的数的后缀一定在之前出现过,然后可以bfs一下。 更简单的做法是发现一个 阅读全文
posted @ 2016-07-19 10:41 MartinEden 阅读(410) 评论(0) 推荐(0) 编辑
摘要: Arrange Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 674 Accepted Submission(s): 236 Problem 阅读全文
posted @ 2016-07-18 20:42 MartinEden 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Divided Land Problem Description It’s time to fight the local despots and redistribute the land. There is a rectangular piece of land granted from the 阅读全文
posted @ 2016-07-17 14:56 MartinEden 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Problem F Problem Description There are n points in a geometrical plane. If there exists a rectangle whose four vertices are among those points and ev 阅读全文
posted @ 2016-07-17 09:37 MartinEden 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Problem C Problem Description Definite an operation work(Q,x) as sequence Q from the first number on,keep the top x numbers and delete followed x numb 阅读全文
posted @ 2016-07-17 09:26 MartinEden 阅读(110) 评论(0) 推荐(0) 编辑