# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
400296 | Antekb | Game (IOI13_game) | C++14 | 6531 ms | 53752 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>
using namespace std;
typedef long long ll;
const int N=(1<<30), M=21142005, K=682005;
long long gcd2(long long X, long long Y) {
long long tmp;
while (X != Y && Y != 0) {
tmp = X;
X = Y;
Y = tmp % Y;
}
return X;
}
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
struct node{
node* l=nullptr, *r=nullptr;
int rank, key;
ll val, g;
node(int _key, ll _val): key(_key), val(_val), g(_val) {rank=rng();}
void upd(){
g=val;
if(l)g=gcd2(l->g, g);
if(r)g=gcd2(r->g, g);
}
};
node* merge(node* u, node* v){
# | 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... |