UVa 10165 - Stone Game Solution

#include <iostream>
using namespace std;
int main(){
    int n;
    while(cin>>n&&n){
        int ans=0,now;
        while(n--){
            cin>>now;
            ans^=now;
        }
        if(ans)
            cout<<"Yes"<<endl;
        else
            cout<<"No"<<endl;
    }
}

Comments