博弈论
博弈论的一些小题目~
TooSIMple_
十倍努力做突出一个!
展开
-
HDU1850 Being a Good Boy in Spring Festival
Being a Good Boy in Spring FestivalTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6879 Accepted Submission(s): 4165Problem Descr原创 2016-10-18 21:14:48 · 240 阅读 · 0 评论 -
51nod 1185 威佐夫游戏 V2
有2堆石子。A B两个人轮流拿,A先拿。每次可以从一堆中取任意个或从2堆中取相同数量的石子,但不可不取。拿到最后1颗石子的人获胜。假设A B都非常聪明,拿石子的过程中不会出现失误。给出2堆石子的数量,问最后谁能赢得比赛。例如:2堆石子分别为3颗和5颗。那么不论A怎样拿,B都有对应的方法拿到最后1颗。Input第1行:一个数T,表示后面用作输入测试的数的数量。(1 <...原创 2016-11-27 21:50:35 · 478 阅读 · 0 评论 -
51nod 1072 威佐夫游戏
有2堆石子。A B两个人轮流拿,A先拿。每次可以从一堆中取任意个或从2堆中取相同数量的石子,但不可不取。拿到最后1颗石子的人获胜。假设A B都非常聪明,拿石子的过程中不会出现失误。给出2堆石子的数量,问最后谁能赢得比赛。例如:2堆石子分别为3颗和5颗。那么不论A怎样拿,B都有对应的方法拿到最后1颗。Input第1行:一个数T,表示后面用作输入测试的数的数量。(1 &...原创 2016-11-27 21:52:20 · 345 阅读 · 0 评论 -
2016山东省第七届acm省赛 G题Triple Nim
Triple NimTime Limit: 2000MS Memory limit: 65536K题目描述Alice and Bob are always playing all kinds of Nim games and Alice always goes first. Here is the rule of Nim game: There are s原创 2017-03-29 16:34:02 · 657 阅读 · 0 评论 -
HDU1907 John (尼姆博弈变形)
JohnTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 4714 Accepted Submission(s): 2725Problem DescriptionLittle John is playin原创 2017-04-28 19:37:56 · 501 阅读 · 0 评论 -
51nod Bash游戏 V2 (有限制的bash博弈)
1067 Bash游戏 V2基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题 收藏 关注有一堆石子共有N个。A B两个人轮流拿,A先拿。每次只能拿1,3,4颗,拿到最后1颗石子的人获胜。假设A B都非常聪明,拿石子的过程中不会出现失误。给出N,问最后谁能赢得比赛。例如N = 2。A只能拿1颗,所以B可以拿到最后1颗石子。Inpu...原创 2017-04-28 20:41:32 · 393 阅读 · 0 评论 -
HDU1079 Calendar Game(找规律+特殊点判断博弈)
Calendar GameTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4335 Accepted Submission(s): 2628Problem DescriptionAdam and Eve原创 2017-04-29 21:00:46 · 329 阅读 · 0 评论 -
HDU1525 Euclid's Game (找规律博弈)
Euclid's GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3434 Accepted Submission(s): 1599Problem DescriptionTwo players,原创 2017-04-30 21:44:14 · 652 阅读 · 0 评论 -
HDU5973 Game of Taking Stones (大数博弈)
Game of Taking StonesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 458 Accepted Submission(s): 175Problem DescriptionTwo pe原创 2017-05-02 10:00:46 · 692 阅读 · 0 评论 -
2015山东省第六届acm省赛 C题Game!
Game!Time Limit: 1000MS Memory Limit: 65536KBSubmit Statistic DiscussProblem DescriptionOne day, zbybr is playing a game with blankcqk, here are the rules of the game:There is a circ原创 2017-05-03 17:16:38 · 618 阅读 · 0 评论 -
CodeForces 768E Game of Stones (Nim博弈)
题目链接:http://codeforces.com/problemset/problem/768/E题意:给定n堆石子,第i堆石子有a[i]个,两个玩家交替从n堆中取石子,不过如果一个玩家在第i堆中取过m个石子,则另一个玩家则不能在第i堆再取m个石子,最后不能取石子的人为输,jon赢则输出YES否则输出NO,jon为后手思路:对于玩家来说,第i堆石子不能拿以前拿过的数量,求出第i堆石子最原创 2017-12-06 17:41:46 · 333 阅读 · 0 评论 -
POj2348 Euclid's Game (博弈)
Euclid's GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9928 Accepted: 4063DescriptionTwo players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtr...原创 2018-02-14 22:48:18 · 187 阅读 · 0 评论 -
ZOJ3057 Beans Game (博弈,DP)
Beans GameTime Limit: 5 Seconds Memory Limit: 32768 KBThere are three piles of beans. TT and DD pick any number of beans from any pile or the same number from any two piles by turns. Wh原创 2018-02-14 22:54:12 · 324 阅读 · 0 评论 -
HDU1848 Fibonacci again and again (SG函数打表模板)
Fibonacci again and againTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10047 Accepted Submission(s): 4274Problem Description原创 2018-02-14 22:56:55 · 166 阅读 · 0 评论 -
POJ1704 Georgia and Bob(博弈)
Georgia and BobTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11346 Accepted: 3746DescriptionGeorgia and Bob decide to play a self-invented game. The原创 2018-02-17 22:42:41 · 276 阅读 · 0 评论 -
POJ2311 Cutting Game (博弈)
Cutting GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4794 Accepted: 1753DescriptionUrej loves to play various types of dull games. He usually a原创 2018-02-17 22:48:59 · 238 阅读 · 0 评论 -
HDU4388 Stone Game II (找规律博弈)
Stone Game IITime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 401 Accepted Submission(s): 230Problem Description Stone Game I原创 2018-02-20 13:09:27 · 381 阅读 · 0 评论 -
LA5059 Playing With Stones (SG博弈)
题目链接:LA5059【题意】:有n堆石子,第i堆石子有ai个,两个玩家依次轮流取石子,每次从一堆中最少取一个,不能超过该堆石子数量的一半(1<=取石子数<=ai/2);【思路】:sg打表,发现所有偶数的sg值都为该数的1/2,奇数的sg值是当/2是遇到的第一个偶数的1/2.【代码如下】 #include <cstdio>#include <c...原创 2018-02-23 13:22:17 · 215 阅读 · 0 评论 -
POJ2975 Nim (Nim博弈)
NimTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6393 Accepted: 3043DescriptionNim is a 2-player game featuring several piles of stones. Players a原创 2018-02-26 16:13:12 · 188 阅读 · 0 评论 -
POJ2960 S-Nim (sg博弈模板)
S-NimTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 4655 Accepted: 2438DescriptionArthur and his sister Caroll have been playing a game called Nim fo原创 2018-02-28 09:19:32 · 296 阅读 · 0 评论 -
POJ2425 A Chess Game (博弈)
Language:DefaultA Chess GameTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 4327 Accepted: 1747DescriptionLet's design a new chess game. There are N positions to hold M chesses in this game....原创 2018-02-28 09:30:40 · 409 阅读 · 0 评论 -
POJ1740 A New Stone Game (博弈)
A New Stone GameTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 6214 Accepted: 3394DescriptionAlice and Bob decide to play a new stone game.At the beg原创 2018-03-01 09:07:26 · 234 阅读 · 0 评论 -
POJ3537 Crosses and Crosses (Multi-SG)
Crosses and CrossesTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 4059 Accepted: 1591Case Time Limit: 2000MSDescriptionThe game of Crosses and Crosses is played on the field of 1 × n cells....原创 2018-03-13 17:20:53 · 301 阅读 · 0 评论 -
POJ2315 Football Game (Nim & Bash)
Football GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 362 Accepted: 125DescriptionAlice and Bob both love football very much, and both of them ar原创 2018-03-16 21:35:13 · 345 阅读 · 0 评论 -
Codeforces 15C Industrial Nim(Nim博弈)
C. Industrial Nimtime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputThere are n stone quarries in Petrograd.原创 2018-03-30 21:43:57 · 453 阅读 · 0 评论 -
51nod 1534 棋子游戏(博弈)
1534 棋子游戏题目来源: CodeForces基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题波雷卡普和瓦西里喜欢简单的逻辑游戏。今天他们玩了一个游戏,这个游戏在一个很大的棋盘上进行,他们每个人有一个棋子。他们轮流移动自己的棋子,波雷卡普先开始。每一步移动中,波雷卡普可以将他的棋子从(x,y) 移动到 (x-1,y) 或者 (x,y-1)。而...原创 2018-04-02 14:50:46 · 340 阅读 · 0 评论 -
Codeforces 55C Pie or die (博弈)
C. Pie or dietime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVolodya and Vlad play the following game. The原创 2018-04-02 16:39:08 · 441 阅读 · 0 评论 -
Codeforces 74B Train (博弈 & 贪心)
B. Traintime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA stowaway and a controller play the following game.The train is re...原创 2018-04-03 16:19:50 · 462 阅读 · 0 评论 -
Codeforces 78C Beaver Game (博弈)
C. Beaver Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo beavers, Timur and Marsel, play the following game.There are n logs, each of exac...原创 2018-04-04 21:20:01 · 408 阅读 · 0 评论 -
Codeforces 87C Interesting Game (sg博弈)
C. Interesting Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo best friends Serozha and Gena play a game.Initially there is one pile consi...原创 2018-04-05 10:42:38 · 459 阅读 · 0 评论 -
Codeforces 135C Zero-One(博弈)
C. Zero-Onetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Petya very much likes playing with little Masha. Recently h...原创 2018-04-16 16:11:50 · 602 阅读 · 0 评论 -
Codeforces 150A Win or Freeze (博弈 & 数论)
A. Win or Freezetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou can't possibly imagine how cold our friends are this wint...原创 2018-04-17 15:47:47 · 382 阅读 · 0 评论 -
Codeforces 794C Naming Company(博弈 & 贪心)
C. Naming Companytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOleg the client and Igor the analyst are good friends. Howev...原创 2018-04-23 17:31:34 · 404 阅读 · 0 评论