# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
372846 | errorgorn | Game (IOI13_game) | C++17 | 2801 ms | 48620 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 l,int r,int pos){ //find lca of 2 nodes
if (pos<l){
int p=32-__builtin_clz(pos^l);
int lp=(pos>>p)<<p;
return ii(lp,lp+(1<<p)-1);
}
if (r<pos){
int p=32-__builtin_clz(r^pos);
int lp=(l>>p)<<p;
return ii(lp,lp+(1<<p)-1);
}
}
struct node{
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... |