View Code of Problem 3929

#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main() {
    int t;
    cin>>t;
    for(int i=0;i<t;i++){
        int n;
        cin>>n;
        int res=0;
        for(int j=0;j<n;j++){
            int temp;
            cin>>temp;
            res^=temp;
            cout<<res;
        }
        cout<<res<<endl;


    }
    return 0;
}

Double click to view unformatted code.


Back to problem 3929