Submission #472663

# Submission time Handle Problem Language Result Execution time Memory
472663 2021-09-14T05:54:59 Z balbit Food Court (JOI21_foodcourt) C++14
100 / 100
706 ms 55236 KB
#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define pii pair<ll, ll>
#define f first
#define s second

#define REP(i,n) for(int i = 0; i<n; ++i)
#define pb push_back
#define SZ(x) (int)((x).size())

#ifdef BALBIT
#define bug(...) cerr<<"#"<<__LINE__<<"- "<<#__VA_ARGS__<<": ", _do(__VA_ARGS__)
template<typename T> void _do(T &&x) {cerr<<x<<endl;}
template<typename T, typename ...S> void _do(T &&x, S&& ...y) {cerr<<x<<", "; _do(y...);}
#else
#define bug(...)
#define endl '\n'
#endif

const int N = 250005;
const ll inf = 3e18;

ll bs[N];

void mo(int e, ll v) {
    for(++e; e<N; e+=e&-e) bs[e] += v;
}
ll qu(int e) {
    ll re = 0;
    for(++e; e>0; e-=e&-e) re += bs[e];
    return re;
}

ll s[N*4], mn[N*4], tg[N*4];
ll who[N]; // which group is added at this time

void push(int o, int l, int r) {
    if(tg[o]) {
        s[o] += tg[o];
        mn[o] += tg[o];
        if(l!=r) {
            tg[o*2] += tg[o];
            tg[o*2+1] += tg[o];
        }
        tg[o] = 0;
    }
}

ll QU(int L, int R, int o=1, int l=0, int r=N-1) {
    if(l > R || r<L) return inf;
    push(o,l,r);
    if(l>=L && r <=R) {
        return mn[o];
    }
    int mid = (l+r)/2;
    return min(
               QU(L,R,o*2,l,mid),
               QU(L,R,o*2+1,mid+1,r)
               );
}

ll GET(int p, int o=1, int l=0, int r=N-1) {
    if (l > p || r < p) return -1;
    push(o,l,r);
    if(l==r) return s[o];
    int mid = (l+r)/2;
    return p<=mid?GET(p,o*2,l,mid) : GET(p,o*2+1,mid+1,r);
}

void MO(int L, int R, ll v, int o=1, int l=0, int r = N-1) {
    push(o,l,r);
    if(l > R ||r < L) return;
    if(l>=L && r <=R) {
        tg[o] += v;
        push(o,l,r);
        return;
    }
    int mid = l+r>>1;
    MO(L,R,v,o*2,l,mid);
    MO(L,R,v,o*2+1,mid+1,r);
    s[o] = s[o*2]+s[o*2+1];
    mn[o] = min(mn[o*2], mn[o*2+1]);
}

vector<pii>ev[N]; // {position, value}
vector<pii>ev2[N]; // {position, value}
vector<pii> que[N]; // {position, number};

ll ans[N];

signed main() {
    ios::sync_with_stdio(0), cin.tie(0);
    int n,m,q; cin>>n>>m>>q;
    memset(ans, -1, sizeof ans);
    REP(i,q) {
        int tp ;cin>>tp;
        if(tp == 1) {
            ll l,r,c,k; cin>>l>>r>>c>>k;
            who[i] = c;// group set
            ev[l].pb({i,k});
            ev[r+1].pb({i,-k});
        }else if (tp == 2) {
            ll l,r,k; cin>>l>>r>>k;
            ev2[l].pb({i,-k});
            ev2[r+1].pb({i,+k});
        }else if (tp == 3) {
            ll a,b; cin>>a>>b;
            que[a].pb({i, b});
        }
    }

    for(int i=1; i<=n; ++i) {
//        bug("position ", i);
        for(pii p : ev[i]) {
            int at = p.f;
            ll val = p.s;
            MO(at, N-1, val);
            bug(at, val);
            mo(at, val);
        }
        for(pii p : ev2[i]) {
            int at = p.f;
            ll val = p.s;
            MO(at, N-1, val);
            bug(at, val);
        }
        for(pii p : que[i]) {
            int at = p.f;
            ll num = p.s;
            ll low = min(0ll,QU(0, at));
            ll val = GET(at);
            bug(val, low);
            if (val - low >= num) {
                // continue here
                bug(num, val-low-num);
                num = val - low + 1 - num;

                int l = 0, r = at;
                while (l!=r) {
                    int mid = (l+r)/2;
                    if (qu(at) - qu(mid-1) >= num) {
                        l = mid+1;
                    }else{
                        r = mid;
                    }
                }
                --l;
                bug(l);
                ans[at] = who[l];
            }else{
                ans[at] = 0;
            }
        }
    }
    REP(i, q) {
        if (ans[i] != -1) cout<<ans[i]<<endl;
    }
}

Compilation message

foodcourt.cpp: In function 'void MO(int, int, long long int, int, int, int)':
foodcourt.cpp:80:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   80 |     int mid = l+r>>1;
      |               ~^~
# Verdict Execution time Memory Grader output
1 Correct 14 ms 20172 KB Output is correct
2 Correct 15 ms 20200 KB Output is correct
3 Correct 14 ms 20248 KB Output is correct
4 Correct 15 ms 20312 KB Output is correct
5 Correct 14 ms 20208 KB Output is correct
6 Correct 13 ms 20268 KB Output is correct
7 Correct 15 ms 20300 KB Output is correct
8 Correct 15 ms 20228 KB Output is correct
9 Correct 14 ms 20216 KB Output is correct
10 Correct 14 ms 20228 KB Output is correct
11 Correct 14 ms 20236 KB Output is correct
12 Correct 17 ms 20256 KB Output is correct
13 Correct 14 ms 20252 KB Output is correct
14 Correct 14 ms 20300 KB Output is correct
15 Correct 14 ms 20252 KB Output is correct
16 Correct 14 ms 20300 KB Output is correct
17 Correct 14 ms 20292 KB Output is correct
18 Correct 15 ms 20300 KB Output is correct
19 Correct 14 ms 20264 KB Output is correct
20 Correct 15 ms 20300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 14 ms 20172 KB Output is correct
2 Correct 15 ms 20200 KB Output is correct
3 Correct 14 ms 20248 KB Output is correct
4 Correct 15 ms 20312 KB Output is correct
5 Correct 14 ms 20208 KB Output is correct
6 Correct 13 ms 20268 KB Output is correct
7 Correct 15 ms 20300 KB Output is correct
8 Correct 15 ms 20228 KB Output is correct
9 Correct 14 ms 20216 KB Output is correct
10 Correct 14 ms 20228 KB Output is correct
11 Correct 14 ms 20236 KB Output is correct
12 Correct 17 ms 20256 KB Output is correct
13 Correct 14 ms 20252 KB Output is correct
14 Correct 14 ms 20300 KB Output is correct
15 Correct 14 ms 20252 KB Output is correct
16 Correct 14 ms 20300 KB Output is correct
17 Correct 14 ms 20292 KB Output is correct
18 Correct 15 ms 20300 KB Output is correct
19 Correct 14 ms 20264 KB Output is correct
20 Correct 15 ms 20300 KB Output is correct
21 Correct 14 ms 20276 KB Output is correct
22 Correct 14 ms 20300 KB Output is correct
23 Correct 17 ms 20280 KB Output is correct
24 Correct 16 ms 20300 KB Output is correct
25 Correct 17 ms 20192 KB Output is correct
26 Correct 14 ms 20300 KB Output is correct
27 Correct 16 ms 20304 KB Output is correct
28 Correct 15 ms 20300 KB Output is correct
29 Correct 15 ms 20208 KB Output is correct
30 Correct 14 ms 20300 KB Output is correct
31 Correct 14 ms 20300 KB Output is correct
32 Correct 14 ms 20312 KB Output is correct
33 Correct 13 ms 20300 KB Output is correct
34 Correct 14 ms 20328 KB Output is correct
35 Correct 14 ms 20260 KB Output is correct
36 Correct 18 ms 20300 KB Output is correct
37 Correct 14 ms 20172 KB Output is correct
38 Correct 15 ms 20312 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 120 ms 27316 KB Output is correct
2 Correct 152 ms 27352 KB Output is correct
3 Correct 161 ms 27332 KB Output is correct
4 Correct 134 ms 27304 KB Output is correct
5 Correct 150 ms 27480 KB Output is correct
6 Correct 131 ms 27384 KB Output is correct
7 Correct 63 ms 25712 KB Output is correct
8 Correct 73 ms 25928 KB Output is correct
9 Correct 135 ms 27036 KB Output is correct
10 Correct 126 ms 27448 KB Output is correct
11 Correct 130 ms 27348 KB Output is correct
12 Correct 131 ms 27448 KB Output is correct
13 Correct 127 ms 26484 KB Output is correct
14 Correct 124 ms 27428 KB Output is correct
15 Correct 128 ms 27212 KB Output is correct
16 Correct 127 ms 27396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 649 ms 45724 KB Output is correct
2 Correct 498 ms 40560 KB Output is correct
3 Correct 689 ms 47924 KB Output is correct
4 Correct 522 ms 45056 KB Output is correct
5 Correct 485 ms 45508 KB Output is correct
6 Correct 706 ms 54472 KB Output is correct
7 Correct 260 ms 47068 KB Output is correct
8 Correct 267 ms 47292 KB Output is correct
9 Correct 661 ms 52656 KB Output is correct
10 Correct 673 ms 52640 KB Output is correct
11 Correct 623 ms 52504 KB Output is correct
12 Correct 636 ms 54424 KB Output is correct
13 Correct 645 ms 52512 KB Output is correct
14 Correct 695 ms 54468 KB Output is correct
15 Correct 634 ms 54196 KB Output is correct
16 Correct 654 ms 54340 KB Output is correct
17 Correct 646 ms 54188 KB Output is correct
18 Correct 642 ms 53572 KB Output is correct
19 Correct 669 ms 54384 KB Output is correct
20 Correct 664 ms 53572 KB Output is correct
21 Correct 641 ms 54324 KB Output is correct
22 Correct 685 ms 54332 KB Output is correct
23 Correct 679 ms 54200 KB Output is correct
24 Correct 671 ms 54188 KB Output is correct
25 Correct 527 ms 52816 KB Output is correct
26 Correct 542 ms 53432 KB Output is correct
27 Correct 491 ms 54160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 14 ms 20172 KB Output is correct
2 Correct 15 ms 20200 KB Output is correct
3 Correct 14 ms 20248 KB Output is correct
4 Correct 15 ms 20312 KB Output is correct
5 Correct 14 ms 20208 KB Output is correct
6 Correct 13 ms 20268 KB Output is correct
7 Correct 15 ms 20300 KB Output is correct
8 Correct 15 ms 20228 KB Output is correct
9 Correct 14 ms 20216 KB Output is correct
10 Correct 14 ms 20228 KB Output is correct
11 Correct 14 ms 20236 KB Output is correct
12 Correct 17 ms 20256 KB Output is correct
13 Correct 14 ms 20252 KB Output is correct
14 Correct 14 ms 20300 KB Output is correct
15 Correct 14 ms 20252 KB Output is correct
16 Correct 14 ms 20300 KB Output is correct
17 Correct 14 ms 20292 KB Output is correct
18 Correct 15 ms 20300 KB Output is correct
19 Correct 14 ms 20264 KB Output is correct
20 Correct 15 ms 20300 KB Output is correct
21 Correct 120 ms 27316 KB Output is correct
22 Correct 152 ms 27352 KB Output is correct
23 Correct 161 ms 27332 KB Output is correct
24 Correct 134 ms 27304 KB Output is correct
25 Correct 150 ms 27480 KB Output is correct
26 Correct 131 ms 27384 KB Output is correct
27 Correct 63 ms 25712 KB Output is correct
28 Correct 73 ms 25928 KB Output is correct
29 Correct 135 ms 27036 KB Output is correct
30 Correct 126 ms 27448 KB Output is correct
31 Correct 130 ms 27348 KB Output is correct
32 Correct 131 ms 27448 KB Output is correct
33 Correct 127 ms 26484 KB Output is correct
34 Correct 124 ms 27428 KB Output is correct
35 Correct 128 ms 27212 KB Output is correct
36 Correct 127 ms 27396 KB Output is correct
37 Correct 120 ms 26632 KB Output is correct
38 Correct 111 ms 25924 KB Output is correct
39 Correct 55 ms 25216 KB Output is correct
40 Correct 67 ms 25816 KB Output is correct
41 Correct 128 ms 26904 KB Output is correct
42 Correct 132 ms 27460 KB Output is correct
43 Correct 147 ms 27380 KB Output is correct
44 Correct 135 ms 27204 KB Output is correct
45 Correct 134 ms 27428 KB Output is correct
46 Correct 141 ms 27416 KB Output is correct
47 Correct 79 ms 26332 KB Output is correct
48 Correct 123 ms 27304 KB Output is correct
49 Correct 93 ms 25352 KB Output is correct
50 Correct 117 ms 26356 KB Output is correct
51 Correct 134 ms 27460 KB Output is correct
52 Correct 132 ms 27476 KB Output is correct
53 Correct 103 ms 25820 KB Output is correct
54 Correct 133 ms 27388 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 117 ms 26276 KB Output is correct
2 Correct 144 ms 26948 KB Output is correct
3 Correct 147 ms 27068 KB Output is correct
4 Correct 91 ms 25028 KB Output is correct
5 Correct 112 ms 26072 KB Output is correct
6 Correct 131 ms 26984 KB Output is correct
7 Correct 70 ms 25460 KB Output is correct
8 Correct 70 ms 25092 KB Output is correct
9 Correct 90 ms 26388 KB Output is correct
10 Correct 85 ms 24816 KB Output is correct
11 Correct 117 ms 26692 KB Output is correct
12 Correct 117 ms 26728 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 14 ms 20172 KB Output is correct
2 Correct 15 ms 20200 KB Output is correct
3 Correct 14 ms 20248 KB Output is correct
4 Correct 15 ms 20312 KB Output is correct
5 Correct 14 ms 20208 KB Output is correct
6 Correct 13 ms 20268 KB Output is correct
7 Correct 15 ms 20300 KB Output is correct
8 Correct 15 ms 20228 KB Output is correct
9 Correct 14 ms 20216 KB Output is correct
10 Correct 14 ms 20228 KB Output is correct
11 Correct 14 ms 20236 KB Output is correct
12 Correct 17 ms 20256 KB Output is correct
13 Correct 14 ms 20252 KB Output is correct
14 Correct 14 ms 20300 KB Output is correct
15 Correct 14 ms 20252 KB Output is correct
16 Correct 14 ms 20300 KB Output is correct
17 Correct 14 ms 20292 KB Output is correct
18 Correct 15 ms 20300 KB Output is correct
19 Correct 14 ms 20264 KB Output is correct
20 Correct 15 ms 20300 KB Output is correct
21 Correct 14 ms 20276 KB Output is correct
22 Correct 14 ms 20300 KB Output is correct
23 Correct 17 ms 20280 KB Output is correct
24 Correct 16 ms 20300 KB Output is correct
25 Correct 17 ms 20192 KB Output is correct
26 Correct 14 ms 20300 KB Output is correct
27 Correct 16 ms 20304 KB Output is correct
28 Correct 15 ms 20300 KB Output is correct
29 Correct 15 ms 20208 KB Output is correct
30 Correct 14 ms 20300 KB Output is correct
31 Correct 14 ms 20300 KB Output is correct
32 Correct 14 ms 20312 KB Output is correct
33 Correct 13 ms 20300 KB Output is correct
34 Correct 14 ms 20328 KB Output is correct
35 Correct 14 ms 20260 KB Output is correct
36 Correct 18 ms 20300 KB Output is correct
37 Correct 14 ms 20172 KB Output is correct
38 Correct 15 ms 20312 KB Output is correct
39 Correct 120 ms 27316 KB Output is correct
40 Correct 152 ms 27352 KB Output is correct
41 Correct 161 ms 27332 KB Output is correct
42 Correct 134 ms 27304 KB Output is correct
43 Correct 150 ms 27480 KB Output is correct
44 Correct 131 ms 27384 KB Output is correct
45 Correct 63 ms 25712 KB Output is correct
46 Correct 73 ms 25928 KB Output is correct
47 Correct 135 ms 27036 KB Output is correct
48 Correct 126 ms 27448 KB Output is correct
49 Correct 130 ms 27348 KB Output is correct
50 Correct 131 ms 27448 KB Output is correct
51 Correct 127 ms 26484 KB Output is correct
52 Correct 124 ms 27428 KB Output is correct
53 Correct 128 ms 27212 KB Output is correct
54 Correct 127 ms 27396 KB Output is correct
55 Correct 120 ms 26632 KB Output is correct
56 Correct 111 ms 25924 KB Output is correct
57 Correct 55 ms 25216 KB Output is correct
58 Correct 67 ms 25816 KB Output is correct
59 Correct 128 ms 26904 KB Output is correct
60 Correct 132 ms 27460 KB Output is correct
61 Correct 147 ms 27380 KB Output is correct
62 Correct 135 ms 27204 KB Output is correct
63 Correct 134 ms 27428 KB Output is correct
64 Correct 141 ms 27416 KB Output is correct
65 Correct 79 ms 26332 KB Output is correct
66 Correct 123 ms 27304 KB Output is correct
67 Correct 93 ms 25352 KB Output is correct
68 Correct 117 ms 26356 KB Output is correct
69 Correct 134 ms 27460 KB Output is correct
70 Correct 132 ms 27476 KB Output is correct
71 Correct 103 ms 25820 KB Output is correct
72 Correct 133 ms 27388 KB Output is correct
73 Correct 117 ms 26276 KB Output is correct
74 Correct 144 ms 26948 KB Output is correct
75 Correct 147 ms 27068 KB Output is correct
76 Correct 91 ms 25028 KB Output is correct
77 Correct 112 ms 26072 KB Output is correct
78 Correct 131 ms 26984 KB Output is correct
79 Correct 70 ms 25460 KB Output is correct
80 Correct 70 ms 25092 KB Output is correct
81 Correct 90 ms 26388 KB Output is correct
82 Correct 85 ms 24816 KB Output is correct
83 Correct 117 ms 26692 KB Output is correct
84 Correct 117 ms 26728 KB Output is correct
85 Correct 120 ms 26688 KB Output is correct
86 Correct 138 ms 27400 KB Output is correct
87 Correct 118 ms 26504 KB Output is correct
88 Correct 145 ms 27404 KB Output is correct
89 Correct 91 ms 24712 KB Output is correct
90 Correct 136 ms 27460 KB Output is correct
91 Correct 115 ms 26148 KB Output is correct
92 Correct 103 ms 25780 KB Output is correct
93 Correct 137 ms 27404 KB Output is correct
94 Correct 141 ms 27132 KB Output is correct
95 Correct 133 ms 27324 KB Output is correct
96 Correct 137 ms 27460 KB Output is correct
97 Correct 140 ms 27424 KB Output is correct
98 Correct 113 ms 26332 KB Output is correct
99 Correct 83 ms 26284 KB Output is correct
100 Correct 99 ms 26044 KB Output is correct
101 Correct 129 ms 27332 KB Output is correct
102 Correct 124 ms 27468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 14 ms 20172 KB Output is correct
2 Correct 15 ms 20200 KB Output is correct
3 Correct 14 ms 20248 KB Output is correct
4 Correct 15 ms 20312 KB Output is correct
5 Correct 14 ms 20208 KB Output is correct
6 Correct 13 ms 20268 KB Output is correct
7 Correct 15 ms 20300 KB Output is correct
8 Correct 15 ms 20228 KB Output is correct
9 Correct 14 ms 20216 KB Output is correct
10 Correct 14 ms 20228 KB Output is correct
11 Correct 14 ms 20236 KB Output is correct
12 Correct 17 ms 20256 KB Output is correct
13 Correct 14 ms 20252 KB Output is correct
14 Correct 14 ms 20300 KB Output is correct
15 Correct 14 ms 20252 KB Output is correct
16 Correct 14 ms 20300 KB Output is correct
17 Correct 14 ms 20292 KB Output is correct
18 Correct 15 ms 20300 KB Output is correct
19 Correct 14 ms 20264 KB Output is correct
20 Correct 15 ms 20300 KB Output is correct
21 Correct 14 ms 20276 KB Output is correct
22 Correct 14 ms 20300 KB Output is correct
23 Correct 17 ms 20280 KB Output is correct
24 Correct 16 ms 20300 KB Output is correct
25 Correct 17 ms 20192 KB Output is correct
26 Correct 14 ms 20300 KB Output is correct
27 Correct 16 ms 20304 KB Output is correct
28 Correct 15 ms 20300 KB Output is correct
29 Correct 15 ms 20208 KB Output is correct
30 Correct 14 ms 20300 KB Output is correct
31 Correct 14 ms 20300 KB Output is correct
32 Correct 14 ms 20312 KB Output is correct
33 Correct 13 ms 20300 KB Output is correct
34 Correct 14 ms 20328 KB Output is correct
35 Correct 14 ms 20260 KB Output is correct
36 Correct 18 ms 20300 KB Output is correct
37 Correct 14 ms 20172 KB Output is correct
38 Correct 15 ms 20312 KB Output is correct
39 Correct 120 ms 27316 KB Output is correct
40 Correct 152 ms 27352 KB Output is correct
41 Correct 161 ms 27332 KB Output is correct
42 Correct 134 ms 27304 KB Output is correct
43 Correct 150 ms 27480 KB Output is correct
44 Correct 131 ms 27384 KB Output is correct
45 Correct 63 ms 25712 KB Output is correct
46 Correct 73 ms 25928 KB Output is correct
47 Correct 135 ms 27036 KB Output is correct
48 Correct 126 ms 27448 KB Output is correct
49 Correct 130 ms 27348 KB Output is correct
50 Correct 131 ms 27448 KB Output is correct
51 Correct 127 ms 26484 KB Output is correct
52 Correct 124 ms 27428 KB Output is correct
53 Correct 128 ms 27212 KB Output is correct
54 Correct 127 ms 27396 KB Output is correct
55 Correct 649 ms 45724 KB Output is correct
56 Correct 498 ms 40560 KB Output is correct
57 Correct 689 ms 47924 KB Output is correct
58 Correct 522 ms 45056 KB Output is correct
59 Correct 485 ms 45508 KB Output is correct
60 Correct 706 ms 54472 KB Output is correct
61 Correct 260 ms 47068 KB Output is correct
62 Correct 267 ms 47292 KB Output is correct
63 Correct 661 ms 52656 KB Output is correct
64 Correct 673 ms 52640 KB Output is correct
65 Correct 623 ms 52504 KB Output is correct
66 Correct 636 ms 54424 KB Output is correct
67 Correct 645 ms 52512 KB Output is correct
68 Correct 695 ms 54468 KB Output is correct
69 Correct 634 ms 54196 KB Output is correct
70 Correct 654 ms 54340 KB Output is correct
71 Correct 646 ms 54188 KB Output is correct
72 Correct 642 ms 53572 KB Output is correct
73 Correct 669 ms 54384 KB Output is correct
74 Correct 664 ms 53572 KB Output is correct
75 Correct 641 ms 54324 KB Output is correct
76 Correct 685 ms 54332 KB Output is correct
77 Correct 679 ms 54200 KB Output is correct
78 Correct 671 ms 54188 KB Output is correct
79 Correct 527 ms 52816 KB Output is correct
80 Correct 542 ms 53432 KB Output is correct
81 Correct 491 ms 54160 KB Output is correct
82 Correct 120 ms 26632 KB Output is correct
83 Correct 111 ms 25924 KB Output is correct
84 Correct 55 ms 25216 KB Output is correct
85 Correct 67 ms 25816 KB Output is correct
86 Correct 128 ms 26904 KB Output is correct
87 Correct 132 ms 27460 KB Output is correct
88 Correct 147 ms 27380 KB Output is correct
89 Correct 135 ms 27204 KB Output is correct
90 Correct 134 ms 27428 KB Output is correct
91 Correct 141 ms 27416 KB Output is correct
92 Correct 79 ms 26332 KB Output is correct
93 Correct 123 ms 27304 KB Output is correct
94 Correct 93 ms 25352 KB Output is correct
95 Correct 117 ms 26356 KB Output is correct
96 Correct 134 ms 27460 KB Output is correct
97 Correct 132 ms 27476 KB Output is correct
98 Correct 103 ms 25820 KB Output is correct
99 Correct 133 ms 27388 KB Output is correct
100 Correct 117 ms 26276 KB Output is correct
101 Correct 144 ms 26948 KB Output is correct
102 Correct 147 ms 27068 KB Output is correct
103 Correct 91 ms 25028 KB Output is correct
104 Correct 112 ms 26072 KB Output is correct
105 Correct 131 ms 26984 KB Output is correct
106 Correct 70 ms 25460 KB Output is correct
107 Correct 70 ms 25092 KB Output is correct
108 Correct 90 ms 26388 KB Output is correct
109 Correct 85 ms 24816 KB Output is correct
110 Correct 117 ms 26692 KB Output is correct
111 Correct 117 ms 26728 KB Output is correct
112 Correct 120 ms 26688 KB Output is correct
113 Correct 138 ms 27400 KB Output is correct
114 Correct 118 ms 26504 KB Output is correct
115 Correct 145 ms 27404 KB Output is correct
116 Correct 91 ms 24712 KB Output is correct
117 Correct 136 ms 27460 KB Output is correct
118 Correct 115 ms 26148 KB Output is correct
119 Correct 103 ms 25780 KB Output is correct
120 Correct 137 ms 27404 KB Output is correct
121 Correct 141 ms 27132 KB Output is correct
122 Correct 133 ms 27324 KB Output is correct
123 Correct 137 ms 27460 KB Output is correct
124 Correct 140 ms 27424 KB Output is correct
125 Correct 113 ms 26332 KB Output is correct
126 Correct 83 ms 26284 KB Output is correct
127 Correct 99 ms 26044 KB Output is correct
128 Correct 129 ms 27332 KB Output is correct
129 Correct 124 ms 27468 KB Output is correct
130 Correct 666 ms 54528 KB Output is correct
131 Correct 446 ms 45156 KB Output is correct
132 Correct 645 ms 54468 KB Output is correct
133 Correct 635 ms 53700 KB Output is correct
134 Correct 544 ms 50244 KB Output is correct
135 Correct 655 ms 55236 KB Output is correct
136 Correct 637 ms 53604 KB Output is correct
137 Correct 653 ms 53560 KB Output is correct
138 Correct 619 ms 53152 KB Output is correct
139 Correct 633 ms 54972 KB Output is correct
140 Correct 661 ms 53452 KB Output is correct
141 Correct 651 ms 54852 KB Output is correct
142 Correct 674 ms 54936 KB Output is correct
143 Correct 671 ms 54836 KB Output is correct
144 Correct 659 ms 53920 KB Output is correct
145 Correct 703 ms 54956 KB Output is correct
146 Correct 665 ms 54340 KB Output is correct
147 Correct 688 ms 54832 KB Output is correct
148 Correct 664 ms 54852 KB Output is correct
149 Correct 672 ms 54976 KB Output is correct
150 Correct 327 ms 49832 KB Output is correct
151 Correct 593 ms 53916 KB Output is correct
152 Correct 557 ms 53828 KB Output is correct
153 Correct 511 ms 54988 KB Output is correct