Submission #650310

# Submission time Handle Problem Language Result Execution time Memory
650310 2022-10-13T13:13:19 Z Kenpar XORanges (eJOI19_xoranges) C++17
0 / 100
1000 ms 5476 KB
#include "bits/stdc++.h"
using namespace std;
 
#define ll long long
#define endl '\n'

const ll MOD = 1e9+7;
const ll INF = 1e16;
const int INT_INF = 1e9;
const ll MAX = 1e6+1;

void solve(){
	ll n,q;
	cin>>n>>q;

	ll arr[n];

	for(int i = 0; i < n; i++) cin>>arr[i];

	while(q--){
		ll a,b,c;
		cin>>a>>b>>c;

		
		if(a == 2){
			b--;
			c--;
			ll ans = 0;
			for(int i = b; i <= c; i+=2){
				ans ^= arr[i];
			}

			cout<<ans<<endl;
		}else{
			arr[b-1] = c;
		}
	}
}
 
 
int main()
{
	cin.tie(NULL);
	ios::sync_with_stdio(NULL);
	int t = 1;
 
	//cin >> t;
 
	while(t--){
		solve();
		cout<<endl;
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1085 ms 5476 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -