| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1179632 | mishasim | XORanges (eJOI19_xoranges) | C++20 | 1095 ms | 2212 KiB |
#include <iostream>
using namespace std;
#define endl '\n'
long long n,q,k[200005],res,op,l,u;
int main()
{
ios_base :: sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin>>n>>q;
for(int i = 1 ; i<=n ; i++)
{
cin>>k[i];
}
for(int i = 1 ; i<=q ; i++)
{
cin>>op>>l>>u;
if(op==1)k[l] = u;
else
{
res = 0;
for(int j = l ; j<=u ; j++)
{
if((j-l+1)*(u-j+1)%2!=0)res = (res^k[j]);
}
cout<<res<<endl;
}
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
