Submission #472666

# Submission time Handle Problem Language Result Execution time Memory
472666 2021-09-14T06:04:14 Z balbit Food Court (JOI21_foodcourt) C++14
100 / 100
740 ms 48836 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;
}

int findfirst(ll cap) {
    int r = 0;
    for (int ty = 1<<__lg(N); ty >= 1; ty >>= 1) {
        if (r+ty < N && cap >= bs[r + ty]) {
            r += ty; cap -= bs[r];
        }
    }
    return r;
}

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 pp = findfirst(qu(at) - num);

                bug(pp);
                ans[at] = who[pp];
            }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:90:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   90 |     int mid = l+r>>1;
      |               ~^~
# Verdict Execution time Memory Grader output
1 Correct 13 ms 20172 KB Output is correct
2 Correct 16 ms 20204 KB Output is correct
3 Correct 15 ms 20220 KB Output is correct
4 Correct 16 ms 20320 KB Output is correct
5 Correct 13 ms 20300 KB Output is correct
6 Correct 13 ms 20224 KB Output is correct
7 Correct 14 ms 20300 KB Output is correct
8 Correct 14 ms 20204 KB Output is correct
9 Correct 14 ms 20300 KB Output is correct
10 Correct 14 ms 20312 KB Output is correct
11 Correct 14 ms 20300 KB Output is correct
12 Correct 17 ms 20300 KB Output is correct
13 Correct 12 ms 20184 KB Output is correct
14 Correct 13 ms 20320 KB Output is correct
15 Correct 15 ms 20172 KB Output is correct
16 Correct 15 ms 20216 KB Output is correct
17 Correct 13 ms 20268 KB Output is correct
18 Correct 14 ms 20232 KB Output is correct
19 Correct 13 ms 20220 KB Output is correct
20 Correct 14 ms 20256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 20172 KB Output is correct
2 Correct 16 ms 20204 KB Output is correct
3 Correct 15 ms 20220 KB Output is correct
4 Correct 16 ms 20320 KB Output is correct
5 Correct 13 ms 20300 KB Output is correct
6 Correct 13 ms 20224 KB Output is correct
7 Correct 14 ms 20300 KB Output is correct
8 Correct 14 ms 20204 KB Output is correct
9 Correct 14 ms 20300 KB Output is correct
10 Correct 14 ms 20312 KB Output is correct
11 Correct 14 ms 20300 KB Output is correct
12 Correct 17 ms 20300 KB Output is correct
13 Correct 12 ms 20184 KB Output is correct
14 Correct 13 ms 20320 KB Output is correct
15 Correct 15 ms 20172 KB Output is correct
16 Correct 15 ms 20216 KB Output is correct
17 Correct 13 ms 20268 KB Output is correct
18 Correct 14 ms 20232 KB Output is correct
19 Correct 13 ms 20220 KB Output is correct
20 Correct 14 ms 20256 KB Output is correct
21 Correct 14 ms 20252 KB Output is correct
22 Correct 14 ms 20248 KB Output is correct
23 Correct 15 ms 20300 KB Output is correct
24 Correct 14 ms 20300 KB Output is correct
25 Correct 13 ms 20304 KB Output is correct
26 Correct 13 ms 20312 KB Output is correct
27 Correct 14 ms 20280 KB Output is correct
28 Correct 14 ms 20196 KB Output is correct
29 Correct 14 ms 20312 KB Output is correct
30 Correct 14 ms 20220 KB Output is correct
31 Correct 14 ms 20300 KB Output is correct
32 Correct 14 ms 20300 KB Output is correct
33 Correct 14 ms 20240 KB Output is correct
34 Correct 13 ms 20300 KB Output is correct
35 Correct 15 ms 20300 KB Output is correct
36 Correct 14 ms 20324 KB Output is correct
37 Correct 16 ms 20152 KB Output is correct
38 Correct 14 ms 20300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 122 ms 27268 KB Output is correct
2 Correct 132 ms 27432 KB Output is correct
3 Correct 121 ms 27240 KB Output is correct
4 Correct 129 ms 27332 KB Output is correct
5 Correct 127 ms 27416 KB Output is correct
6 Correct 121 ms 27412 KB Output is correct
7 Correct 60 ms 25732 KB Output is correct
8 Correct 65 ms 26136 KB Output is correct
9 Correct 142 ms 27088 KB Output is correct
10 Correct 127 ms 27332 KB Output is correct
11 Correct 141 ms 27228 KB Output is correct
12 Correct 124 ms 27388 KB Output is correct
13 Correct 109 ms 26424 KB Output is correct
14 Correct 121 ms 27240 KB Output is correct
15 Correct 119 ms 27164 KB Output is correct
16 Correct 144 ms 27460 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 597 ms 45720 KB Output is correct
2 Correct 458 ms 40552 KB Output is correct
3 Correct 632 ms 48032 KB Output is correct
4 Correct 459 ms 40900 KB Output is correct
5 Correct 462 ms 41308 KB Output is correct
6 Correct 636 ms 48584 KB Output is correct
7 Correct 230 ms 43272 KB Output is correct
8 Correct 239 ms 43476 KB Output is correct
9 Correct 584 ms 46812 KB Output is correct
10 Correct 606 ms 46812 KB Output is correct
11 Correct 616 ms 46624 KB Output is correct
12 Correct 629 ms 48552 KB Output is correct
13 Correct 623 ms 47040 KB Output is correct
14 Correct 644 ms 48564 KB Output is correct
15 Correct 628 ms 48492 KB Output is correct
16 Correct 624 ms 48604 KB Output is correct
17 Correct 660 ms 48560 KB Output is correct
18 Correct 623 ms 47684 KB Output is correct
19 Correct 674 ms 48560 KB Output is correct
20 Correct 630 ms 47652 KB Output is correct
21 Correct 632 ms 48548 KB Output is correct
22 Correct 651 ms 48608 KB Output is correct
23 Correct 629 ms 48560 KB Output is correct
24 Correct 693 ms 48636 KB Output is correct
25 Correct 511 ms 47376 KB Output is correct
26 Correct 531 ms 47892 KB Output is correct
27 Correct 472 ms 48576 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 20172 KB Output is correct
2 Correct 16 ms 20204 KB Output is correct
3 Correct 15 ms 20220 KB Output is correct
4 Correct 16 ms 20320 KB Output is correct
5 Correct 13 ms 20300 KB Output is correct
6 Correct 13 ms 20224 KB Output is correct
7 Correct 14 ms 20300 KB Output is correct
8 Correct 14 ms 20204 KB Output is correct
9 Correct 14 ms 20300 KB Output is correct
10 Correct 14 ms 20312 KB Output is correct
11 Correct 14 ms 20300 KB Output is correct
12 Correct 17 ms 20300 KB Output is correct
13 Correct 12 ms 20184 KB Output is correct
14 Correct 13 ms 20320 KB Output is correct
15 Correct 15 ms 20172 KB Output is correct
16 Correct 15 ms 20216 KB Output is correct
17 Correct 13 ms 20268 KB Output is correct
18 Correct 14 ms 20232 KB Output is correct
19 Correct 13 ms 20220 KB Output is correct
20 Correct 14 ms 20256 KB Output is correct
21 Correct 122 ms 27268 KB Output is correct
22 Correct 132 ms 27432 KB Output is correct
23 Correct 121 ms 27240 KB Output is correct
24 Correct 129 ms 27332 KB Output is correct
25 Correct 127 ms 27416 KB Output is correct
26 Correct 121 ms 27412 KB Output is correct
27 Correct 60 ms 25732 KB Output is correct
28 Correct 65 ms 26136 KB Output is correct
29 Correct 142 ms 27088 KB Output is correct
30 Correct 127 ms 27332 KB Output is correct
31 Correct 141 ms 27228 KB Output is correct
32 Correct 124 ms 27388 KB Output is correct
33 Correct 109 ms 26424 KB Output is correct
34 Correct 121 ms 27240 KB Output is correct
35 Correct 119 ms 27164 KB Output is correct
36 Correct 144 ms 27460 KB Output is correct
37 Correct 114 ms 26672 KB Output is correct
38 Correct 100 ms 25924 KB Output is correct
39 Correct 64 ms 25220 KB Output is correct
40 Correct 65 ms 25772 KB Output is correct
41 Correct 128 ms 26900 KB Output is correct
42 Correct 148 ms 27464 KB Output is correct
43 Correct 154 ms 27420 KB Output is correct
44 Correct 138 ms 27172 KB Output is correct
45 Correct 136 ms 27480 KB Output is correct
46 Correct 147 ms 27420 KB Output is correct
47 Correct 73 ms 26308 KB Output is correct
48 Correct 109 ms 27332 KB Output is correct
49 Correct 88 ms 25300 KB Output is correct
50 Correct 118 ms 26508 KB Output is correct
51 Correct 169 ms 27488 KB Output is correct
52 Correct 127 ms 27472 KB Output is correct
53 Correct 125 ms 25824 KB Output is correct
54 Correct 127 ms 27332 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 116 ms 26416 KB Output is correct
2 Correct 124 ms 26892 KB Output is correct
3 Correct 131 ms 27060 KB Output is correct
4 Correct 91 ms 25052 KB Output is correct
5 Correct 140 ms 26056 KB Output is correct
6 Correct 131 ms 27048 KB Output is correct
7 Correct 63 ms 25380 KB Output is correct
8 Correct 63 ms 25132 KB Output is correct
9 Correct 104 ms 26292 KB Output is correct
10 Correct 81 ms 24856 KB Output is correct
11 Correct 123 ms 26680 KB Output is correct
12 Correct 112 ms 26728 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 20172 KB Output is correct
2 Correct 16 ms 20204 KB Output is correct
3 Correct 15 ms 20220 KB Output is correct
4 Correct 16 ms 20320 KB Output is correct
5 Correct 13 ms 20300 KB Output is correct
6 Correct 13 ms 20224 KB Output is correct
7 Correct 14 ms 20300 KB Output is correct
8 Correct 14 ms 20204 KB Output is correct
9 Correct 14 ms 20300 KB Output is correct
10 Correct 14 ms 20312 KB Output is correct
11 Correct 14 ms 20300 KB Output is correct
12 Correct 17 ms 20300 KB Output is correct
13 Correct 12 ms 20184 KB Output is correct
14 Correct 13 ms 20320 KB Output is correct
15 Correct 15 ms 20172 KB Output is correct
16 Correct 15 ms 20216 KB Output is correct
17 Correct 13 ms 20268 KB Output is correct
18 Correct 14 ms 20232 KB Output is correct
19 Correct 13 ms 20220 KB Output is correct
20 Correct 14 ms 20256 KB Output is correct
21 Correct 14 ms 20252 KB Output is correct
22 Correct 14 ms 20248 KB Output is correct
23 Correct 15 ms 20300 KB Output is correct
24 Correct 14 ms 20300 KB Output is correct
25 Correct 13 ms 20304 KB Output is correct
26 Correct 13 ms 20312 KB Output is correct
27 Correct 14 ms 20280 KB Output is correct
28 Correct 14 ms 20196 KB Output is correct
29 Correct 14 ms 20312 KB Output is correct
30 Correct 14 ms 20220 KB Output is correct
31 Correct 14 ms 20300 KB Output is correct
32 Correct 14 ms 20300 KB Output is correct
33 Correct 14 ms 20240 KB Output is correct
34 Correct 13 ms 20300 KB Output is correct
35 Correct 15 ms 20300 KB Output is correct
36 Correct 14 ms 20324 KB Output is correct
37 Correct 16 ms 20152 KB Output is correct
38 Correct 14 ms 20300 KB Output is correct
39 Correct 122 ms 27268 KB Output is correct
40 Correct 132 ms 27432 KB Output is correct
41 Correct 121 ms 27240 KB Output is correct
42 Correct 129 ms 27332 KB Output is correct
43 Correct 127 ms 27416 KB Output is correct
44 Correct 121 ms 27412 KB Output is correct
45 Correct 60 ms 25732 KB Output is correct
46 Correct 65 ms 26136 KB Output is correct
47 Correct 142 ms 27088 KB Output is correct
48 Correct 127 ms 27332 KB Output is correct
49 Correct 141 ms 27228 KB Output is correct
50 Correct 124 ms 27388 KB Output is correct
51 Correct 109 ms 26424 KB Output is correct
52 Correct 121 ms 27240 KB Output is correct
53 Correct 119 ms 27164 KB Output is correct
54 Correct 144 ms 27460 KB Output is correct
55 Correct 114 ms 26672 KB Output is correct
56 Correct 100 ms 25924 KB Output is correct
57 Correct 64 ms 25220 KB Output is correct
58 Correct 65 ms 25772 KB Output is correct
59 Correct 128 ms 26900 KB Output is correct
60 Correct 148 ms 27464 KB Output is correct
61 Correct 154 ms 27420 KB Output is correct
62 Correct 138 ms 27172 KB Output is correct
63 Correct 136 ms 27480 KB Output is correct
64 Correct 147 ms 27420 KB Output is correct
65 Correct 73 ms 26308 KB Output is correct
66 Correct 109 ms 27332 KB Output is correct
67 Correct 88 ms 25300 KB Output is correct
68 Correct 118 ms 26508 KB Output is correct
69 Correct 169 ms 27488 KB Output is correct
70 Correct 127 ms 27472 KB Output is correct
71 Correct 125 ms 25824 KB Output is correct
72 Correct 127 ms 27332 KB Output is correct
73 Correct 116 ms 26416 KB Output is correct
74 Correct 124 ms 26892 KB Output is correct
75 Correct 131 ms 27060 KB Output is correct
76 Correct 91 ms 25052 KB Output is correct
77 Correct 140 ms 26056 KB Output is correct
78 Correct 131 ms 27048 KB Output is correct
79 Correct 63 ms 25380 KB Output is correct
80 Correct 63 ms 25132 KB Output is correct
81 Correct 104 ms 26292 KB Output is correct
82 Correct 81 ms 24856 KB Output is correct
83 Correct 123 ms 26680 KB Output is correct
84 Correct 112 ms 26728 KB Output is correct
85 Correct 124 ms 26648 KB Output is correct
86 Correct 149 ms 27436 KB Output is correct
87 Correct 128 ms 26456 KB Output is correct
88 Correct 148 ms 27424 KB Output is correct
89 Correct 98 ms 24712 KB Output is correct
90 Correct 135 ms 27496 KB Output is correct
91 Correct 123 ms 26068 KB Output is correct
92 Correct 109 ms 25796 KB Output is correct
93 Correct 148 ms 27476 KB Output is correct
94 Correct 148 ms 27204 KB Output is correct
95 Correct 145 ms 27204 KB Output is correct
96 Correct 187 ms 27372 KB Output is correct
97 Correct 142 ms 27532 KB Output is correct
98 Correct 116 ms 26332 KB Output is correct
99 Correct 86 ms 26288 KB Output is correct
100 Correct 95 ms 25980 KB Output is correct
101 Correct 112 ms 27340 KB Output is correct
102 Correct 130 ms 27460 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 13 ms 20172 KB Output is correct
2 Correct 16 ms 20204 KB Output is correct
3 Correct 15 ms 20220 KB Output is correct
4 Correct 16 ms 20320 KB Output is correct
5 Correct 13 ms 20300 KB Output is correct
6 Correct 13 ms 20224 KB Output is correct
7 Correct 14 ms 20300 KB Output is correct
8 Correct 14 ms 20204 KB Output is correct
9 Correct 14 ms 20300 KB Output is correct
10 Correct 14 ms 20312 KB Output is correct
11 Correct 14 ms 20300 KB Output is correct
12 Correct 17 ms 20300 KB Output is correct
13 Correct 12 ms 20184 KB Output is correct
14 Correct 13 ms 20320 KB Output is correct
15 Correct 15 ms 20172 KB Output is correct
16 Correct 15 ms 20216 KB Output is correct
17 Correct 13 ms 20268 KB Output is correct
18 Correct 14 ms 20232 KB Output is correct
19 Correct 13 ms 20220 KB Output is correct
20 Correct 14 ms 20256 KB Output is correct
21 Correct 14 ms 20252 KB Output is correct
22 Correct 14 ms 20248 KB Output is correct
23 Correct 15 ms 20300 KB Output is correct
24 Correct 14 ms 20300 KB Output is correct
25 Correct 13 ms 20304 KB Output is correct
26 Correct 13 ms 20312 KB Output is correct
27 Correct 14 ms 20280 KB Output is correct
28 Correct 14 ms 20196 KB Output is correct
29 Correct 14 ms 20312 KB Output is correct
30 Correct 14 ms 20220 KB Output is correct
31 Correct 14 ms 20300 KB Output is correct
32 Correct 14 ms 20300 KB Output is correct
33 Correct 14 ms 20240 KB Output is correct
34 Correct 13 ms 20300 KB Output is correct
35 Correct 15 ms 20300 KB Output is correct
36 Correct 14 ms 20324 KB Output is correct
37 Correct 16 ms 20152 KB Output is correct
38 Correct 14 ms 20300 KB Output is correct
39 Correct 122 ms 27268 KB Output is correct
40 Correct 132 ms 27432 KB Output is correct
41 Correct 121 ms 27240 KB Output is correct
42 Correct 129 ms 27332 KB Output is correct
43 Correct 127 ms 27416 KB Output is correct
44 Correct 121 ms 27412 KB Output is correct
45 Correct 60 ms 25732 KB Output is correct
46 Correct 65 ms 26136 KB Output is correct
47 Correct 142 ms 27088 KB Output is correct
48 Correct 127 ms 27332 KB Output is correct
49 Correct 141 ms 27228 KB Output is correct
50 Correct 124 ms 27388 KB Output is correct
51 Correct 109 ms 26424 KB Output is correct
52 Correct 121 ms 27240 KB Output is correct
53 Correct 119 ms 27164 KB Output is correct
54 Correct 144 ms 27460 KB Output is correct
55 Correct 597 ms 45720 KB Output is correct
56 Correct 458 ms 40552 KB Output is correct
57 Correct 632 ms 48032 KB Output is correct
58 Correct 459 ms 40900 KB Output is correct
59 Correct 462 ms 41308 KB Output is correct
60 Correct 636 ms 48584 KB Output is correct
61 Correct 230 ms 43272 KB Output is correct
62 Correct 239 ms 43476 KB Output is correct
63 Correct 584 ms 46812 KB Output is correct
64 Correct 606 ms 46812 KB Output is correct
65 Correct 616 ms 46624 KB Output is correct
66 Correct 629 ms 48552 KB Output is correct
67 Correct 623 ms 47040 KB Output is correct
68 Correct 644 ms 48564 KB Output is correct
69 Correct 628 ms 48492 KB Output is correct
70 Correct 624 ms 48604 KB Output is correct
71 Correct 660 ms 48560 KB Output is correct
72 Correct 623 ms 47684 KB Output is correct
73 Correct 674 ms 48560 KB Output is correct
74 Correct 630 ms 47652 KB Output is correct
75 Correct 632 ms 48548 KB Output is correct
76 Correct 651 ms 48608 KB Output is correct
77 Correct 629 ms 48560 KB Output is correct
78 Correct 693 ms 48636 KB Output is correct
79 Correct 511 ms 47376 KB Output is correct
80 Correct 531 ms 47892 KB Output is correct
81 Correct 472 ms 48576 KB Output is correct
82 Correct 114 ms 26672 KB Output is correct
83 Correct 100 ms 25924 KB Output is correct
84 Correct 64 ms 25220 KB Output is correct
85 Correct 65 ms 25772 KB Output is correct
86 Correct 128 ms 26900 KB Output is correct
87 Correct 148 ms 27464 KB Output is correct
88 Correct 154 ms 27420 KB Output is correct
89 Correct 138 ms 27172 KB Output is correct
90 Correct 136 ms 27480 KB Output is correct
91 Correct 147 ms 27420 KB Output is correct
92 Correct 73 ms 26308 KB Output is correct
93 Correct 109 ms 27332 KB Output is correct
94 Correct 88 ms 25300 KB Output is correct
95 Correct 118 ms 26508 KB Output is correct
96 Correct 169 ms 27488 KB Output is correct
97 Correct 127 ms 27472 KB Output is correct
98 Correct 125 ms 25824 KB Output is correct
99 Correct 127 ms 27332 KB Output is correct
100 Correct 116 ms 26416 KB Output is correct
101 Correct 124 ms 26892 KB Output is correct
102 Correct 131 ms 27060 KB Output is correct
103 Correct 91 ms 25052 KB Output is correct
104 Correct 140 ms 26056 KB Output is correct
105 Correct 131 ms 27048 KB Output is correct
106 Correct 63 ms 25380 KB Output is correct
107 Correct 63 ms 25132 KB Output is correct
108 Correct 104 ms 26292 KB Output is correct
109 Correct 81 ms 24856 KB Output is correct
110 Correct 123 ms 26680 KB Output is correct
111 Correct 112 ms 26728 KB Output is correct
112 Correct 124 ms 26648 KB Output is correct
113 Correct 149 ms 27436 KB Output is correct
114 Correct 128 ms 26456 KB Output is correct
115 Correct 148 ms 27424 KB Output is correct
116 Correct 98 ms 24712 KB Output is correct
117 Correct 135 ms 27496 KB Output is correct
118 Correct 123 ms 26068 KB Output is correct
119 Correct 109 ms 25796 KB Output is correct
120 Correct 148 ms 27476 KB Output is correct
121 Correct 148 ms 27204 KB Output is correct
122 Correct 145 ms 27204 KB Output is correct
123 Correct 187 ms 27372 KB Output is correct
124 Correct 142 ms 27532 KB Output is correct
125 Correct 116 ms 26332 KB Output is correct
126 Correct 86 ms 26288 KB Output is correct
127 Correct 95 ms 25980 KB Output is correct
128 Correct 112 ms 27340 KB Output is correct
129 Correct 130 ms 27460 KB Output is correct
130 Correct 662 ms 48444 KB Output is correct
131 Correct 455 ms 40876 KB Output is correct
132 Correct 620 ms 48424 KB Output is correct
133 Correct 648 ms 47516 KB Output is correct
134 Correct 541 ms 44616 KB Output is correct
135 Correct 656 ms 48652 KB Output is correct
136 Correct 616 ms 47200 KB Output is correct
137 Correct 621 ms 47328 KB Output is correct
138 Correct 617 ms 46820 KB Output is correct
139 Correct 651 ms 48672 KB Output is correct
140 Correct 699 ms 47260 KB Output is correct
141 Correct 647 ms 48692 KB Output is correct
142 Correct 662 ms 48680 KB Output is correct
143 Correct 683 ms 48688 KB Output is correct
144 Correct 654 ms 47912 KB Output is correct
145 Correct 671 ms 48668 KB Output is correct
146 Correct 704 ms 48136 KB Output is correct
147 Correct 704 ms 48708 KB Output is correct
148 Correct 740 ms 48836 KB Output is correct
149 Correct 710 ms 48668 KB Output is correct
150 Correct 324 ms 44504 KB Output is correct
151 Correct 578 ms 48192 KB Output is correct
152 Correct 547 ms 48096 KB Output is correct
153 Correct 496 ms 48776 KB Output is correct