# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
235935 | crossing0ver | Game (IOI13_game) | C++17 | 4797 ms | 256004 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 ll long long
#define tree int v,int tl,int tr
#define tm (tl + tr >> 1)
#define lhs L[v],tl,tm
#define rhs R[v], tm+1,tr
#include "game.h"
using namespace std;
const int N = 2E7;
int L[N],R[N],A[N],id = 1,posx,posy, lx,ly,rx,ry;
ll ans[N],val;
ll get_y (tree) {
if (tr < ly || tl > ry || !v) return 0;
if (tl >= ly && tr <= ry) {
return ans[v];
}
return __gcd ( get_y(lhs),get_y(rhs));
}
ll get_x (tree) {
if (tr < lx || tl > rx ) return 0;
if (tl >= lx && tr <= rx) {
if (!A[v]) return 0;
return get_y(A[v],0,1e9);
}
return __gcd ( get_x (lhs), get_x(rhs));
}
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... |