# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
349626 |
2021-01-18T03:38:11 Z |
juggernaut |
Game (IOI13_game) |
C++14 |
|
806 ms |
63980 KB |
#include"game.h"
#include<bits/stdc++.h>
#ifndef EVAL
#include"grader.c"
#endif
using namespace std;
struct jfkdjflsfjldks{
long long tree[400005];
void build(){
for(int i=0;i<400005;i++)tree[i]=0;
}
long long get(int v,int l,int r,int ql,int qr){
if(qr<l||r<ql)return 0ll;
if(ql<=l&&r<=qr)return tree[v];
int mid=(l+r)>>1;
return __gcd(get(v<<1,l,mid,ql,qr),get(v<<1|1,mid+1,r,ql,qr));
}
void update(int v,int l,int r,int pos,long long val){
if(l==r){
tree[v]=val;
return;
}
int mid=(l+r)>>1;
if(pos<=mid)update(v<<1,l,mid,pos,val);
else update(v<<1|1,mid+1,r,pos,val);
tree[v]=__gcd(tree[v<<1],tree[v<<1|1]);
}
}tree[10];
void init(int R,int C){
for(int i=0;i<10;i++)tree[i].build();
}
void update(int P,int Q,long long K){
tree[P].update(1,0,100000,Q,K);
}
long long calculate(int P,int Q,int U,int V){
long long res=0;
for(int i=P;i<=U;i++)
res=__gcd(res,tree[i].get(1,0,100000,Q,V));
return res;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
31596 KB |
Output is correct |
2 |
Runtime error |
61 ms |
63980 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
31596 KB |
Output is correct |
2 |
Correct |
18 ms |
31596 KB |
Output is correct |
3 |
Correct |
19 ms |
31596 KB |
Output is correct |
4 |
Correct |
806 ms |
40300 KB |
Output is correct |
5 |
Correct |
494 ms |
40044 KB |
Output is correct |
6 |
Correct |
761 ms |
37356 KB |
Output is correct |
7 |
Correct |
767 ms |
37248 KB |
Output is correct |
8 |
Correct |
676 ms |
37612 KB |
Output is correct |
9 |
Correct |
769 ms |
37192 KB |
Output is correct |
10 |
Correct |
691 ms |
36844 KB |
Output is correct |
11 |
Correct |
18 ms |
31596 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
31684 KB |
Output is correct |
2 |
Runtime error |
61 ms |
63852 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
31596 KB |
Output is correct |
2 |
Runtime error |
62 ms |
63852 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
31596 KB |
Output is correct |
2 |
Runtime error |
60 ms |
63852 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
3 |
Halted |
0 ms |
0 KB |
- |