# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
882088 | presko | XOR (IZhO12_xor) | C++14 | 0 ms | 2396 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<iostream>
#include<bits/stdc++.h>
#define MAXN 250010
using namespace std;
int a[MAXN];
long long pre[MAXN];
int main()
{
int n,st=1;
long long x,best=0,curr=0;
ios_base::sync_with_stdio(false);
cin.tie(0);
cin>>n>>x;
for(int i=1;i<=n;i++)
{
cin>>a[i];
curr^=a[i];
best++;
if(curr<x){curr^=a[st];st++;best--;}
}
cout<<st<<" "<<best<<"\n";
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |