
博弈
天夏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 · 657 阅读 · 0 评论 -
Codeforces549C - The Game Of Parity
原题链接 C. The Game Of Parity time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are n cities in Wester原创 2016-12-03 16:31:33 · 381 阅读 · 0 评论 -
Codeforces Beta Round #15-C. Industrial Nim
原题链接 C. Industrial Nim time limit per test 2 seconds memory limit per test 64 megabytes input standard input output standard output There are n stone quar原创 2016-11-10 11:07:53 · 508 阅读 · 0 评论 -
51nod-1605 棋盘问题
原题链接 1605 棋盘问题 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注 上帝创造了一个n*m棋盘,每一个格子都只有可能是黑色或者白色的。 亚当和夏娃在玩一个游戏,每次寻找边长为x的正方形,其中每个格子必须为黑色,然后将这些格子染白。 如果谁不能操作了,那么那个原创 2016-09-30 09:25:51 · 323 阅读 · 0 评论 -
Experimental Educational Round: VolBIT Formulas Blitz-R. Game
原题链接 R. Game time limit per test 0.5 seconds memory limit per test 64 megabytes input standard input output standard output There is a legend in the IT Ci原创 2016-09-02 15:07:12 · 380 阅读 · 0 评论 -
51nod-1714 B君的游戏
原题链接 1714 B君的游戏 基准时间限制: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 · 1292 阅读 · 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 · 541 阅读 · 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 · 273 阅读 · 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 · 431 阅读 · 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 · 398 阅读 · 0 评论 -
hdoj 5996 - dingyeye loves stone(阶段博弈)
原题链接 dingyeye loves stone Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 54 Accepted Submission(s): 30 Problem Description原创 2016-12-17 23:10:15 · 427 阅读 · 0 评论