码迷,mamicode.com
首页 >  
搜索关键字:poj1753flip game    ( 5568个结果
[原博客] POJ 1740 A New Stone Game
题目链接题意:有n堆石子,两人轮流操作,每次每个人可以从一堆中拿走若干个扔掉(必须),并且可以从中拿走一些分到别的有石子的堆里(可选),当一个人不能拿时这个人输。给定状态,问是否先手必胜。我们参考普通取石子游戏可知,如果只有一堆,先手必胜。如果有两堆一样,先手必败,对称博弈,第一个人怎么取,第二个人...
分类:其他好文   时间:2014-09-08 00:57:16    阅读次数:311
[原博客] POJ 2484 A Funny Game
题目链接题意:有n个硬币排成一圈,两个人轮流操作,每次可以取走一个或者相邻的连个硬币(只算最开始相邻的,取之后才相邻的不算),问先手必胜还是必败。这个题可以证明若n>=3,则先手必败。对称博弈若n>=3,先手第一次必然把这个环拆成一个链,然后无论这条链长度的奇偶,后手总是可以把这条链分成两条相等的链...
分类:其他好文   时间:2014-09-08 00:56:56    阅读次数:193
[原博客] POJ 2425 A Chess Game
题目链接题意:给定一个有向无环图(DAG),上面放有一些旗子,旗子可以重合,两个人轮流操作,每次可以把一个旗子从一个位置移动到相邻的位置,无法移动时输,询问先手是否必胜。这道题可以把每个旗子看作单独的一个游戏,那么所有这些旗子的状态SG值,就是这些旗子各自SG值的Xor和,可以记忆化搜索dfs,暴力...
分类:其他好文   时间:2014-09-08 00:56:26    阅读次数:675
zoj 3329 One Person Game(有环的概率dp)
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3754 开始看错题意了,以为没翻到a,b,c时要在原来的基础上加a+b+c,按我的意思推出来一个公式,没想到样例还过了,简直无法debug。 公式很好推,设dp[i]表示当前为i分时到达目标状态需要投掷的期望,可转移到两个状态dp[0]和dp[i+k]。设转移...
分类:其他好文   时间:2014-09-07 11:06:05    阅读次数:220
LA 6459 Infinite Go (模拟,搜索)
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4470 Go is a proverbial board game originated in China. It has been proved to be the most diffic...
分类:其他好文   时间:2014-09-06 21:21:53    阅读次数:457
Jack Straws(并差集和判断直线相交问题)
Jack Straws Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3155   Accepted: 1418 Description In the game of Jack Straws, a number of plastic or wooden "straws...
分类:其他好文   时间:2014-09-06 14:53:53    阅读次数:270
UVA - 1541 To Bet or Not To Bet (DP+概率)
Description Alexander Charles McMillan loves to gamble, and during his last trip to the casino he ran across a new game. It is played on a linear sequence of squares as shown below. A chip is in...
分类:其他好文   时间:2014-09-06 12:31:33    阅读次数:275
usaco-2.4-ttwo-pass
oh,pass!First,I think it's a game,hehe...../*ID: qq104801LANG: C++TASK: ttwo*/#include #include #include #include #include #include #include #include ...
分类:其他好文   时间:2014-09-06 12:20:03    阅读次数:230
博弈知识点
http://blog.csdn.net/acm_cxlove/article/details/78545261:HDOJ1846 Brave Game [找规律] 简单的巴什博弈 #include #include #include using namespace std; int main...
分类:其他好文   时间:2014-09-06 09:40:22    阅读次数:157
cocos2dx小知识——两个头文件相互包含问题
【问题】Game.h包含了Ship.h,并且Ship.h也包含了Game.h。然后在Game.h中声明了一个成员变量为Ship类:Ship*ship;会出现找不到Ship类的错误。【解决】在Game.h头文件中对Ship类进行声明即可:classShip;【扩展】如果在Game.cpp和Ship.cpp中相互包含Game.h与Ship.h。是不会有影..
分类:其他好文   时间:2014-09-06 02:17:52    阅读次数:146
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!