# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
16832 | comet | Game (IOI13_game) | C++98 | 7724 ms | 99716 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>
#include "game.h"
using namespace std;
typedef long long ll;
ll gcd2(ll,ll);
int R,C;
struct Node{
int s,e;
ll GCD;
Node *LL,*RR,*p;
Node(int s_,int e_):s(s_),e(e_){
GCD=0;
LL=RR=p=NULL;
}
~Node(){
if(LL!=NULL)delete LL;
if(RR!=NULL)delete RR;
}
void up(){
ll z0=0,z1=0;
if(LL!=NULL)z0=LL->GCD;
if(RR!=NULL)z1=RR->GCD;
GCD=gcd2(z0,z1);
}
void update(int x,ll c){
int mid=(s+e)/2;
if(x<s||x>e){
int pL=p->s,pR=p->e,L,R;
L=pL,R=pR;
while(L<=s&&e<=R){
# | 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... |