博弈
文章平均质量分 95
琥珀色的琉璃夜
这个作者很懒,什么都没留下…
展开
-
POJ: 2975 Nim
DescriptionNim is a 2-player game featuring several piles of stones. Players alternate turns, and on his/her turn, a player’s move consists of removing one or more stones from any single pile. Play e...原创 2019-03-15 19:37:26 · 505 阅读 · 0 评论 -
邂逅明下(巴什博奕)
Description当日遇到月,于是有了明。当我遇到了你,便成了侣。那天,日月相会,我见到了你。而且,大地失去了光辉,你我是否成侣?这注定是个凄美的故事。(以上是废话)小t和所有世俗的人们一样,期待那百年难遇的日食。驻足街头看天,看日月渐渐走近,小t的脖子那个酸呀(他坚持这个姿势已经有半个多小时啦)。他低下仰起的头,环顾四周。忽然发现身边竟站着位漂亮的mm。天渐渐暗下,这mm在这街头竟然如...原创 2019-03-12 21:26:47 · 151 阅读 · 0 评论 -
HDU 1538 A Puzzle for Pirates(经典的海盗分金推理)
题目:这是一个经典问题,有n个海盗,分m块金子,其中他们会按一定的顺序提出自己的分配方案,如果50%以上的人赞成,则方案通过,开始分金子,如果不通过,则把提出方案的扔到海里,下一个人继续。首先我们讲一下海盗分金决策的三个标准:保命,拿更多的金子,杀人,优先级是递减的。同时分为两个状态稳定状态和不稳定状态:如果当n和m的组合使得最先决策的人(编号为n)不会被丢下海, 即游戏会立即结束, 就称这......转载 2019-07-30 20:49:09 · 200 阅读 · 0 评论 -
2019牛客暑期多校训练营(第三场)G题 Removing Stones
题目描述:Summer vacation is coming and Mark has returned home from his university having successfully survived the exam week. Today, he is very bored. So his friend Alice challenges him to play a game wi...原创 2019-07-25 20:04:45 · 287 阅读 · 0 评论 -
HDU 3404 Switch light (Nim积)
题面:lxhgww is playing a game with his computer Deep Blue. The game is played on a matrix containing lights. At first, some lights are on, while others are off. lxhgww and Deep Blue take turns to switc...转载 2019-07-31 10:34:37 · 239 阅读 · 0 评论 -
HDU 3032 Nim or not Nim? (SG函数打表找规律)
DescriptionNim is a two-player mathematic game of strategy in which players take turns removing objects from distinct heaps. On each turn, a player must remove at least one object, and may remove any...原创 2019-07-26 16:49:19 · 145 阅读 · 0 评论 -
常见的几种博弈综合
最经典的Nim博弈:描述:一共有N堆石子,编号 1~n ,第 i 堆中有个 ai 个石子。每一次操作Alice和Bob可以从任意一堆石子中取出任意数量的石子,至少取一颗,至多取出这一堆剩下的所有石子。两个人轮流行动,取走最后一个的人胜利。结论:对某个人来说都有一个局面,当且仅当 a1 ^ a2 ^ …… ^ an = 0时,必败,否则必胜。反Nim博弈:描述:与经典Nim博弈相反,取走......原创 2019-07-26 19:30:07 · 1489 阅读 · 0 评论 -
HDU - 1524 A Chess Game (dfs + SG函数)
DescriptionLet’s design a new chess game. There are N positions to hold M chesses in this game. Multiple chesses can be located in the same position. The positions are constituted as a topological gr...原创 2019-08-01 20:09:10 · 310 阅读 · 3 评论