# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
882082 |
2023-12-02T15:02:18 Z |
presko |
XOR (IZhO12_xor) |
C++17 |
|
1 ms |
2392 KB |
#include<iostream>
#include<bits/stdc++.h>
#define MAXN 250010
using namespace std;
int a[MAXN];
long long pre[MAXN];
int main()
{
int n,l=0,r=0;
long long x;
ios_base::sync_with_stdio(false);
cin.tie(0);
cin>>n>>x;
for(int i=1;i<=n;i++)
{
cin>>a[i];
pre[i]=pre[i-1]^a[i];
}
for(int i=1;i<=n;i++)
{
for(int j=i;j<=n;j++)
{
long long curr=pre[j]^pre[i-1];
if(curr>=x){l=i;r=j;}
}
}
cout<<l-1<<" "<<r-1<<"\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |