Coin Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 888 Accepted Submission(s): 547 Problem Description After hh has learned how to play Nim game, he begins to try another coin game whi…
HDU.2149 Public Sale (博弈论 巴什博弈) 题意分析 巴什博奕裸题 博弈论快速入门 代码总览 #include <bits/stdc++.h> using namespace std; int main() { int n,m,s,r; while(scanf("%d %d",&m,&n) != EOF){ s = m%(n+1); if(s == 0) printf("none\n"); else{ r = (m -…
HDU.1846 Brave Game (博弈论 巴什博弈) 题意分析 巴什博奕裸题 博弈论快速入门 代码总览 include <bits/stdc++.h> using namespace std; int main() { int t; scanf("%d",&t); while(t--){ int n,m; scanf("%d %d",&n,&m); int r,s; r = n%(m+1); if(r == 0) prin…
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1851 Accepted Submission(s): 1065 Problem Description After hh has learned how to play Nim game, he begins to try another coin game which seems much…
题目链接 思路:考虑第一个人取的方式: 1.每次能取的次数>= n, 一次取完 first win 2.每次能取1个,n是奇数 first win 3.一次取不完,这种情况下也分2种情况 1)second能一次取完, second win 2)second不能一次取完,则他取一次使得这个链至少有一个部分是能一次取完的 若2个部分都是一次取完的,second win 若1个部分是一次取完的,另一个部分不行,又分两种情况 #1first选择取可以取完的那一堆,那么状况又回到了second取一堆不可以…
朋友 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description B君在围观一群男生和一群女生玩游戏,具体来说游戏是这样的:给出一棵n个节点的树,这棵树的每条边有一个权值,这个权值只可能是0或1. 在一局游戏开始时,会确定一个节点作为根.接下来从女生开始,双方轮流进行 操作.当一方操作时,他们需要先选择一个不为根的点,满足该点到其父亲的边权为1; 然…
Circles Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5299 Description There are n circles on a infinitely large table.With every two circle, either one contains another or isolates from the other.They are never crossed nor tangent. Alice and…