# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
437373 | Eric_hoo | Game (IOI13_game) | C++14 | 4413 ms | 59476 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 "game.h"
#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define W(x) ((x) ? (x)->w : 0)
#define ID(x, y) (((long long)(x) << 30) + (y))
using namespace std;
inline long long gcd(long long x, long long y) {
while (x && y) {
if (x > y) x = x % y;
else y = y % x;
}
return x | y;
}
struct Node {
long long x; long long y, w; int fix;
int l, r;
Node *lson, *rson;
Node() {fix = rand(), lson = rson = NULL;}
void pushup() {
w = gcd(y, gcd(W(lson), W(rson))), l = r = (x >> 30);
if (lson) l = lson->l;
if (rson) r = rson->r;
}
}NODEPOOL[700000], *NODECUR = NODEPOOL;
typedef pair <Node *, Node *> pnn;
Compilation message (stderr)
# | 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... |