P2197 【模板】Nim 游戏
2026-10-23 19:53:08
发布于:湖北
1阅读
0回复
0点赞
洛谷代码存一下
#include <bits/stdc++.h>
using namespace std;
int main(){
int t;
scanf("%d",&t);
while (t--){
int n,y=0,x;
scanf("%d",&n);
while (n--){
scanf("%d",&x);
y^=x;
}
if (y!=0){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
return 0;
}
这里空空如也




有帮助,赞一个