博弈论
BYSora
这个作者很懒,什么都没留下…
展开
-
hdu1564——Play a game(找规律博弈)
Problem Description New Year is Coming! ailyanlu is very happy today! and he is playing a chessboard game with 8600. The size of the chessboard is n*n. A stone is placed in a corner square. They p原创 2016-05-11 16:22:44 · 1186 阅读 · 0 评论 -
hdu4994——Revenge of Nim(博弈)
Problem Description Nim is a mathematical game of strategy in which two players take turns removing objects from distinct heaps. On each turn, a player must remove at least one object, and may remove原创 2017-03-19 22:43:31 · 531 阅读 · 0 评论 -
hdu1848——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就是曾经的浙江省赛题。 今天,又一个原创 2016-08-08 11:00:04 · 702 阅读 · 0 评论 -
poj1082——Calendar Game(博弈论,奇偶判定)
DescriptionAdam and Eve enter this year’s ACM International Collegiate Programming Contest. Last night, they played the Calendar Game, in celebration of this contest. This game consists of the dates fr原创 2016-05-09 10:55:17 · 1741 阅读 · 1 评论 -
hdu2147——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原创 2016-05-01 10:56:21 · 1248 阅读 · 0 评论 -
hdu1846——Brave Game(巴什博奕)
Problem Description 十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。 今天,大家选择上机考试,就是一种勇敢(brave)的选择;这个短学期,我们讲的是博弈(game)专题;所以,大家现在玩的也是“勇敢者的游戏”,这也是我命名这个题目的原因。 当然,除了原创 2016-05-01 10:30:17 · 703 阅读 · 0 评论 -
hdu2149——Public Sale(巴什博弈)
Problem Description 虽然不想,但是现实总归是现实,Lele始终没有逃过退学的命运,因为他没有拿到奖学金。现在等待他的,就是像FarmJohn一样的农田生涯。要种田得有田才行,Lele听说街上正在举行一场别开生面的拍卖会,拍卖的物品正好就是一块20亩的田地。于是,Lele带上他的全部积蓄,冲往拍卖会。后来发现,整个拍卖会只有Lele和他的死对头Yueyue。通过打听,Lele知道原创 2016-05-12 12:05:28 · 778 阅读 · 0 评论 -
hdu3951——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原创 2016-05-12 11:17:38 · 1154 阅读 · 0 评论 -
hdu3863——No Gambling(简单博弈)
Problem Description One day, Flyvan introduced a new game to his two friends, Oregon Maple and Grape Skin. The game is quite simple. Given an N-sized grids, like the figure A shown below (as N = 4). T原创 2016-05-12 10:42:40 · 945 阅读 · 0 评论 -
NJUSToj1927——谁才是最强战舰!(尼姆博弈)
Description 依阿华来到镇守府的第一件事情,就是找大和solo! 然而这并不是什么好消息,说不定,镇守府,甚至佐伯湾就这么消失了。。。 于是,提督君想了一个简单的游戏,来分出她们的胜负。游戏规则如下:这里有N堆石子,每堆石子有a[i](1<=i<=N)个,每人轮流从其中的某一堆石子中拿出任意个石子(只能在其中一堆拿,不能不拿),大和先手,谁拿出了最后一个石子,谁输。若大和必胜,输出“原创 2016-05-12 09:54:51 · 980 阅读 · 0 评论 -
poj2960——S-Nim(SG函数)
DescriptionArthur 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 necessari原创 2016-05-11 21:15:20 · 783 阅读 · 0 评论 -
hdu2897——邂逅明下(巴什博奕变形)
Problem Description 当日遇到月,于是有了明。当我遇到了你,便成了侣。 那天,日月相会,我见到了你。而且,大地失去了光辉,你我是否成侣?这注定是个凄美的故事。(以上是废话) 小t和所有世俗的人们一样,期待那百年难遇的日食。驻足街头看天,看日月渐渐走近,小t的脖子那个酸呀(他坚持这个姿势已经有半个多小时啦)。他低下仰起的头,环顾四周。忽然发现身边竟站着位漂亮的mm。天渐渐暗下,原创 2016-05-11 19:26:29 · 812 阅读 · 0 评论 -
hdu2516——取石子游戏(FIB博弈)
1堆石子有n个,两人轮流取.先取者第1次可以取任意多个,但不能全部取完.以后每次取的石子数不能超过上次取子数的2倍。取完者胜.先取者负输出”Second win”.先取者胜输出”First win”.Input 输入有多组.每组第1行是2<=n<2^31. n=0退出.Output 先取者负输出”Second win”. 先取者胜输出”First win”. 参看Sample Output.原创 2016-05-11 18:41:00 · 1226 阅读 · 0 评论 -
hdu1847——Good Luck in CET-4 Everybody!(巴什博奕)
Problem Description 大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是如此。当然,作为在考场浸润了十几载的当代大学生,Kiki和Cici更懂得考前的放松,所谓“张弛有道”就是这个意思。这不,Kiki和Cici在每天晚上休息之前都要玩一会儿扑克牌以放松神经。 “升级”?“双扣”?“红五”?还是“斗地主”原创 2016-05-11 17:05:00 · 2526 阅读 · 0 评论 -
蓝桥杯历届试题——约数倍数选卡片(博弈论+dfs)
问题描述 闲暇时,福尔摩斯和华生玩一个游戏: 在N张卡片上写有N个整数。两人轮流拿走一张卡片。要求下一个人拿的数字一定是前一个人拿的数字的约数或倍数。例如,某次福尔摩斯拿走的卡片上写着数字“6”,则接下来华生可以拿的数字包括: 1,2,3, 6,12,18,24 …. 当轮到某一方拿卡片时,没有满足要求的卡片可选,则该方为输方。 请你利用计算机的优势计算一下,在已知所有原创 2017-03-16 18:37:45 · 4131 阅读 · 2 评论