![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
博弈论
文章平均质量分 60
elbadaernu
这个作者很懒,什么都没留下…
展开
-
取石子游戏 poj1067 威佐夫博奕
Description有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取,假设双方都采取最好的策略,问最后你是胜者还是败者。 Input输入包含若干行,表示若干种石子的初始情况,其中每一行包含两个非负整数a原创 2017-04-03 22:00:07 · 401 阅读 · 0 评论 -
hdu 3980 Paint Chain (sg函数 )
Problem Description Aekdycoin and abcdxyzk are playing a game. They get a circle chain with some beads. Initially none of the beads is painted. They take turns to paint the chain. In Each turn one pla原创 2017-04-16 13:24:37 · 416 阅读 · 0 评论 -
POJ2311 Cutting Game(博弈Multi-SG函数)
DescriptionUrej loves to play various types of dull games. He usually asks other people to play with him. He says that playing those games can show his extraordinary wit. Recently Urej takes a great in原创 2017-04-20 22:33:22 · 277 阅读 · 0 评论 -
hdu 5795 A Simple Nim(SG打表找规律)
Problem Description Two players take turns picking candies from n heaps,the player who picks the last one will win the game.On each turn they can pick any number of candies which come from the same h原创 2017-08-05 22:59:02 · 241 阅读 · 0 评论 -
Fliping game HDU - 4642 (思维题)
Problem Description Alice and Bob are playing a kind of special game on an N*M board (N rows, M columns). At the beginning, there are N*M coins in this board with one in each grid and every coin may b原创 2017-08-27 16:03:41 · 288 阅读 · 0 评论 -
朋友 HDU - 5963 (思维题)
Problem Description B君在围观一群男生和一群女生玩游戏,具体来说游戏是这样的: 给出一棵n个节点的树,这棵树的每条边有一个权值,这个权值只可能是0或1。 在一局游戏开始时,会确定一个节点作为根。接下来从女生开始,双方轮流进行 操作。 当一方操作时,他们需要先选择一个不为根的点,满足该点到其父亲的边权为1; 然后找出这个点到根节点的简单路径,将路径上所有边的权值翻转(即0变成原创 2017-08-27 17:01:26 · 395 阅读 · 0 评论 -
Georgia and Bob POJ - 1704 (变形的nim博弈)
Georgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, …, and place N chessmen on different grids, as shown in the follo原创 2017-08-28 16:03:24 · 278 阅读 · 0 评论 -
Sasha and Sticks CodeForces - 832A (水题)
It’s one more school day now. Sasha doesn’t like classes and is always bored at them. So, each day he invents some game and plays in it alone or with friends.Today he invented one simple game to play w原创 2017-08-28 18:08:39 · 778 阅读 · 0 评论 -
Chess HDU - 5724(状压+sg函数)
Problem Description Alice and Bob are playing a special chess game on an n × 20 chessboard. There are several chesses on the chessboard. They can move one chess in one turn. If there are no other ches原创 2017-08-28 21:35:12 · 369 阅读 · 0 评论 -
HDU 3951 Coin Game(博弈水题)
Problem Description After hh has learned how to play Nim game, he begins to try another coin game which seems much easier. The game goes like this: Two players start the game with a circle of n coi原创 2017-12-06 20:48:05 · 556 阅读 · 0 评论 -
hdu 1536 sg函数
Problem Description Arthur and his sister Caroll have been playing a game called Nim for some time now. Nim is played as follows:The starting position has a number of heaps, all containing some, not n原创 2017-04-15 20:38:44 · 367 阅读 · 0 评论 -
hdu 1847(巴什博弈 Or sg函数)
Problem Description 大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是如此。当然,作为在考场浸润了十几载的当代大学生,Kiki和Cici更懂得考前的放松,所谓“张弛有道”就是这个意思。这不,Kiki和Cici在每天晚上休息之前都要玩一会儿扑克牌以放松神经。 “升级”?“双扣”?“红五”?还是“斗地主”原创 2017-04-14 22:13:24 · 351 阅读 · 0 评论 -
hdu1730 Northcott Game(s-nim)
Problem Description Tom和Jerry正在玩一种Northcott游戏,可是Tom老是输,因此他怀疑这个游戏是不是有某种必胜策略,郁闷的Tom现在向你求救了,你能帮帮他么? 游戏规则是这样的: 如图所示,游戏在一个n行m列(1 ≤ n ≤ 1000且2 ≤ m ≤ 100)的棋盘上进行,每行有一个黑子(黑方)和一个白子(白方)。执黑的一方先行,每次玩家可以移动己方的原创 2017-04-18 22:25:50 · 370 阅读 · 0 评论 -
hdu 1848 Fibonacci again and again (sg函数)
Problem Description 任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的: F(1)=1; F(2)=2; F(n)=F(n-1)+F(n-2)(n>=3); 所以,1,2,3,5,8,13……就是菲波那契数列。 在HDOJ上有不少相关的题目,比如1005 Fibonacci again就是曾经的浙江省赛题。 今天,又一个原创 2017-04-17 22:21:27 · 271 阅读 · 0 评论 -
hdu 2147 kiki's game
Problem Description Recently kiki has nothing to do. While she is bored, an idea appears in his mind, she just playes the checkerboard game.The size of the chesserboard is n*m.First of all, a coin is原创 2017-04-18 15:26:46 · 207 阅读 · 0 评论 -
hdu 1517 A Multiplication Game
Problem Description Stan and Ollie play the game of multiplication by multiplying an integer p by one of the numbers 2 to 9. Stan always starts with p = 1, does his multiplication, then Ollie multipli原创 2017-04-18 16:12:47 · 320 阅读 · 0 评论 -
hdu 2188(巴什博弈)
hdu 2188Problem Description 对于四川同胞遭受的灾难,全国人民纷纷伸出援助之手,几乎每个省市都派出了大量的救援人员,这其中包括抢险救灾的武警部队,治疗和防疫的医护人员,以及进行心理疏导的心理学专家。根据要求,我校也有一个奔赴灾区救灾的名额,由于广大师生报名踊跃,学校不得不进行选拔来决定最后的人选。经过多轮的考核,形势逐渐明朗,最后的名额将在“林队”和“徐队”之间产生。但是原创 2017-04-03 14:31:57 · 363 阅读 · 0 评论 -
hdu 2149(巴什博弈)
Problem Description 虽然不想,但是现实总归是现实,Lele始终没有逃过退学的命运,因为他没有拿到奖学金。现在等待他的,就是像FarmJohn一样的农田生涯。要种田得有田才行,Lele听说街上正在举行一场别开生面的拍卖会,拍卖的物品正好就是一块20亩的田地。于是,Lele带上他的全部积蓄,冲往拍卖会。后来发现,整个拍卖会只有Lele和他的死对头Yueyue。通过打听,Lele知道原创 2017-03-22 22:04:42 · 316 阅读 · 0 评论 -
hdu 1846 (巴什博弈)
Problem Description 十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。 今天,大家选择上机考试,就是一种勇敢(brave)的选择;这个短学期,我们讲的是博弈(game)专题;所以,大家现在玩的也是“勇敢者的游戏”,这也是我命名这个题目的原因。 当然,除了原创 2017-03-22 20:41:07 · 1143 阅读 · 0 评论 -
hdu 2516 取石子游戏 (Fibonacci博弈)
Problem Description 1堆石子有n个,两人轮流取.先取者第1次可以取任意多个,但不能全部取完.以后每次取的石子数不能超过上次取子数的2倍。取完者胜.先取者负输出”Second win”.先取者胜输出”First win”.Input 输入有多组.每组第1行是2<=n<2^31. n=0退出.Output 先取者负输出”Second win”. 先取者胜输出”First win原创 2017-04-05 21:02:29 · 262 阅读 · 0 评论 -
hdu1850 Being a Good Boy in Spring Festival(尼姆博弈Nim)
Being a Good Boy in Spring FestivalProblem Description 一年在外 父母时刻牵挂 春节回家 你能做几天好孩子吗 寒假里尝试做做下面的事情吧陪妈妈逛一次菜场 悄悄给爸爸买个小礼物 主动地 强烈地 要求洗一次碗 某一天早起 给爸妈用心地做回早餐如果愿意 你还可以和爸妈说 咱们玩个小游戏吧 ACM课上学的呢~下面是一个二人小游戏:桌子上有M原创 2017-04-05 22:10:23 · 390 阅读 · 0 评论 -
hdu 1849 Rabbit and Grass(s-nim博弈)
Problem Description 大学时光是浪漫的,女生是浪漫的,圣诞更是浪漫的,但是Rabbit和Grass这两个大学女生在今年的圣诞节却表现得一点都不浪漫:不去逛商场,不去逛公园,不去和AC男约会,两个人竟然猫在寝食下棋…… 说是下棋,其实只是一个简单的小游戏而已,游戏的规则是这样的: 1、棋盘包含1*n个方格,方格从左到右分别编号为0,1,2,…,n-1; 2、m个棋子放在棋盘的原创 2017-04-18 14:13:46 · 348 阅读 · 0 评论 -
2017 acm icpc 上海final L 题(博弈)
emmmmm大致题意就是给你连续的n个格子,编号1到n,两个人轮流往空格子里放字母s或者o,谁先使得相邻的三个格子里字母为sos则谁获胜,假设A先手,B后手问谁会赢,如果所有格子都被填满了但是没有出现sos则认为两人平局。思路:一开始看到这题本来我想用状压啊,sg函数啊什么的去写,但是gg,于是就先扔一旁了,后来卡题的时候看榜单发现有一些奇奇怪怪的队伍过了这题,于是就觉得这题会不会是个傻逼题,然后对原创 2017-12-21 22:07:01 · 1531 阅读 · 0 评论