上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 50 下一页
摘要: Find the MarbleTime Limit: 2 Seconds Memory Limit: 65536 KBAlice and Bob are playing a game. This game is played with several identical pots and one marble. When the game starts, Alice puts the p... 阅读全文
posted @ 2013-08-02 18:38 码代码的猿猿 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 求A,B的最大公约数,并求出X,Y A*X+B*Y=gcd(A,B)int ex_gcd(int a,int b,int &x,int &y){ if(b==0) { x=1;y=0; return a; } else { int r=gcd(b,a&b,y,x); y-=x*(a/b)... 阅读全文
posted @ 2013-08-02 08:06 码代码的猿猿 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Modular InverseTime Limit: 2 Seconds Memory Limit: 65536 KBThe modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1≡x (mod m). This is equivalent to ax≡1 ... 阅读全文
posted @ 2013-08-02 07:17 码代码的猿猿 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Draw Something CheatTime Limit: 2 Seconds Memory Limit: 65536 KBHave you played Draw Something? It's currently one of the hottest social drawing games on Apple iOS and Android Devices! In this ga... 阅读全文
posted @ 2013-08-02 04:10 码代码的猿猿 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 线段树。。。。。BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7316 Accepted Submission(s): 3278Problem DescriptionAt the entrance to the ... 阅读全文
posted @ 2013-08-01 06:08 码代码的猿猿 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7428 Accepted Submission(s): 4560Problem DescriptionThe inversion num... 阅读全文
posted @ 2013-08-01 02:38 码代码的猿猿 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 线段树单点更新I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 26593 Accepted Submission(s): 10564Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,... 阅读全文
posted @ 2013-07-31 19:34 码代码的猿猿 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Nim博弈Being a Good Boy in Spring FestivalTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3139 Accepted Submission(s): 1819Problem Description一... 阅读全文
posted @ 2013-07-30 18:12 码代码的猿猿 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 有一种很有意思的游戏,就是有物体若干堆,可所以火柴棍或是围棋子等等均可。两个人轮流从堆中取物体若干,规定最后取光物体者取胜。这是我公民间很古老的一个游戏,别看这游戏极其简单,却蕴含着深切的数学道理。下面我们来解析一下要如何才干够取胜。 (一)巴什博奕(Bash Game):只有一堆n个物品,两小我轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光者获胜。 显然,若是n=m+1,... 阅读全文
posted @ 2013-07-30 08:02 码代码的猿猿 阅读(220) 评论(0) 推荐(0) 编辑
摘要: ac自动机模板题Keywords SearchTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25993 Accepted Submission(s): 8464Problem DescriptionIn the modern tim... 阅读全文
posted @ 2013-07-27 05:37 码代码的猿猿 阅读(159) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 50 下一页