Code:
#include<iostream> using namespace std; int main(){ int t; cin>>t; while(t--){ int ans=0,n; scanf("%d",&n); for(int i=1;i<=n;++i){ int a; scanf("%d",&a); ans^=a; } if(!ans) printf("No "); else printf("Yes "); } return 0; }
Code:
#include<iostream> using namespace std; int main(){ int t; cin>>t; while(t--){ int ans=0,n; scanf("%d",&n); for(int i=1;i<=n;++i){ int a; scanf("%d",&a); ans^=a; } if(!ans) printf("No "); else printf("Yes "); } return 0; }