hrbustoj 2013 Play Game 2(博弈)】的更多相关文章

注释在代码里 /* 1.若输入2 ~ 9 ,因为Stan 是先手,所以Stan 必胜 2.若输入10~18 ,因为Ollie 是后手,不管第一次Stan 乘的是什么,Stan肯定在 2 ~ 9 之间,若Stan乘以 2 ,那么Ollie就乘以 9 ,就到18了,若Stan乘以 9 ,那么Ollie乘以大于1的数都都能超过10 ~ 18 中的任何一个数.Ollie 必胜 3.若输入是 19 ~ 162,那么这个范围是 Stan 的必胜态 4.若输入是 163 ~ 324 ,这是又是Ollie的必胜…
开发标准文件 文件名称:C#开发规范 版 本:V2.0 前言 目的是为了规范每个人的编程风格,为确保系统源程序可读性,从而增强系统可维护性,制定下述编程规范,以规范系统各部分编程.系统继承的其它资源中的源程序也应按此规范作相应修改. 规则: 编程时强制必须遵守的原则.建议: 编程时必须加以考虑的原则.格式: 对此规范格式的说明.说明: 对此规范或建议进行必要的解释.示例: 对此规范或建议从正.反两个方面给出例子. 内容包括:排版.命名规则.基本原则.注释.表达式与语句.类与接口, JavaScr…
Stone Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 179    Accepted Submission(s): 137 Problem Description Tang and Jiang are good friends. To decide whose treat it is for dinner, they are pla…
Mine Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 51    Accepted Submission(s): 6 Problem Description Have you ever played a game in Windows: Mine?This game is played on a n*m board, just lik…
Fliping game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 46    Accepted Submission(s): 35 Problem Description Alice and Bob are playing a kind of special game on an N*M board (N rows, M colu…
对称博弈,注释在代码里 #include<iostream> #include<cstdio> using namespace std; ///这个地方其实是博弈原理里面的对称博弈: ///考虑两种特殊情况,n = 1或者2,这时候先手肯定赢,不用管: ///当n >= 3的时候,硬币就是一个环,先手取完以后变成一个链. ///这个时候后手就一定可以把这个链变成两个相同的链,然后采用跟先手完全相同的手段 ///最后,肯定是后手取完的. int main() { int n;…
Mine Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 352    Accepted Submission(s): 94 Problem Description Have you ever played a game in Windows: Mine? This game is played on a n*m board, just…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4764 题意:Tang 和 Jiang 玩一个游戏,轮流写下一个数,Tang先手,第一次Tang只能写[1,k]之间的数,X表示上一个人写的数,Y表示下一个人写的数,每次必须满足 1<=Y-X<=k,直到有一个人写下的数不小于n,写下那个数的人失败,游戏结束,输出胜利的人. 分析:可以看做是取石子游戏,有一堆n-1个的石子,两个人轮流去石子,每次最多能去k个,如果没有石子可取则输,这就将问题转化为巴…
Gems Fight! Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 327680/327680 K (Java/Others)Total Submission(s): 114    Accepted Submission(s): 46 Problem Description Alice and Bob are playing "Gems Fight!": There are Gems of G different…
Triangulation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 96    Accepted Submission(s): 29 Problem Description There are n points in a plane, and they form a convex set. No, you are wrong. T…