답안 #236860

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
236860 2020-06-03T15:19:02 Z EJOI2019Andrew XORanges (eJOI19_xoranges) C++14
0 / 100
1000 ms 3576 KB
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,q;
cin>>n>>q;
int arr[n];
for(int i=0; i<n; ++i)
cin>>arr[i];
for(int i=0; i<q; ++i)
{
int type;
cin>>type;
if(type==1)
{
int x,y;
cin>>x>>y;
--x;
arr[x]=y;
}
else
{
int x,y;
cin>>x>>y;
--x;
--y;
int ans(0);
for(int j=x; j<=y; ++j)
{
int freq=(j-x+1)*(n-(j-x));
if(freq%2)
ans^=arr[j];
}
cout<<ans<<"\n";
}
}
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 6 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1093 ms 3576 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -