# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
452036 | lukadupli | XORanges (eJOI19_xoranges) | C++14 | 91 ms | 4580 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>
#define f first
#define s second
using namespace std;
typedef pair <int, int> pii;
const int MAX = 1 << 18;
int n, q, arr[MAX];
pair <int, pii> nodes[2 * MAX];
struct tournament
{
pair <int, pii> merge_nodes(pair <int, pii> node1, int l1, int r1, pair <int, pii> node2, int l2, int r2){
pair <int, pii> res;
res.f = node1.f ^ node2.f;
if(r2 - l2 == 1) res.f ^= node1.s.f;
if(r1 - l1 == 1) res.f ^= node2.s.s;
if(r1 - l1 == 1 && r2 - l2 == 1){
res.s.f = node1.s.f;
res.s.s = node2.s.s;
}
else if(r1 - l1 == 1){
res.s.f = node1.s.f ^ node2.s.s;
res.s.s = node2.s.f;
# | 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... |