답안 #421835

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
421835 2021-06-09T12:49:55 Z tqbfjotld 푸드 코트 (JOI21_foodcourt) C++14
68 / 100
1000 ms 95556 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long


struct node{
    int s,e;
    int lazymin,lazych;
    int v;
    node *l,*r;
    node (int _s, int _e){
        s = _s; e = _e;
        lazymin = 0; lazych = 0;
        v = 0;
        if (s!=e){
            l = new node(s,(s+e)/2);
            r = new node((s+e)/2+1,e);
        }
    }
    void proc(){
        if (lazymin==0 && lazych==0) return;
        if (s!=e){
            l->lazymin = min(l->lazymin,l->lazych+lazymin);
            l->lazych += lazych;
            r->lazymin = min(r->lazymin,r->lazych+lazymin);
            r->lazych += lazych;
        }
        if (s==e){
            v += lazymin;
            v = max(v,0LL);
            v -= lazymin;
            v += lazych;
        }
        lazymin = 0;
        lazych = 0;
    }
    void inc(int a, int b, int val){
        proc();
        if (a<=s && e<=b){
            lazych += val;
            proc();
            return;
        }
        else if (b<=(s+e)/2){
            l->inc(a,b,val);
        }
        else if (a>(s+e)/2){
            r->inc(a,b,val);
        }
        else{
            l->inc(a,b,val);
            r->inc(a,b,val);
        }
        l->proc();
        r->proc();
    }
    void dec(int a, int b, int val){
        proc();
        if (a<=s && e<=b){
            lazych -= val;
            lazymin = min(lazymin,lazych);
            proc();
            return;
        }
        else if (b<=(s+e)/2){
            l->dec(a,b,val);
        }
        else if (a>(s+e)/2){
            r->dec(a,b,val);
        }
        else{
            l->dec(a,b,val);
            r->dec(a,b,val);
        }
        l->proc(); r->proc();
    }
    int qu(int pos){
        proc();
        if (s==e) return v;
        if (pos>(s+e)/2)return r->qu(pos);
        else return l->qu(pos);
    }
}*root;

struct q_dat{
    int l,r;
    int t,k;
    q_dat(){
        l = 0; r = 0; t = 0; k = 0;
    }
    q_dat(int _l, int _r, int _t, int _k){
        l = _l; r = _r; t = _t; k = _k;
    }
};
//vector<q_dat> query1;
int groupnum[250005];
//vector<q_dat> query2;
vector<pair<pair<int,int>,int> > query3;

int fw[250005];

void upd(int pos, int val){
    while (pos<250005){
        fw[pos] += val;
        pos+=pos&-pos;
    }
}
int qu(int pos){
    int ans = 0;
    while (pos>0){
        ans += fw[pos];
        pos -= pos&-pos;
    }
    return ans;
}

int numt[250005];
int ans[250005];
vector<pair<pair<int,int>,int> > bsvals[250005];
vector<pair<pair<int,int>,int> > bsvals2[250005];

struct node2{
    int s, e;
    int lazyval;
    node2 *l,*r;
    node2 (int _s, int _e){
        s = _s; e = _e;
        lazyval = -1;
        if (s!=e){
            l = new node2(s,(s+e)/2);
            r = new node2((s+e)/2+1,e);
        }
    }
    void proc(){
        if (lazyval==-1) return;
        if (s!=e){
            l->lazyval = lazyval;
            r->lazyval = lazyval;
            lazyval = -1;
        }
    }
    int qu(int pos){
        proc();
        if (s==e) return lazyval;
        if (pos<=(s+e)/2) return l->qu(pos);
        return r->qu(pos);
    }
    void upd(int a, int b, int val){
        proc();
        if (a<=s && e<=b) {
            lazyval = val;
            proc();
            return;
        }
        if (b<=(s+e)/2){
            l->upd(a,b,val);
        }
        else if (a>(s+e)/2){
            r->upd(a,b,val);
        }
        else{
            l->upd(a,b,val);
            r->upd(a,b,val);
        }
    }
}*root2;

int incl[250005];
int incr[250005];
int incamt[250005];
int finans[250005];

main(){
    int n,m,q;
    scanf("%lld%lld%lld",&n,&m,&q);
    root = new node(1,n);
    for (int x = 0; x<q; x++){
        int a;
        scanf("%lld",&a);
        if (a==1){
            int b,c,d,e;
            scanf("%lld%lld%lld%lld",&b,&c,&d,&e);
            groupnum[x] = d;
           // query1.push_back(q_dat(b,c,x,e));
            root->inc(b,c,e);
            upd(b,e);
            upd(c+1,-e);
            incl[x] = b;
            incr[x] = c;
            incamt[x] = e;
        }
        else if (a==2){
            int b,c,d;
            scanf("%lld%lld%lld",&b,&c,&d);
           // query2.push_back(q_dat(b,c,x,d));
            root->dec(b,c,d);
        }
        else if (a==3){
            int b,c;
            scanf("%lld%lld",&b,&c);
            query3.push_back({{b,c},x});
            int num = root->qu(b);
            numt[x] = qu(b)-num+c;
            incl[x] = b;
            if (num<c){
                ans[x] = -1;
            }
            //printf("%lld has %lld\n",b,numpopped[x]);
        }
    }
    for (auto x : query3){
        if (ans[x.second]==-1) continue;
        int a = -1;
        int b = x.second;
        int mid = (a+b)/2;
        bsvals[mid].push_back({{a,b},x.second});
    }
    bool found = true;
    while (found){
        found = false;
        for (int k = 0; k<250005; k++){
            fw[k] = 0;
        }
        for (int t = 0; t<q; t++){
            if (incamt[t]!=0){
                upd(incl[t],incamt[t]);
                upd(incr[t]+1,-incamt[t]);
            }
            for (auto x : bsvals[t]){
                if (x.first.first+1==x.first.second) {
                    ans[x.second] = x.first.second;
                    assert(ans[x.second]<x.second);
                    continue;
                }
                if (qu(incl[x.second])>=numt[x.second]){
                    bsvals2[(x.first.first+t)/2].push_back({{x.first.first,t},x.second});
                }
                else{
                    bsvals2[(x.first.second+t)/2].push_back({{t,x.first.second},x.second});
                }
                found = true;
            }
            bsvals[t].clear();
        }
        swap(bsvals2,bsvals);
    }
    root2 = new node2(1,n);
    vector<pair<pair<int,int>,int> > stuff;
    for (auto x : query3){
        if (ans[x.second]==-1) {
            continue;
        }
        stuff.push_back({{ans[x.second],incl[x.second]},x.second});
    }
    sort(stuff.begin(),stuff.end());
    int curt = 0;
    for (auto x : stuff){
        while (curt<=x.first.first){
            if (incamt[curt]!=0){
                root2->upd(incl[curt],incr[curt],curt);
                //printf("set %lld to %lld with %lld\n",incl[curt],incr[curt],curt);
            }
            curt++;
        }
        finans[x.second] = root2->qu(x.first.second);
        //printf("query %lld = %lld\n",x.first.second,finans[x.second]);
    }
    for (auto x : query3){
       // printf("ans = %lld\n",ans[x.second]);
        if (ans[x.second]==-1){
            printf("0\n");
        }
        else{
            assert(finans[x.second]!=-1);
            printf("%lld\n",groupnum[finans[x.second]]);
        }

    }
}

Compilation message

foodcourt.cpp:173:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
  173 | main(){
      | ^~~~
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:175:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  175 |     scanf("%lld%lld%lld",&n,&m,&q);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:179:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  179 |         scanf("%lld",&a);
      |         ~~~~~^~~~~~~~~~~
foodcourt.cpp:182:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  182 |             scanf("%lld%lld%lld%lld",&b,&c,&d,&e);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:194:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  194 |             scanf("%lld%lld%lld",&b,&c,&d);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:200:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  200 |             scanf("%lld%lld",&b,&c);
      |             ~~~~~^~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 14408 KB Output is correct
2 Correct 30 ms 14620 KB Output is correct
3 Correct 29 ms 14532 KB Output is correct
4 Correct 30 ms 14600 KB Output is correct
5 Correct 28 ms 14200 KB Output is correct
6 Correct 30 ms 14156 KB Output is correct
7 Correct 32 ms 14548 KB Output is correct
8 Correct 30 ms 14660 KB Output is correct
9 Correct 30 ms 14712 KB Output is correct
10 Correct 36 ms 14600 KB Output is correct
11 Correct 30 ms 14660 KB Output is correct
12 Correct 29 ms 14608 KB Output is correct
13 Correct 28 ms 14528 KB Output is correct
14 Correct 27 ms 14660 KB Output is correct
15 Correct 31 ms 14592 KB Output is correct
16 Correct 30 ms 14692 KB Output is correct
17 Correct 29 ms 14464 KB Output is correct
18 Correct 33 ms 14664 KB Output is correct
19 Correct 32 ms 14492 KB Output is correct
20 Correct 29 ms 14568 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 14408 KB Output is correct
2 Correct 30 ms 14620 KB Output is correct
3 Correct 29 ms 14532 KB Output is correct
4 Correct 30 ms 14600 KB Output is correct
5 Correct 28 ms 14200 KB Output is correct
6 Correct 30 ms 14156 KB Output is correct
7 Correct 32 ms 14548 KB Output is correct
8 Correct 30 ms 14660 KB Output is correct
9 Correct 30 ms 14712 KB Output is correct
10 Correct 36 ms 14600 KB Output is correct
11 Correct 30 ms 14660 KB Output is correct
12 Correct 29 ms 14608 KB Output is correct
13 Correct 28 ms 14528 KB Output is correct
14 Correct 27 ms 14660 KB Output is correct
15 Correct 31 ms 14592 KB Output is correct
16 Correct 30 ms 14692 KB Output is correct
17 Correct 29 ms 14464 KB Output is correct
18 Correct 33 ms 14664 KB Output is correct
19 Correct 32 ms 14492 KB Output is correct
20 Correct 29 ms 14568 KB Output is correct
21 Correct 28 ms 14668 KB Output is correct
22 Correct 29 ms 14668 KB Output is correct
23 Correct 28 ms 14540 KB Output is correct
24 Correct 35 ms 14660 KB Output is correct
25 Correct 30 ms 14200 KB Output is correct
26 Correct 31 ms 14412 KB Output is correct
27 Correct 31 ms 14664 KB Output is correct
28 Correct 33 ms 14692 KB Output is correct
29 Correct 29 ms 14576 KB Output is correct
30 Correct 35 ms 14588 KB Output is correct
31 Correct 31 ms 14572 KB Output is correct
32 Correct 31 ms 14572 KB Output is correct
33 Correct 28 ms 14532 KB Output is correct
34 Correct 30 ms 14616 KB Output is correct
35 Correct 28 ms 14536 KB Output is correct
36 Correct 31 ms 14624 KB Output is correct
37 Correct 31 ms 14404 KB Output is correct
38 Correct 30 ms 14532 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 171 ms 31864 KB Output is correct
2 Correct 212 ms 31724 KB Output is correct
3 Correct 176 ms 31912 KB Output is correct
4 Correct 172 ms 31980 KB Output is correct
5 Correct 237 ms 31812 KB Output is correct
6 Correct 189 ms 31796 KB Output is correct
7 Correct 114 ms 20420 KB Output is correct
8 Correct 116 ms 20688 KB Output is correct
9 Correct 165 ms 31572 KB Output is correct
10 Correct 171 ms 31820 KB Output is correct
11 Correct 170 ms 31652 KB Output is correct
12 Correct 200 ms 31752 KB Output is correct
13 Correct 169 ms 29224 KB Output is correct
14 Correct 191 ms 34420 KB Output is correct
15 Correct 211 ms 27556 KB Output is correct
16 Correct 213 ms 32160 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1072 ms 95556 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 14408 KB Output is correct
2 Correct 30 ms 14620 KB Output is correct
3 Correct 29 ms 14532 KB Output is correct
4 Correct 30 ms 14600 KB Output is correct
5 Correct 28 ms 14200 KB Output is correct
6 Correct 30 ms 14156 KB Output is correct
7 Correct 32 ms 14548 KB Output is correct
8 Correct 30 ms 14660 KB Output is correct
9 Correct 30 ms 14712 KB Output is correct
10 Correct 36 ms 14600 KB Output is correct
11 Correct 30 ms 14660 KB Output is correct
12 Correct 29 ms 14608 KB Output is correct
13 Correct 28 ms 14528 KB Output is correct
14 Correct 27 ms 14660 KB Output is correct
15 Correct 31 ms 14592 KB Output is correct
16 Correct 30 ms 14692 KB Output is correct
17 Correct 29 ms 14464 KB Output is correct
18 Correct 33 ms 14664 KB Output is correct
19 Correct 32 ms 14492 KB Output is correct
20 Correct 29 ms 14568 KB Output is correct
21 Correct 171 ms 31864 KB Output is correct
22 Correct 212 ms 31724 KB Output is correct
23 Correct 176 ms 31912 KB Output is correct
24 Correct 172 ms 31980 KB Output is correct
25 Correct 237 ms 31812 KB Output is correct
26 Correct 189 ms 31796 KB Output is correct
27 Correct 114 ms 20420 KB Output is correct
28 Correct 116 ms 20688 KB Output is correct
29 Correct 165 ms 31572 KB Output is correct
30 Correct 171 ms 31820 KB Output is correct
31 Correct 170 ms 31652 KB Output is correct
32 Correct 200 ms 31752 KB Output is correct
33 Correct 169 ms 29224 KB Output is correct
34 Correct 191 ms 34420 KB Output is correct
35 Correct 211 ms 27556 KB Output is correct
36 Correct 213 ms 32160 KB Output is correct
37 Correct 217 ms 34916 KB Output is correct
38 Correct 232 ms 32776 KB Output is correct
39 Correct 108 ms 20324 KB Output is correct
40 Correct 136 ms 21244 KB Output is correct
41 Correct 230 ms 34756 KB Output is correct
42 Correct 272 ms 35952 KB Output is correct
43 Correct 219 ms 35948 KB Output is correct
44 Correct 242 ms 35272 KB Output is correct
45 Correct 241 ms 36020 KB Output is correct
46 Correct 226 ms 35984 KB Output is correct
47 Correct 160 ms 36960 KB Output is correct
48 Correct 189 ms 37028 KB Output is correct
49 Correct 159 ms 28876 KB Output is correct
50 Correct 210 ms 34136 KB Output is correct
51 Correct 250 ms 35324 KB Output is correct
52 Correct 238 ms 35296 KB Output is correct
53 Correct 205 ms 29568 KB Output is correct
54 Correct 196 ms 32184 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 252 ms 36824 KB Output is correct
2 Correct 286 ms 35904 KB Output is correct
3 Correct 263 ms 38444 KB Output is correct
4 Correct 202 ms 34888 KB Output is correct
5 Correct 231 ms 36536 KB Output is correct
6 Correct 277 ms 38428 KB Output is correct
7 Correct 166 ms 22996 KB Output is correct
8 Correct 160 ms 22360 KB Output is correct
9 Correct 204 ms 38280 KB Output is correct
10 Correct 187 ms 33740 KB Output is correct
11 Correct 234 ms 38540 KB Output is correct
12 Correct 231 ms 38332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 14408 KB Output is correct
2 Correct 30 ms 14620 KB Output is correct
3 Correct 29 ms 14532 KB Output is correct
4 Correct 30 ms 14600 KB Output is correct
5 Correct 28 ms 14200 KB Output is correct
6 Correct 30 ms 14156 KB Output is correct
7 Correct 32 ms 14548 KB Output is correct
8 Correct 30 ms 14660 KB Output is correct
9 Correct 30 ms 14712 KB Output is correct
10 Correct 36 ms 14600 KB Output is correct
11 Correct 30 ms 14660 KB Output is correct
12 Correct 29 ms 14608 KB Output is correct
13 Correct 28 ms 14528 KB Output is correct
14 Correct 27 ms 14660 KB Output is correct
15 Correct 31 ms 14592 KB Output is correct
16 Correct 30 ms 14692 KB Output is correct
17 Correct 29 ms 14464 KB Output is correct
18 Correct 33 ms 14664 KB Output is correct
19 Correct 32 ms 14492 KB Output is correct
20 Correct 29 ms 14568 KB Output is correct
21 Correct 28 ms 14668 KB Output is correct
22 Correct 29 ms 14668 KB Output is correct
23 Correct 28 ms 14540 KB Output is correct
24 Correct 35 ms 14660 KB Output is correct
25 Correct 30 ms 14200 KB Output is correct
26 Correct 31 ms 14412 KB Output is correct
27 Correct 31 ms 14664 KB Output is correct
28 Correct 33 ms 14692 KB Output is correct
29 Correct 29 ms 14576 KB Output is correct
30 Correct 35 ms 14588 KB Output is correct
31 Correct 31 ms 14572 KB Output is correct
32 Correct 31 ms 14572 KB Output is correct
33 Correct 28 ms 14532 KB Output is correct
34 Correct 30 ms 14616 KB Output is correct
35 Correct 28 ms 14536 KB Output is correct
36 Correct 31 ms 14624 KB Output is correct
37 Correct 31 ms 14404 KB Output is correct
38 Correct 30 ms 14532 KB Output is correct
39 Correct 171 ms 31864 KB Output is correct
40 Correct 212 ms 31724 KB Output is correct
41 Correct 176 ms 31912 KB Output is correct
42 Correct 172 ms 31980 KB Output is correct
43 Correct 237 ms 31812 KB Output is correct
44 Correct 189 ms 31796 KB Output is correct
45 Correct 114 ms 20420 KB Output is correct
46 Correct 116 ms 20688 KB Output is correct
47 Correct 165 ms 31572 KB Output is correct
48 Correct 171 ms 31820 KB Output is correct
49 Correct 170 ms 31652 KB Output is correct
50 Correct 200 ms 31752 KB Output is correct
51 Correct 169 ms 29224 KB Output is correct
52 Correct 191 ms 34420 KB Output is correct
53 Correct 211 ms 27556 KB Output is correct
54 Correct 213 ms 32160 KB Output is correct
55 Correct 217 ms 34916 KB Output is correct
56 Correct 232 ms 32776 KB Output is correct
57 Correct 108 ms 20324 KB Output is correct
58 Correct 136 ms 21244 KB Output is correct
59 Correct 230 ms 34756 KB Output is correct
60 Correct 272 ms 35952 KB Output is correct
61 Correct 219 ms 35948 KB Output is correct
62 Correct 242 ms 35272 KB Output is correct
63 Correct 241 ms 36020 KB Output is correct
64 Correct 226 ms 35984 KB Output is correct
65 Correct 160 ms 36960 KB Output is correct
66 Correct 189 ms 37028 KB Output is correct
67 Correct 159 ms 28876 KB Output is correct
68 Correct 210 ms 34136 KB Output is correct
69 Correct 250 ms 35324 KB Output is correct
70 Correct 238 ms 35296 KB Output is correct
71 Correct 205 ms 29568 KB Output is correct
72 Correct 196 ms 32184 KB Output is correct
73 Correct 252 ms 36824 KB Output is correct
74 Correct 286 ms 35904 KB Output is correct
75 Correct 263 ms 38444 KB Output is correct
76 Correct 202 ms 34888 KB Output is correct
77 Correct 231 ms 36536 KB Output is correct
78 Correct 277 ms 38428 KB Output is correct
79 Correct 166 ms 22996 KB Output is correct
80 Correct 160 ms 22360 KB Output is correct
81 Correct 204 ms 38280 KB Output is correct
82 Correct 187 ms 33740 KB Output is correct
83 Correct 234 ms 38540 KB Output is correct
84 Correct 231 ms 38332 KB Output is correct
85 Correct 259 ms 33380 KB Output is correct
86 Correct 263 ms 37188 KB Output is correct
87 Correct 257 ms 33924 KB Output is correct
88 Correct 278 ms 35960 KB Output is correct
89 Correct 166 ms 29740 KB Output is correct
90 Correct 243 ms 35944 KB Output is correct
91 Correct 182 ms 29912 KB Output is correct
92 Correct 174 ms 29760 KB Output is correct
93 Correct 244 ms 36088 KB Output is correct
94 Correct 243 ms 35608 KB Output is correct
95 Correct 227 ms 34436 KB Output is correct
96 Correct 288 ms 36032 KB Output is correct
97 Correct 236 ms 35884 KB Output is correct
98 Correct 244 ms 30768 KB Output is correct
99 Correct 182 ms 37160 KB Output is correct
100 Correct 166 ms 33616 KB Output is correct
101 Correct 194 ms 37120 KB Output is correct
102 Correct 209 ms 34376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 14408 KB Output is correct
2 Correct 30 ms 14620 KB Output is correct
3 Correct 29 ms 14532 KB Output is correct
4 Correct 30 ms 14600 KB Output is correct
5 Correct 28 ms 14200 KB Output is correct
6 Correct 30 ms 14156 KB Output is correct
7 Correct 32 ms 14548 KB Output is correct
8 Correct 30 ms 14660 KB Output is correct
9 Correct 30 ms 14712 KB Output is correct
10 Correct 36 ms 14600 KB Output is correct
11 Correct 30 ms 14660 KB Output is correct
12 Correct 29 ms 14608 KB Output is correct
13 Correct 28 ms 14528 KB Output is correct
14 Correct 27 ms 14660 KB Output is correct
15 Correct 31 ms 14592 KB Output is correct
16 Correct 30 ms 14692 KB Output is correct
17 Correct 29 ms 14464 KB Output is correct
18 Correct 33 ms 14664 KB Output is correct
19 Correct 32 ms 14492 KB Output is correct
20 Correct 29 ms 14568 KB Output is correct
21 Correct 28 ms 14668 KB Output is correct
22 Correct 29 ms 14668 KB Output is correct
23 Correct 28 ms 14540 KB Output is correct
24 Correct 35 ms 14660 KB Output is correct
25 Correct 30 ms 14200 KB Output is correct
26 Correct 31 ms 14412 KB Output is correct
27 Correct 31 ms 14664 KB Output is correct
28 Correct 33 ms 14692 KB Output is correct
29 Correct 29 ms 14576 KB Output is correct
30 Correct 35 ms 14588 KB Output is correct
31 Correct 31 ms 14572 KB Output is correct
32 Correct 31 ms 14572 KB Output is correct
33 Correct 28 ms 14532 KB Output is correct
34 Correct 30 ms 14616 KB Output is correct
35 Correct 28 ms 14536 KB Output is correct
36 Correct 31 ms 14624 KB Output is correct
37 Correct 31 ms 14404 KB Output is correct
38 Correct 30 ms 14532 KB Output is correct
39 Correct 171 ms 31864 KB Output is correct
40 Correct 212 ms 31724 KB Output is correct
41 Correct 176 ms 31912 KB Output is correct
42 Correct 172 ms 31980 KB Output is correct
43 Correct 237 ms 31812 KB Output is correct
44 Correct 189 ms 31796 KB Output is correct
45 Correct 114 ms 20420 KB Output is correct
46 Correct 116 ms 20688 KB Output is correct
47 Correct 165 ms 31572 KB Output is correct
48 Correct 171 ms 31820 KB Output is correct
49 Correct 170 ms 31652 KB Output is correct
50 Correct 200 ms 31752 KB Output is correct
51 Correct 169 ms 29224 KB Output is correct
52 Correct 191 ms 34420 KB Output is correct
53 Correct 211 ms 27556 KB Output is correct
54 Correct 213 ms 32160 KB Output is correct
55 Execution timed out 1072 ms 95556 KB Time limit exceeded
56 Halted 0 ms 0 KB -