제출 #588831

#제출 시각아이디문제언어결과실행 시간메모리
588831snasibov05XOR (IZhO12_xor)C++14
0 / 100
2067 ms1440 KiB
#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 timeMemoryGrader output
Fetching results...