# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
779328 | vjudge1 | XORanges (eJOI19_xoranges) | C++17 | 317 ms | 8124 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
#define int long long
int n, q, opt, x, y, tree[2][200005], a[200005];
// tree[0 / 1] 表示 l 为[偶 / 奇]数时的树状数组
inline int lowbit(int x)
{
return x & (-x);
}
inline void add(int x, int y, int f)
{
while(x <= n) tree[f][x] ^= y, x += lowbit(x);
}
inline void build()
{
for(int i = 1; i <= n; i++)
{
cin >> a[i];
add(i, a[i], i % 2);
}
}
inline int query(int x, int f)
{
int sum = 0;
while(x) sum ^= tree[f][x], x -= lowbit(x);
# | 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... |