Submission #1003497

# Submission time Handle Problem Language Result Execution time Memory
1003497 2024-06-20T11:56:21 Z 79brue Food Court (JOI21_foodcourt) C++17
100 / 100
334 ms 61008 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
const ll INF = 1e18;

struct segTree1{
    ll ta[1<<19], tb[1<<19];

    void update(int i, int l, int r, int x, ll v){
        if(l==r){
            if(v >= 0) ta[i] = v, tb[i] = 0;
            else ta[i] = 0, tb[i] = -v;
            return;
        }
        int m = (l+r)>>1;
        if(x<=m) update(i*2, l, m, x, v);
        else update(i*2+1, m+1, r, x, v);
        ta[i] = ta[i*2+1] + max(0LL, ta[i*2] - tb[i*2+1]);
        tb[i] = ta[i] + tb[i*2] + tb[i*2+1] - ta[i*2] - ta[i*2+1];
    }

    ll query(int i, int l, int r, int x, ll v=0){
        if(l==r) return ta[i] + max(0LL, v - tb[i]);
        int m = (l+r)>>1;
        if(x<=m) return query(i*2, l, m, x, v);
        else return query(i*2+1, m+1, r, x, ta[i*2] + max(0LL, v - tb[i*2]));
    }
} tree1;

struct segTree2{
    int n;
    ll tree[250002];

    void init(int _n){
        n = _n;
        for(int i=1; i<=n; i++) tree[i] = 0;
    }

    void add(int x, ll v){
        while(x<=n){
            tree[x] += v;
            x += x&-x;
        }
    }

    ll sum(int x){
        ll ret = 0;
        while(x){
            ret += tree[x];
            x -= x&-x;
        }
        return ret;
    }
} tree2;

struct segTree3{
    ll sum[1<<19];

    void update(int i, int l, int r, int x, ll v){
        if(l==r){
            sum[i] = v;
            return;
        }
        int m = (l+r)>>1;
        if(x<=m) update(i*2, l, m, x, v);
        else update(i*2+1, m+1, r, x, v);
        sum[i] = sum[i*2] + sum[i*2+1];
    }

    int query(int i, int l, int r, ll v){
        if(l==r) return l;
        int m = (l+r)>>1;
        if(sum[i*2] >= v) return query(i*2, l, m, v);
        else return query(i*2+1, m+1, r, v - sum[i*2]);
    }
} tree3;

int n, m, q;
int qt[250002], ql[250002], qr[250002], qx[250002];
ll qk[250002];
ll qsz[250002], qall[250002], ord[250002];
vector<int> queries[250002];
vector<int> in[250002], out[250002];
int ans[250002];

int main(){
    scanf("%d %d %d", &n, &m, &q);
    for(int i=1; i<=q; i++){
        scanf("%d", &qt[i]);
        if(qt[i] == 1){
            scanf("%d %d %d %lld", &ql[i], &qr[i], &qx[i], &qk[i]);
            in[ql[i]].push_back(i);
            out[qr[i]].push_back(i);
        }
        else if(qt[i] == 2){
            scanf("%d %d %lld", &ql[i], &qr[i], &qk[i]);
            in[ql[i]].push_back(i);
            out[qr[i]].push_back(i);
        }
        else if(qt[i] == 3){
            scanf("%d %lld", &qx[i], &qk[i]);
            queries[qx[i]].push_back(i);
        }
    }

    /// 위치를 찾기
    for(int i=1; i<=n; i++){
        for(int p: in[i]) tree1.update(1, 1, q, p, qt[p] == 1 ? qk[p] : -qk[p]);
        for(int p: queries[i]) qsz[p] = tree1.query(1, 1, q, p);
        for(int p: out[i]) tree1.update(1, 1, q, p, 0);
    }

    /// 크기를 찾기
    tree2.init(n);
    for(int i=1; i<=q; i++){
        if(qt[i] == 1) tree2.add(ql[i], qk[i]), tree2.add(qr[i]+1, -qk[i]);
        else if(qt[i] == 3) qall[i] = tree2.sum(qx[i]);
    }

    for(int i=1; i<=q; i++){
        if(qt[i] != 3) continue;
        if(qk[i] <= qsz[i]) ord[i] = qall[i] - qsz[i] + qk[i];
    }

    /// 답을 찾기
    for(int i=1; i<=n; i++){
        for(int p: in[i]) if(qt[p] == 1) tree3.update(1, 1, q, p, qk[p]);
        for(int p: queries[i]){
            if(ord[p] == 0) continue;
            ans[p] = qx[tree3.query(1, 1, q, ord[p])];
        }
        for(int p: out[i]) if(qt[p] == 1) tree3.update(1, 1, q, p, 0);
    }

    for(int i=1; i<=q; i++) if(qt[i] == 3) printf("%d\n", ans[i]);
}

Compilation message

foodcourt.cpp: In function 'int main()':
foodcourt.cpp:89:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   89 |     scanf("%d %d %d", &n, &m, &q);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:91:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   91 |         scanf("%d", &qt[i]);
      |         ~~~~~^~~~~~~~~~~~~~
foodcourt.cpp:93:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   93 |             scanf("%d %d %d %lld", &ql[i], &qr[i], &qx[i], &qk[i]);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:98:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   98 |             scanf("%d %d %lld", &ql[i], &qr[i], &qk[i]);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:103:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  103 |             scanf("%d %lld", &qx[i], &qk[i]);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 9 ms 18264 KB Output is correct
2 Correct 8 ms 18268 KB Output is correct
3 Correct 8 ms 18268 KB Output is correct
4 Correct 10 ms 18268 KB Output is correct
5 Correct 7 ms 18240 KB Output is correct
6 Correct 8 ms 18520 KB Output is correct
7 Correct 8 ms 18268 KB Output is correct
8 Correct 9 ms 18248 KB Output is correct
9 Correct 8 ms 18268 KB Output is correct
10 Correct 7 ms 18268 KB Output is correct
11 Correct 8 ms 18344 KB Output is correct
12 Correct 8 ms 18268 KB Output is correct
13 Correct 8 ms 18332 KB Output is correct
14 Correct 9 ms 18524 KB Output is correct
15 Correct 7 ms 18208 KB Output is correct
16 Correct 8 ms 18232 KB Output is correct
17 Correct 8 ms 18268 KB Output is correct
18 Correct 9 ms 18268 KB Output is correct
19 Correct 9 ms 18268 KB Output is correct
20 Correct 8 ms 18268 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 18264 KB Output is correct
2 Correct 8 ms 18268 KB Output is correct
3 Correct 8 ms 18268 KB Output is correct
4 Correct 10 ms 18268 KB Output is correct
5 Correct 7 ms 18240 KB Output is correct
6 Correct 8 ms 18520 KB Output is correct
7 Correct 8 ms 18268 KB Output is correct
8 Correct 9 ms 18248 KB Output is correct
9 Correct 8 ms 18268 KB Output is correct
10 Correct 7 ms 18268 KB Output is correct
11 Correct 8 ms 18344 KB Output is correct
12 Correct 8 ms 18268 KB Output is correct
13 Correct 8 ms 18332 KB Output is correct
14 Correct 9 ms 18524 KB Output is correct
15 Correct 7 ms 18208 KB Output is correct
16 Correct 8 ms 18232 KB Output is correct
17 Correct 8 ms 18268 KB Output is correct
18 Correct 9 ms 18268 KB Output is correct
19 Correct 9 ms 18268 KB Output is correct
20 Correct 8 ms 18268 KB Output is correct
21 Correct 8 ms 18268 KB Output is correct
22 Correct 8 ms 18332 KB Output is correct
23 Correct 8 ms 18452 KB Output is correct
24 Correct 8 ms 18264 KB Output is correct
25 Correct 8 ms 18268 KB Output is correct
26 Correct 8 ms 18388 KB Output is correct
27 Correct 8 ms 18268 KB Output is correct
28 Correct 7 ms 18364 KB Output is correct
29 Correct 8 ms 18464 KB Output is correct
30 Correct 8 ms 18268 KB Output is correct
31 Correct 12 ms 18220 KB Output is correct
32 Correct 9 ms 18408 KB Output is correct
33 Correct 8 ms 18268 KB Output is correct
34 Correct 7 ms 18268 KB Output is correct
35 Correct 7 ms 18268 KB Output is correct
36 Correct 7 ms 18204 KB Output is correct
37 Correct 8 ms 18188 KB Output is correct
38 Correct 11 ms 18436 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 67 ms 27420 KB Output is correct
2 Correct 78 ms 27780 KB Output is correct
3 Correct 61 ms 27624 KB Output is correct
4 Correct 59 ms 27704 KB Output is correct
5 Correct 61 ms 27728 KB Output is correct
6 Correct 62 ms 27732 KB Output is correct
7 Correct 33 ms 25192 KB Output is correct
8 Correct 34 ms 25408 KB Output is correct
9 Correct 61 ms 27480 KB Output is correct
10 Correct 57 ms 27492 KB Output is correct
11 Correct 61 ms 27528 KB Output is correct
12 Correct 61 ms 27476 KB Output is correct
13 Correct 54 ms 27280 KB Output is correct
14 Correct 59 ms 28244 KB Output is correct
15 Correct 62 ms 27476 KB Output is correct
16 Correct 64 ms 28348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 254 ms 55376 KB Output is correct
2 Correct 191 ms 52452 KB Output is correct
3 Correct 270 ms 60348 KB Output is correct
4 Correct 224 ms 52936 KB Output is correct
5 Correct 208 ms 52308 KB Output is correct
6 Correct 273 ms 59984 KB Output is correct
7 Correct 127 ms 49344 KB Output is correct
8 Correct 126 ms 49276 KB Output is correct
9 Correct 268 ms 59708 KB Output is correct
10 Correct 274 ms 59736 KB Output is correct
11 Correct 275 ms 57696 KB Output is correct
12 Correct 284 ms 59728 KB Output is correct
13 Correct 275 ms 57936 KB Output is correct
14 Correct 283 ms 59732 KB Output is correct
15 Correct 289 ms 59528 KB Output is correct
16 Correct 278 ms 59576 KB Output is correct
17 Correct 293 ms 59632 KB Output is correct
18 Correct 265 ms 58708 KB Output is correct
19 Correct 271 ms 59728 KB Output is correct
20 Correct 286 ms 58852 KB Output is correct
21 Correct 297 ms 59540 KB Output is correct
22 Correct 293 ms 59476 KB Output is correct
23 Correct 279 ms 59476 KB Output is correct
24 Correct 274 ms 59472 KB Output is correct
25 Correct 233 ms 54464 KB Output is correct
26 Correct 214 ms 55380 KB Output is correct
27 Correct 247 ms 58528 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 18264 KB Output is correct
2 Correct 8 ms 18268 KB Output is correct
3 Correct 8 ms 18268 KB Output is correct
4 Correct 10 ms 18268 KB Output is correct
5 Correct 7 ms 18240 KB Output is correct
6 Correct 8 ms 18520 KB Output is correct
7 Correct 8 ms 18268 KB Output is correct
8 Correct 9 ms 18248 KB Output is correct
9 Correct 8 ms 18268 KB Output is correct
10 Correct 7 ms 18268 KB Output is correct
11 Correct 8 ms 18344 KB Output is correct
12 Correct 8 ms 18268 KB Output is correct
13 Correct 8 ms 18332 KB Output is correct
14 Correct 9 ms 18524 KB Output is correct
15 Correct 7 ms 18208 KB Output is correct
16 Correct 8 ms 18232 KB Output is correct
17 Correct 8 ms 18268 KB Output is correct
18 Correct 9 ms 18268 KB Output is correct
19 Correct 9 ms 18268 KB Output is correct
20 Correct 8 ms 18268 KB Output is correct
21 Correct 67 ms 27420 KB Output is correct
22 Correct 78 ms 27780 KB Output is correct
23 Correct 61 ms 27624 KB Output is correct
24 Correct 59 ms 27704 KB Output is correct
25 Correct 61 ms 27728 KB Output is correct
26 Correct 62 ms 27732 KB Output is correct
27 Correct 33 ms 25192 KB Output is correct
28 Correct 34 ms 25408 KB Output is correct
29 Correct 61 ms 27480 KB Output is correct
30 Correct 57 ms 27492 KB Output is correct
31 Correct 61 ms 27528 KB Output is correct
32 Correct 61 ms 27476 KB Output is correct
33 Correct 54 ms 27280 KB Output is correct
34 Correct 59 ms 28244 KB Output is correct
35 Correct 62 ms 27476 KB Output is correct
36 Correct 64 ms 28348 KB Output is correct
37 Correct 53 ms 27640 KB Output is correct
38 Correct 55 ms 26960 KB Output is correct
39 Correct 31 ms 24900 KB Output is correct
40 Correct 35 ms 25388 KB Output is correct
41 Correct 59 ms 27732 KB Output is correct
42 Correct 59 ms 28248 KB Output is correct
43 Correct 59 ms 28172 KB Output is correct
44 Correct 63 ms 27988 KB Output is correct
45 Correct 58 ms 28408 KB Output is correct
46 Correct 65 ms 28240 KB Output is correct
47 Correct 52 ms 26696 KB Output is correct
48 Correct 51 ms 27220 KB Output is correct
49 Correct 45 ms 26116 KB Output is correct
50 Correct 52 ms 27476 KB Output is correct
51 Correct 60 ms 28240 KB Output is correct
52 Correct 60 ms 28240 KB Output is correct
53 Correct 53 ms 27216 KB Output is correct
54 Correct 73 ms 28752 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 57 ms 28240 KB Output is correct
2 Correct 67 ms 28752 KB Output is correct
3 Correct 61 ms 28824 KB Output is correct
4 Correct 46 ms 26704 KB Output is correct
5 Correct 53 ms 27928 KB Output is correct
6 Correct 60 ms 28752 KB Output is correct
7 Correct 35 ms 25932 KB Output is correct
8 Correct 34 ms 25556 KB Output is correct
9 Correct 48 ms 27756 KB Output is correct
10 Correct 50 ms 25892 KB Output is correct
11 Correct 57 ms 27728 KB Output is correct
12 Correct 55 ms 27856 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 18264 KB Output is correct
2 Correct 8 ms 18268 KB Output is correct
3 Correct 8 ms 18268 KB Output is correct
4 Correct 10 ms 18268 KB Output is correct
5 Correct 7 ms 18240 KB Output is correct
6 Correct 8 ms 18520 KB Output is correct
7 Correct 8 ms 18268 KB Output is correct
8 Correct 9 ms 18248 KB Output is correct
9 Correct 8 ms 18268 KB Output is correct
10 Correct 7 ms 18268 KB Output is correct
11 Correct 8 ms 18344 KB Output is correct
12 Correct 8 ms 18268 KB Output is correct
13 Correct 8 ms 18332 KB Output is correct
14 Correct 9 ms 18524 KB Output is correct
15 Correct 7 ms 18208 KB Output is correct
16 Correct 8 ms 18232 KB Output is correct
17 Correct 8 ms 18268 KB Output is correct
18 Correct 9 ms 18268 KB Output is correct
19 Correct 9 ms 18268 KB Output is correct
20 Correct 8 ms 18268 KB Output is correct
21 Correct 8 ms 18268 KB Output is correct
22 Correct 8 ms 18332 KB Output is correct
23 Correct 8 ms 18452 KB Output is correct
24 Correct 8 ms 18264 KB Output is correct
25 Correct 8 ms 18268 KB Output is correct
26 Correct 8 ms 18388 KB Output is correct
27 Correct 8 ms 18268 KB Output is correct
28 Correct 7 ms 18364 KB Output is correct
29 Correct 8 ms 18464 KB Output is correct
30 Correct 8 ms 18268 KB Output is correct
31 Correct 12 ms 18220 KB Output is correct
32 Correct 9 ms 18408 KB Output is correct
33 Correct 8 ms 18268 KB Output is correct
34 Correct 7 ms 18268 KB Output is correct
35 Correct 7 ms 18268 KB Output is correct
36 Correct 7 ms 18204 KB Output is correct
37 Correct 8 ms 18188 KB Output is correct
38 Correct 11 ms 18436 KB Output is correct
39 Correct 67 ms 27420 KB Output is correct
40 Correct 78 ms 27780 KB Output is correct
41 Correct 61 ms 27624 KB Output is correct
42 Correct 59 ms 27704 KB Output is correct
43 Correct 61 ms 27728 KB Output is correct
44 Correct 62 ms 27732 KB Output is correct
45 Correct 33 ms 25192 KB Output is correct
46 Correct 34 ms 25408 KB Output is correct
47 Correct 61 ms 27480 KB Output is correct
48 Correct 57 ms 27492 KB Output is correct
49 Correct 61 ms 27528 KB Output is correct
50 Correct 61 ms 27476 KB Output is correct
51 Correct 54 ms 27280 KB Output is correct
52 Correct 59 ms 28244 KB Output is correct
53 Correct 62 ms 27476 KB Output is correct
54 Correct 64 ms 28348 KB Output is correct
55 Correct 53 ms 27640 KB Output is correct
56 Correct 55 ms 26960 KB Output is correct
57 Correct 31 ms 24900 KB Output is correct
58 Correct 35 ms 25388 KB Output is correct
59 Correct 59 ms 27732 KB Output is correct
60 Correct 59 ms 28248 KB Output is correct
61 Correct 59 ms 28172 KB Output is correct
62 Correct 63 ms 27988 KB Output is correct
63 Correct 58 ms 28408 KB Output is correct
64 Correct 65 ms 28240 KB Output is correct
65 Correct 52 ms 26696 KB Output is correct
66 Correct 51 ms 27220 KB Output is correct
67 Correct 45 ms 26116 KB Output is correct
68 Correct 52 ms 27476 KB Output is correct
69 Correct 60 ms 28240 KB Output is correct
70 Correct 60 ms 28240 KB Output is correct
71 Correct 53 ms 27216 KB Output is correct
72 Correct 73 ms 28752 KB Output is correct
73 Correct 57 ms 28240 KB Output is correct
74 Correct 67 ms 28752 KB Output is correct
75 Correct 61 ms 28824 KB Output is correct
76 Correct 46 ms 26704 KB Output is correct
77 Correct 53 ms 27928 KB Output is correct
78 Correct 60 ms 28752 KB Output is correct
79 Correct 35 ms 25932 KB Output is correct
80 Correct 34 ms 25556 KB Output is correct
81 Correct 48 ms 27756 KB Output is correct
82 Correct 50 ms 25892 KB Output is correct
83 Correct 57 ms 27728 KB Output is correct
84 Correct 55 ms 27856 KB Output is correct
85 Correct 59 ms 27984 KB Output is correct
86 Correct 70 ms 29032 KB Output is correct
87 Correct 59 ms 27988 KB Output is correct
88 Correct 67 ms 29008 KB Output is correct
89 Correct 56 ms 25936 KB Output is correct
90 Correct 66 ms 28792 KB Output is correct
91 Correct 51 ms 27220 KB Output is correct
92 Correct 62 ms 27020 KB Output is correct
93 Correct 62 ms 28816 KB Output is correct
94 Correct 63 ms 28496 KB Output is correct
95 Correct 68 ms 28500 KB Output is correct
96 Correct 62 ms 28812 KB Output is correct
97 Correct 62 ms 28752 KB Output is correct
98 Correct 52 ms 27476 KB Output is correct
99 Correct 47 ms 27244 KB Output is correct
100 Correct 45 ms 26448 KB Output is correct
101 Correct 52 ms 27688 KB Output is correct
102 Correct 55 ms 28500 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 18264 KB Output is correct
2 Correct 8 ms 18268 KB Output is correct
3 Correct 8 ms 18268 KB Output is correct
4 Correct 10 ms 18268 KB Output is correct
5 Correct 7 ms 18240 KB Output is correct
6 Correct 8 ms 18520 KB Output is correct
7 Correct 8 ms 18268 KB Output is correct
8 Correct 9 ms 18248 KB Output is correct
9 Correct 8 ms 18268 KB Output is correct
10 Correct 7 ms 18268 KB Output is correct
11 Correct 8 ms 18344 KB Output is correct
12 Correct 8 ms 18268 KB Output is correct
13 Correct 8 ms 18332 KB Output is correct
14 Correct 9 ms 18524 KB Output is correct
15 Correct 7 ms 18208 KB Output is correct
16 Correct 8 ms 18232 KB Output is correct
17 Correct 8 ms 18268 KB Output is correct
18 Correct 9 ms 18268 KB Output is correct
19 Correct 9 ms 18268 KB Output is correct
20 Correct 8 ms 18268 KB Output is correct
21 Correct 8 ms 18268 KB Output is correct
22 Correct 8 ms 18332 KB Output is correct
23 Correct 8 ms 18452 KB Output is correct
24 Correct 8 ms 18264 KB Output is correct
25 Correct 8 ms 18268 KB Output is correct
26 Correct 8 ms 18388 KB Output is correct
27 Correct 8 ms 18268 KB Output is correct
28 Correct 7 ms 18364 KB Output is correct
29 Correct 8 ms 18464 KB Output is correct
30 Correct 8 ms 18268 KB Output is correct
31 Correct 12 ms 18220 KB Output is correct
32 Correct 9 ms 18408 KB Output is correct
33 Correct 8 ms 18268 KB Output is correct
34 Correct 7 ms 18268 KB Output is correct
35 Correct 7 ms 18268 KB Output is correct
36 Correct 7 ms 18204 KB Output is correct
37 Correct 8 ms 18188 KB Output is correct
38 Correct 11 ms 18436 KB Output is correct
39 Correct 67 ms 27420 KB Output is correct
40 Correct 78 ms 27780 KB Output is correct
41 Correct 61 ms 27624 KB Output is correct
42 Correct 59 ms 27704 KB Output is correct
43 Correct 61 ms 27728 KB Output is correct
44 Correct 62 ms 27732 KB Output is correct
45 Correct 33 ms 25192 KB Output is correct
46 Correct 34 ms 25408 KB Output is correct
47 Correct 61 ms 27480 KB Output is correct
48 Correct 57 ms 27492 KB Output is correct
49 Correct 61 ms 27528 KB Output is correct
50 Correct 61 ms 27476 KB Output is correct
51 Correct 54 ms 27280 KB Output is correct
52 Correct 59 ms 28244 KB Output is correct
53 Correct 62 ms 27476 KB Output is correct
54 Correct 64 ms 28348 KB Output is correct
55 Correct 254 ms 55376 KB Output is correct
56 Correct 191 ms 52452 KB Output is correct
57 Correct 270 ms 60348 KB Output is correct
58 Correct 224 ms 52936 KB Output is correct
59 Correct 208 ms 52308 KB Output is correct
60 Correct 273 ms 59984 KB Output is correct
61 Correct 127 ms 49344 KB Output is correct
62 Correct 126 ms 49276 KB Output is correct
63 Correct 268 ms 59708 KB Output is correct
64 Correct 274 ms 59736 KB Output is correct
65 Correct 275 ms 57696 KB Output is correct
66 Correct 284 ms 59728 KB Output is correct
67 Correct 275 ms 57936 KB Output is correct
68 Correct 283 ms 59732 KB Output is correct
69 Correct 289 ms 59528 KB Output is correct
70 Correct 278 ms 59576 KB Output is correct
71 Correct 293 ms 59632 KB Output is correct
72 Correct 265 ms 58708 KB Output is correct
73 Correct 271 ms 59728 KB Output is correct
74 Correct 286 ms 58852 KB Output is correct
75 Correct 297 ms 59540 KB Output is correct
76 Correct 293 ms 59476 KB Output is correct
77 Correct 279 ms 59476 KB Output is correct
78 Correct 274 ms 59472 KB Output is correct
79 Correct 233 ms 54464 KB Output is correct
80 Correct 214 ms 55380 KB Output is correct
81 Correct 247 ms 58528 KB Output is correct
82 Correct 53 ms 27640 KB Output is correct
83 Correct 55 ms 26960 KB Output is correct
84 Correct 31 ms 24900 KB Output is correct
85 Correct 35 ms 25388 KB Output is correct
86 Correct 59 ms 27732 KB Output is correct
87 Correct 59 ms 28248 KB Output is correct
88 Correct 59 ms 28172 KB Output is correct
89 Correct 63 ms 27988 KB Output is correct
90 Correct 58 ms 28408 KB Output is correct
91 Correct 65 ms 28240 KB Output is correct
92 Correct 52 ms 26696 KB Output is correct
93 Correct 51 ms 27220 KB Output is correct
94 Correct 45 ms 26116 KB Output is correct
95 Correct 52 ms 27476 KB Output is correct
96 Correct 60 ms 28240 KB Output is correct
97 Correct 60 ms 28240 KB Output is correct
98 Correct 53 ms 27216 KB Output is correct
99 Correct 73 ms 28752 KB Output is correct
100 Correct 57 ms 28240 KB Output is correct
101 Correct 67 ms 28752 KB Output is correct
102 Correct 61 ms 28824 KB Output is correct
103 Correct 46 ms 26704 KB Output is correct
104 Correct 53 ms 27928 KB Output is correct
105 Correct 60 ms 28752 KB Output is correct
106 Correct 35 ms 25932 KB Output is correct
107 Correct 34 ms 25556 KB Output is correct
108 Correct 48 ms 27756 KB Output is correct
109 Correct 50 ms 25892 KB Output is correct
110 Correct 57 ms 27728 KB Output is correct
111 Correct 55 ms 27856 KB Output is correct
112 Correct 59 ms 27984 KB Output is correct
113 Correct 70 ms 29032 KB Output is correct
114 Correct 59 ms 27988 KB Output is correct
115 Correct 67 ms 29008 KB Output is correct
116 Correct 56 ms 25936 KB Output is correct
117 Correct 66 ms 28792 KB Output is correct
118 Correct 51 ms 27220 KB Output is correct
119 Correct 62 ms 27020 KB Output is correct
120 Correct 62 ms 28816 KB Output is correct
121 Correct 63 ms 28496 KB Output is correct
122 Correct 68 ms 28500 KB Output is correct
123 Correct 62 ms 28812 KB Output is correct
124 Correct 62 ms 28752 KB Output is correct
125 Correct 52 ms 27476 KB Output is correct
126 Correct 47 ms 27244 KB Output is correct
127 Correct 45 ms 26448 KB Output is correct
128 Correct 52 ms 27688 KB Output is correct
129 Correct 55 ms 28500 KB Output is correct
130 Correct 289 ms 60856 KB Output is correct
131 Correct 195 ms 52564 KB Output is correct
132 Correct 290 ms 61008 KB Output is correct
133 Correct 263 ms 59392 KB Output is correct
134 Correct 232 ms 56656 KB Output is correct
135 Correct 276 ms 60752 KB Output is correct
136 Correct 285 ms 60496 KB Output is correct
137 Correct 277 ms 60672 KB Output is correct
138 Correct 334 ms 58192 KB Output is correct
139 Correct 279 ms 60348 KB Output is correct
140 Correct 272 ms 58708 KB Output is correct
141 Correct 282 ms 60168 KB Output is correct
142 Correct 289 ms 60244 KB Output is correct
143 Correct 260 ms 60248 KB Output is correct
144 Correct 253 ms 59308 KB Output is correct
145 Correct 247 ms 60244 KB Output is correct
146 Correct 253 ms 59732 KB Output is correct
147 Correct 308 ms 60312 KB Output is correct
148 Correct 263 ms 60128 KB Output is correct
149 Correct 267 ms 60240 KB Output is correct
150 Correct 168 ms 54384 KB Output is correct
151 Correct 204 ms 55900 KB Output is correct
152 Correct 223 ms 55896 KB Output is correct
153 Correct 219 ms 59472 KB Output is correct