Submission #349640

# Submission time Handle Problem Language Result Execution time Memory
349640 2021-01-18T05:17:40 Z juggernaut Game (IOI13_game) C++14
37 / 100
808 ms 63852 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[100];
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 Correct 20 ms 34284 KB Output is correct
3 Correct 21 ms 34284 KB Output is correct
4 Correct 18 ms 31596 KB Output is correct
5 Correct 19 ms 32236 KB Output is correct
6 Correct 20 ms 34156 KB Output is correct
7 Correct 18 ms 31596 KB Output is correct
8 Correct 19 ms 32236 KB Output is correct
9 Correct 21 ms 34284 KB Output is correct
10 Correct 21 ms 33132 KB Output is correct
11 Correct 20 ms 32108 KB Output is correct
12 Correct 19 ms 31596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 31596 KB Output is correct
2 Correct 19 ms 31596 KB Output is correct
3 Correct 20 ms 31724 KB Output is correct
4 Correct 808 ms 36460 KB Output is correct
5 Correct 497 ms 36716 KB Output is correct
6 Correct 762 ms 33388 KB Output is correct
7 Correct 773 ms 33172 KB Output is correct
8 Correct 664 ms 33988 KB Output is correct
9 Correct 766 ms 33260 KB Output is correct
10 Correct 681 ms 32960 KB Output is correct
11 Correct 19 ms 31596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 31596 KB Output is correct
2 Correct 20 ms 34284 KB Output is correct
3 Correct 21 ms 34284 KB Output is correct
4 Correct 20 ms 31724 KB Output is correct
5 Correct 20 ms 32236 KB Output is correct
6 Correct 20 ms 34156 KB Output is correct
7 Correct 19 ms 31596 KB Output is correct
8 Correct 19 ms 32236 KB Output is correct
9 Correct 21 ms 34284 KB Output is correct
10 Correct 20 ms 33132 KB Output is correct
11 Correct 20 ms 32108 KB Output is correct
12 Runtime error 75 ms 63852 KB Execution killed with signal 11 (could be triggered by violating memory limits)
13 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 18 ms 31596 KB Output is correct
2 Correct 21 ms 34284 KB Output is correct
3 Correct 22 ms 34284 KB Output is correct
4 Correct 19 ms 31596 KB Output is correct
5 Correct 20 ms 32236 KB Output is correct
6 Correct 21 ms 34156 KB Output is correct
7 Correct 19 ms 31596 KB Output is correct
8 Correct 19 ms 32236 KB Output is correct
9 Correct 20 ms 34284 KB Output is correct
10 Correct 26 ms 33132 KB Output is correct
11 Correct 19 ms 32108 KB Output is correct
12 Correct 781 ms 36332 KB Output is correct
13 Correct 494 ms 36548 KB Output is correct
14 Correct 754 ms 33220 KB Output is correct
15 Correct 761 ms 33132 KB Output is correct
16 Correct 652 ms 33644 KB Output is correct
17 Correct 783 ms 33164 KB Output is correct
18 Correct 677 ms 32756 KB Output is correct
19 Runtime error 77 ms 63852 KB Execution killed with signal 11 (could be triggered by violating memory limits)
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 19 ms 31596 KB Output is correct
2 Correct 20 ms 34316 KB Output is correct
3 Correct 21 ms 34284 KB Output is correct
4 Correct 19 ms 31596 KB Output is correct
5 Correct 20 ms 32236 KB Output is correct
6 Correct 20 ms 34156 KB Output is correct
7 Correct 18 ms 31596 KB Output is correct
8 Correct 19 ms 32236 KB Output is correct
9 Correct 20 ms 34284 KB Output is correct
10 Correct 20 ms 33132 KB Output is correct
11 Correct 19 ms 32108 KB Output is correct
12 Correct 794 ms 36000 KB Output is correct
13 Correct 493 ms 36076 KB Output is correct
14 Correct 748 ms 32748 KB Output is correct
15 Correct 760 ms 32588 KB Output is correct
16 Correct 667 ms 33332 KB Output is correct
17 Correct 754 ms 32620 KB Output is correct
18 Correct 678 ms 32108 KB Output is correct
19 Runtime error 75 ms 63852 KB Execution killed with signal 11 (could be triggered by violating memory limits)
20 Halted 0 ms 0 KB -