题目大意:两个人取n张牌,每次只能取1,2,4等2的幂次张,取完最后一张的获胜。问先手必胜吗? 关键思想:有求SG值的方法,或者找规律的方法,仅贴代码不做讲述,到处都有。了解基础博弈论的话很容易理解。 代码如下: SG值…
分类:Online Judge
POJ 1755 Triathlon (半平面交)
Triathlon Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 4733 Accepte…
POJ 3304 Segments (直线和线段相交判断)
Segments Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7739 Accepted: 2316 Descript…
CDOJ 1280 772002画马尾 每周一题 div1 矩阵快速幂
772002画马尾 题目连接: http://acm.uestc.edu.cn/#/problem/show/1280 Description 众所周知772002很喜欢马尾,所以他决定画几幅马尾送给他的女朋友。 772…
HDU 4813 Hard Code 水题
Hard Code Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action…
HDU 5492 Find a path DP
Find a path Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5492 …
Codeforces Round #371 (Div. 2) D. Searching Rectangles 交互题 二分
D. Searching Rectangles 题目连接: http://codeforces.com/contest/714/problem/D Description Filya just learned new g…
POJ 2769 Reduced ID Numbers
Reduced ID Numbers Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7494 Accepted: 302…
BZOJ 1877: [SDOI2009]晨跑 费用流
1877: [SDOI2009]晨跑 Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://www.lydsy.com/JudgeOnline/problem…
hdu 5762 Teacher Bo 暴力
Teacher Bo 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5762 Description Teacher BoBo is a geography teache…
HDU 4609 3-idiots(FFT)
3-idiots Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Othe…
Codeforces Round #361 (Div. 2) C. Mike and Chocolate Thieves 二分
C. Mike and Chocolate Thieves 题目连接: http://www.codeforces.com/contest/689/problem/C Description Bad news came …