博弈
天夏123
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDOJ-1527 取石子游戏(威佐夫博奕)
#include <iostream>#include <algorithm>#include <cstring>#include <cmath>#include <vector>#include <cstdio>using namespace std;int main(){ //freopen("in.txt", "r", stdin); int a, b; whil原创 2016-03-31 15:15:40 · 667 阅读 · 0 评论 -
Codeforces549C - The Game Of Parity
原题链接C. The Game Of Paritytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n cities in Wester原创 2016-12-03 16:31:33 · 391 阅读 · 0 评论 -
Codeforces Beta Round #15-C. Industrial Nim
原题链接C. Industrial Nimtime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputThere are n stone quar原创 2016-11-10 11:07:53 · 519 阅读 · 0 评论 -
51nod-1605 棋盘问题
原题链接1605 棋盘问题基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注上帝创造了一个n*m棋盘,每一个格子都只有可能是黑色或者白色的。亚当和夏娃在玩一个游戏,每次寻找边长为x的正方形,其中每个格子必须为黑色,然后将这些格子染白。如果谁不能操作了,那么那个原创 2016-09-30 09:25:51 · 331 阅读 · 0 评论 -
Experimental Educational Round: VolBIT Formulas Blitz-R. Game
原题链接R. Gametime limit per test0.5 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputThere is a legend in the IT Ci原创 2016-09-02 15:07:12 · 396 阅读 · 0 评论 -
51nod-1714 B君的游戏
原题链接1714B君的游戏基准时间限制:1 秒 空间限制:131072 KB 分值:40难度:4级算法题B君和L君要玩一个游戏。刚开始有n个正整数 a i 。双方轮流操作。每次操作,选一个正整数x,将其移除,再添加7个数字 x 1 ,x 2 ...x 7 。要求对于 x i ,满足 0x原创 2016-08-07 18:57:06 · 1320 阅读 · 0 评论 -
51nod-1070 Bash游戏 V4(斐波那契博弈)
原题链接1070 Bash游戏 V4基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注有一堆石子共有N个。A B两个人轮流拿,A先拿。每次拿的数量最少1个,最多不超过对手上一次拿的数量的2倍(A第1次拿时要求不能全拿走)。拿到最后1颗石子的人获胜。假设A B都原创 2016-08-05 10:42:49 · 551 阅读 · 0 评论 -
斐波那契博弈(Fibonacci Nim)
有一堆个数为n(n>=2)的石子,游戏双方轮流取石子,规则如下:1)先手不能在第一次把所有的石子取完,至少取1颗;2)之后每次可以取的石子数至少为1,至多为对手刚取的石子数的2倍。约定取走最后一个石子的人为赢家,求必败态。结论:当n为Fibonacci数的时候,必败。f[i]:1,2,3,5,8,13,21,34,55,89……用第二转载 2016-08-05 09:40:41 · 291 阅读 · 0 评论 -
HDOJ-1536 S-Nim
当我们面对由 n 个游戏组合成的一个游戏时,只需对于每个游戏找出求它的每个局面的 SG 值的方法,就可以把这些 SG 值全部看成 Nim 的 石子堆#include <iostream>#include <algorithm>#include <cstring>#include <cmath>#include <vector>#include <cstdio>#define maxn 1原创 2016-04-04 11:14:18 · 442 阅读 · 0 评论 -
HDOJ-2177 取(2堆)石子游戏
#include <iostream>#include <algorithm>#include <cstring>#include <cmath>#include <vector>#include <cstdio>#define maxn 1000005using namespace std;int pl[maxn], pr[maxn];double t;void Init(){原创 2016-03-31 16:29:33 · 415 阅读 · 0 评论 -
hdoj 5996 - dingyeye loves stone(阶段博弈)
原题链接dingyeye loves stoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 54 Accepted Submission(s): 30Problem Description原创 2016-12-17 23:10:15 · 439 阅读 · 0 评论
分享