标签:style io strong for ar amp size sp on
题意:
桌子上有M堆扑克牌;每堆牌的数量分别为Ni(i=1…M);
两人轮流进行;每走一步可以任意选择一堆并取走其中的任意张牌;
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int a[200]; int main() { int n; while(~scanf("%d", &n)&&n) { int sum = 0; for(int i=0; i<n; ++i) { scanf("%d", &a[i]); sum ^= a[i]; } int ans = 0; for(int i=0; i<n; ++i) if(a[i] > (sum^a[i]) ) ans++; printf("%d\n", ans); } return 0; }<span style="font-family:Arial, Helvetica, sans-serif;"><span style="white-space: normal;"> </span></span>
hdu1850 Being a Good Boy in Spring Festival ,尼姆博弈(Mimm game),Min sum
标签:style io strong for ar amp size sp on
原文地址:http://blog.csdn.net/yew1eb/article/details/38756583