# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
173425 | errorgorn | Game (IOI13_game) | C++14 | 5236 ms | 48516 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 <cstdio>
#include <utility>
using namespace std;
typedef pair<int,int> ii;
inline long long func(long long X, long long Y) {
long long tmp;
while (X != Y && Y != 0) {
tmp = X;
X = Y;
Y = tmp % Y;
}
return X;
}
ii lca(int s,int e,int l,int r,int pos){
int m=s+e>>1;
if (r<=m && m<pos) return ii(s,e);
else if (pos<=m && m<l) return ii(s,e);
if (pos<=m) return lca(s,m,l,r,pos);
else return lca(m+1,e,l,r,pos);
}
struct node{
int s,e,m;
long long val=0;
node *l=nullptr,*r=nullptr;
node (int _s,int _e){
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... |