#include <bits/stdc++.h>
#define int long long
#define ll long long
#define ld long double
using namespace std;
const int mxn = 1005;
const int SQRT = 500;
const int LOG = 20;
const int inf = 1e18;
const int mod = 998244353;
const ld eps = 1e-9;
int n;
int A[mxn];
vector<pair<int,int> >res;
void solve(int T){
int n;
cin>>n;
int A[n];
for(int i = 0;i<n;i++)cin>>A[i];
int op;
cin>>op;
while(op--){
int a,b;
cin>>a>>b;
a--;
b--;
A[a] ^= A[b];
}
for(int i = 0;i<n;i++)cout<<A[i]<<" ";
cout<<endl;
}
int32_t main(){
#ifdef ONLINE_JUDGE
ios::sync_with_stdio(false);
cin.tie(0);
#endif
int t = 1;
//cin>>t;
for(int i = 1;i<=t;i++)solve(i);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |