# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
966212 | 2024-04-19T14:16:25 Z | vjudge1 | XORanges (eJOI19_xoranges) | C++17 | 1000 ms | 4680 KB |
#include <bits/stdc++.h> using namespace std; #define ff(i, a, b) for(auto i=(a); i<=(b); ++i) #define ffr(i, b, a) for(auto i=(b); i>=(a); --i) #define nl "\n" #define ss " " #define sz size() #define pb emplace_back #define pf push_front #define fi first #define se second #define ms(a,x) memset(a, x, sizeof (a)) #define re exit(0) typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<pair<int, int> > vpii; typedef vector<pair<ll, ll> > vpll; const ll mod=1e9+7, maxn=3e5+5, inf=1e18; void rf(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); if(fopen("o.inp","r")){ freopen("o.inp","r",stdin); freopen("o.out","w",stdout); } } int n, q, a[maxn], f[5005][5005]; int main() { rf(); cin>>n>>q; ff(i, 1, n) cin>>a[i]; while(q--) { int op, l, r; cin>>op>>l>>r; if(op==1) a[l]=r; else { int ans=0; ff(i, l, r) ff(j, i, r) ff(k, i, j) ans^=a[k]; cout<<ans<<nl; } } re; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2396 KB | Output is correct |
2 | Correct | 1 ms | 2396 KB | Output is correct |
3 | Correct | 1 ms | 2396 KB | Output is correct |
4 | Correct | 4 ms | 2516 KB | Output is correct |
5 | Correct | 4 ms | 2392 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 396 ms | 2520 KB | Output is correct |
2 | Correct | 337 ms | 2392 KB | Output is correct |
3 | Correct | 444 ms | 2516 KB | Output is correct |
4 | Execution timed out | 1063 ms | 2396 KB | Time limit exceeded |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2396 KB | Output is correct |
2 | Correct | 1 ms | 2396 KB | Output is correct |
3 | Correct | 1 ms | 2396 KB | Output is correct |
4 | Correct | 4 ms | 2516 KB | Output is correct |
5 | Correct | 4 ms | 2392 KB | Output is correct |
6 | Correct | 396 ms | 2520 KB | Output is correct |
7 | Correct | 337 ms | 2392 KB | Output is correct |
8 | Correct | 444 ms | 2516 KB | Output is correct |
9 | Execution timed out | 1063 ms | 2396 KB | Time limit exceeded |
10 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1022 ms | 4680 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2396 KB | Output is correct |
2 | Correct | 1 ms | 2396 KB | Output is correct |
3 | Correct | 1 ms | 2396 KB | Output is correct |
4 | Correct | 4 ms | 2516 KB | Output is correct |
5 | Correct | 4 ms | 2392 KB | Output is correct |
6 | Correct | 396 ms | 2520 KB | Output is correct |
7 | Correct | 337 ms | 2392 KB | Output is correct |
8 | Correct | 444 ms | 2516 KB | Output is correct |
9 | Execution timed out | 1063 ms | 2396 KB | Time limit exceeded |
10 | Halted | 0 ms | 0 KB | - |