Submission #1019283

#TimeUsernameProblemLanguageResultExecution timeMemory
1019283andrewpXOR (IZhO12_xor)C++17
0 / 100
2079 ms1624 KiB
//Dedicated to my love, ivaziva #include <bits/stdc++.h> using namespace std; #define ll long long #define ar array #define DBG(x) cout << #x << "= " << x << "\n" const int mxN=2.5e5+1; int n, x; int a[mxN]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n >> x; for(int i=1; i<=n; ++i) cin >> a[i]; int ans=0, p=0; for(int i=1; i<=n; ++i) { int xr=0; for(int j=i; j<=n; j++) { xr^=a[j]; if(xr>=x) { if(j-i+1>ans) { ans=j-i+1; p=i; } } } } cout << p << " " << ans << "\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...