xoranges.cpp:1:25: warning: extra tokens at end of #include directive
1 | #include <bits/stdc++.h>#define el '\n'#define fi first#define sc second#define int ll#define pii pair<int, int>#define all(v) v.begin(), v.end()using namespace std;using ll=long long;using ull=unsigned long long;using ld=long double;const int mod=1e9+7;const int N=2e5+11;int n, q, x, l, r, tt;struct segtree{ int nod[4*N]; segtree() { memset(nod, 0, sizeof nod); } void update(int id, int l, int r, int pos, int val) { if(l==r) { nod[id]=val; return; } int mid=(l+r)/2; if(pos<=mid) update(id*2, l, mid, pos, val); else update(id*2+1, mid+1, r, pos, val); nod[id]=nod[id*2]^nod[id*2+1]; } int get(int id, int l, int r, int u, int v) { if(r<u || v<l) return 0; if(u<=l && r<=v) return nod[id]; int mid=(l+r)/2; return get(id*2, l, mid, u, v) ^ get(id*2+1, mid+1, r, u, v); }} seg1, seg2;void sol(){ cin >> n >> q; for(int i=1; i<=n; i++) { cin >> x; if(i&1) seg1.update(1, 1, n, i/2+1, x); else seg2.update(1, 1, n, i/2, x); } while(q--) { cin >> tt >> l >> r; if(tt==1) { if(l&1) seg1.update(1, 1, n, l/2+1, r); else seg2.update(1, 1, n, l/2, r); } else { int sz=r-l+1; if(sz%2==0) cout << 0 << el; else { if(l&1) cout << seg1.get(1, 1, n, l/2+1, l/2+1+sz/2) << el; else cout << seg2.get(1, 1, n, l/2, l/2+sz/2) << el; } } }}signed main(){// freopen("divisor.INP", "r", stdin);// freopen("divisor.OUT", "w", stdout); ios_base::sync_with_stdio(0); cin.tie(0); int t=1; //cin >> t; while(t--) { sol(); }}
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status