# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
588831 | snasibov05 | XOR (IZhO12_xor) | C++14 | 2067 ms | 1440 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x; cin >> n >> x;
vector<int> v(n+1);
for (int i = 1; i <= n; ++i) cin >> v[i];
int i = 0, k = 0;
for (int l = 1; l <= n; ++l){
int curx = 0;
for (int r = l; r <= n; ++r) {
curx ^= v[r];
if (curx >= x && r - l + 1 > k) k = r - l + 1, i = l;
}
}
cout << i << " " << k << "\n";
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |