求救,我错哪了?

P2197 【模板】Nim 游戏

@[fmt931200363](/space/show?uid=124195) orz博弈论爷。。 ~~老老实实写个xor不行吗~~
by disangan233 @ 2019-01-05 22:07:09


然而为什么您全文没有一个异或QAQ
by 小菜鸟 @ 2019-01-05 22:08:39


@[fmt931200363](/space/show?uid=124195) 博弈论没有异或
by 越学越掂 @ 2019-01-05 22:21:32


@[越学越掂](/space/show?uid=38886) 如果你这个不是玩笑话,我有必要告诉你,这句话是错的
by GNAQ @ 2019-01-05 22:51:38


我c++新手,什么praintf之类的都不会QAQ
by fmt931200363 @ 2019-01-06 09:20:50


@[disangan233](/space/show?uid=72679) xor是什么
by fmt931200363 @ 2019-01-06 09:21:40


比上次还****红**** QAQ ```cpp #include<bits/stdc++.h> using namespace std; long long n,t,a[10001],s[10001]; int main(){ cin>>t; for(int i=1;i<=t;i++){ cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; if(a[i]==0){ n--; } } if(n%2==0){ for(int i=1;i<=n;i++){ if(a[i]>=2){ s[i]=1; } } } else{ s[i]=1; } } for(int i=1;i<=t;i++){ if(s[i]==0){ cout<<"No"<<endl; } else{ cout<<"Yes"<<endl; } } return 0; } ```
by fmt931200363 @ 2019-01-06 11:37:13


然而没加异或是算法的问题 这个程序根本连循环变量都重了啊
by ix35 @ 2019-01-15 21:17:55


@[__wfx](/space/show?uid=162451) #include<bits/stdc++.h> 万能头
by 取啥名好 @ 2019-05-23 14:13:05


@[__wfx](/user/162451) +1
by 5加1 @ 2020-05-03 11:43:16


|