| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 1005731 | 12345678 | XOR (IZhO12_xor) | C++17 | 1 ms | 348 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;
const int nx=250005;
int n, x, a[nx], qs[nx];
pair<int, int> mx;
int main()
{
    cin.tie(NULL)->sync_with_stdio(false);
    cin>>n>>x;
    for (int i=1; i<=n; i++) cin>>a[i], qs[i]=a[i]^qs[i-1];
    for (int i=1; i<=n; i++)
    {
        for (int j=0; j<i; j++)
        {
            if ((qs[i]^qs[j])>x) mx=max(mx, {i-j, -j-1});
        }
    }
    cout<<-mx.second<<' '<<mx.first;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
