题目大意:输入一个整数n,表示火柴堆数(原题其实指的是苹果堆数,但是为了尽量与模板保持一致,所以在这里理解为火柴堆数....其实理解为什么都没关系, 重要的是,理解就行....).在接下来的一行中,有n个数字,表示每个火柴堆的火柴根数. 解题思路:还是去火柴棒的问题 详细的说明请参考上一篇博客 代码如下: /* * 2509_1.cpp * * Created on: 2013年9月1日 * Author: Administrator */ #include <iostream> using…
Be the Winner Problem Description   Let's consider m apples divided into n groups. Each group contains no more than 100 apples, arranged in a line. You can take any number of consecutive apples at one time.For example "@@@" can be turned into &q…
Problem Description Little John is playing very funny game with his younger brother. There is one big box filled with M&Ms of different colors. At first John has to eat several M&Ms of the same color. Then his opponent has to make a turn. And so o…
Be the Winner Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3591    Accepted Submission(s): 2009 Problem Description Let's consider m apples divided into n groups. Each group contains no more…
博弈论水题!!! 代码如下: #include<stdio.h> #include<iostream> using namespace std; int main(){ int i,t,n,k,m; while(cin>>n){ m=;t=; ;i<n;i++){ cin>>k; ) t++; m^=k; } &&t>=)||(m!=&&t==)) cout<<"No"<<…
题目链接 有n堆苹果, 对于其中的每一堆的x个苹果, 它是放在一条线上的. 你每次可以对一堆苹果进行操作, 可以取y个, 1<=y<=x. 然后如果你是取的一条线上中间的苹果, 那么这一堆苹果将会变成两堆. 问你先手是否必胜. 简单的打一个sg表就可以了. 注意特判全都是1的情况. #include <iostream> #include <vector> #include <cstdio> #include <cstring> #include…
传送门 #include<iostream> #include<cstdio> #include<cstring> using namespace std; int main() { int n; while(~scanf("%d",&n)) { ; ,g=; ;i<n;i++) { scanf("%d",&a); ) c++; ) g++; res^=a; } if(!res) { )//T2 printf…
Fliping game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 307    Accepted Submission(s): 220 Problem Description Alice and Bob are playing a kind of special game on an N*M board (N rows, M co…
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…
Stone Game, Why are you always there? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 393    Accepted Submission(s): 132 Problem Description “Alice and Bob are playing stone game...”“Err.... Fee…