Submission #1099434

#TimeUsernameProblemLanguageResultExecution timeMemory
1099434vjudge1XORanges (eJOI19_xoranges)C++17
0 / 100
1062 ms1884 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; int x = 0; for (int i = 1; i <= u - l + 1; i++){ //cout << i << endl; for (int j = l; j <= u - i + 1; j++){ //cout << "j:::::" << j << endl; for (int k = j; k <= j + i - 1; k++){ x ^= a[k]; } } } 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...