Submission #1099431

#TimeUsernameProblemLanguageResultExecution timeMemory
1099431vjudge1XORanges (eJOI19_xoranges)C++17
0 / 100
1027 ms6844 KiB
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int n, q; cin >> n >> q; vector<int> a(n + 1); for (int i = 1; i <= n; i++){ cin >> a[i]; } while(q--){ int t, l, u; cin >> t >> l >> u; if ((u - t + 1) % 2 == 0){ cout << 0 << endl; }else{ int x = 0; for (int i = l; i <= u; i += 2){ x ^= a[i]; } cout << x << endl; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...