Submission #764493

# Submission time Handle Problem Language Result Execution time Memory
764493 2023-06-23T13:07:29 Z vjudge1 Food Court (JOI21_foodcourt) C++17
100 / 100
569 ms 77192 KB
/*
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx2,fma,bmi,bmi2,sse4.2,popcnt,lzcnt")
*/

#include <bits/stdc++.h>
#define taskname ""
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define int long long
#define ll long long
#define ld long double
#define pb push_back
#define ff first
#define ss second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vii vector<pii>
using namespace std;

const int mxN = 250000 + 5;
const int mod = 1e9 + 7;
const ll oo = 1e18;

struct node {
    ll sum_plus, sum_minus, idx;
    pll pref_min;

    node() {
        sum_plus = sum_minus = idx = 0;
        pref_min = {0, mod};
    }

    node operator + (const node &o) {
        node res;
        res.sum_plus = sum_plus + o.sum_plus;
        res.sum_minus = sum_minus + o.sum_minus;
        res.pref_min = min(pref_min, {sum_plus - sum_minus + o.pref_min.ff, o.pref_min.ss});
        return res;
    }
} segtree[4 * mxN];

int n, m, q, ans[mxN];
vector<vector<ll>> query;
vi query_time[mxN], all_query;
vii actual_query[mxN];

void update(int l, int r, int idx, int pos, int val) {
    if(l == r) {
        if(val > 0) {
            if(query[pos][0] == 1) segtree[idx].sum_plus = query[pos][2];
            else if(query[pos][0] == 2) segtree[idx].sum_minus = query[pos][1];
            segtree[idx].pref_min = {min(segtree[idx].sum_plus, -segtree[idx].sum_minus), pos};
            segtree[idx].idx = pos;
        }
        else {
            segtree[idx] = node();
        }
        return;
    }

    int mid = (l + r) >> 1;
    if(pos <= mid) update(l, mid, idx << 1, pos, val);
    else update(mid + 1, r, idx << 1 | 1, pos, val);

    segtree[idx] = segtree[idx << 1] + segtree[idx << 1 | 1];
}

node get(int l, int r, int idx, int u, int v) {
    if(v < u) return node();
    if(u <= l && r <= v) {
        return segtree[idx];
    }
    int mid = (l + r) >> 1;
    if(v <= mid) return get(l, mid, idx << 1, u, v);
    else if(mid + 1 <= u) return get(mid + 1, r, idx << 1 | 1, u, v);
    else return get(l, mid, idx << 1, u, v) + get(mid + 1, r, idx << 1 | 1, u, v);
}

int huutuannguvailon(int cur_l, int cur_r, ll k) {
    int l = 1, r = q, idx = 1;
    while(l < r) {
        int mid = (l + r) >> 1;
        if(k > segtree[idx << 1].sum_plus) {
            k -= segtree[idx << 1].sum_plus;
            idx = idx << 1 | 1, l = mid + 1;
        }
        else {
            idx <<= 1, r = mid;
        }
    }
    return query[l][1];
}

void solve() {
    cin >> n >> m >> q;
    
    query.pb({});
    for(int i = 1; i <= q; ++i) {
        int type; cin >> type;
        vector<ll> tmp = {type};
        if(type == 1) {
            int l, r; cin >> l >> r;
            query_time[l].emplace_back(i);
            query_time[r + 1].emplace_back(-i);
            ll k, c; cin >> c >> k;
            tmp.emplace_back(c);
            tmp.emplace_back(k);
        }
        else if(type == 2) {
            int l, r; cin >> l >> r;
            query_time[l].emplace_back(i);
            query_time[r + 1].emplace_back(-i);
            ll k; cin >> k; tmp.emplace_back(k);
        }
        else {
            all_query.emplace_back(i);
            ll cur, k; cin >> cur >> k;
            actual_query[cur].emplace_back(i, k);
        }
        query.pb(tmp);
    }

    for(int i = 1; i <= n; ++i) {
        for(int &val : query_time[i]) {
            if(val > 0) update(1, q, 1, val, 1);
            else update(1, q, 1, -val, -1);
        }
        
        int cope = segtree[1].pref_min.ss;

        if(cope == mod) {
            for(auto &[idx, k] : actual_query[i])
                ans[idx] = 0;
            continue;
        }

        for(auto &[idx, k] : actual_query[i]) {
            auto cur = get(1, q, 1, 1, idx);
            cope = cur.pref_min.ss;

            if(cope == mod || cope == idx) {
                ans[idx] = 0;
                continue;
            }

            auto cur1 = get(1, q, 1, cope, idx);
            if(query[cope][0] == 2)
                cur1.sum_minus -= query[cope][1];

            ll actual_k = k + cur1.sum_minus;
            if(actual_k > cur1.sum_plus) {
                ans[idx] = 0;
                continue;
            }

            ans[idx] = huutuannguvailon(cope, idx, actual_k + cur.sum_plus - cur1.sum_plus);
        }
    }

    for(int &idx : all_query) cout << ans[idx] << endl;
}

signed main() {

#ifndef CDuongg
    if(fopen(taskname".inp", "r"))
        assert(freopen(taskname".inp", "r", stdin)), assert(freopen(taskname".out", "w", stdout));
#else
    freopen("bai3.inp", "r", stdin);
    freopen("bai3.out", "w", stdout);
    auto start = chrono::high_resolution_clock::now();
#endif

    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1; //cin >> t;
    while(t--) solve();

#ifdef CDuongg
    auto end = chrono::high_resolution_clock::now();
    // cout << "\n"; for(int i = 1; i <= 100; ++i) cout << '=';
    // cout << "\nExecution time: " << chrono::duration_cast<chrono::milliseconds> (end - start).count() << "[ms]" << endl;
#endif

}
# Verdict Execution time Memory Grader output
1 Correct 19 ms 51284 KB Output is correct
2 Correct 20 ms 51288 KB Output is correct
3 Correct 19 ms 51284 KB Output is correct
4 Correct 19 ms 51420 KB Output is correct
5 Correct 19 ms 51388 KB Output is correct
6 Correct 19 ms 51280 KB Output is correct
7 Correct 19 ms 51412 KB Output is correct
8 Correct 21 ms 51388 KB Output is correct
9 Correct 20 ms 51412 KB Output is correct
10 Correct 20 ms 51336 KB Output is correct
11 Correct 21 ms 51412 KB Output is correct
12 Correct 20 ms 51344 KB Output is correct
13 Correct 20 ms 51376 KB Output is correct
14 Correct 20 ms 51380 KB Output is correct
15 Correct 24 ms 51240 KB Output is correct
16 Correct 20 ms 51284 KB Output is correct
17 Correct 21 ms 51360 KB Output is correct
18 Correct 20 ms 51364 KB Output is correct
19 Correct 20 ms 51276 KB Output is correct
20 Correct 20 ms 51280 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 51284 KB Output is correct
2 Correct 20 ms 51288 KB Output is correct
3 Correct 19 ms 51284 KB Output is correct
4 Correct 19 ms 51420 KB Output is correct
5 Correct 19 ms 51388 KB Output is correct
6 Correct 19 ms 51280 KB Output is correct
7 Correct 19 ms 51412 KB Output is correct
8 Correct 21 ms 51388 KB Output is correct
9 Correct 20 ms 51412 KB Output is correct
10 Correct 20 ms 51336 KB Output is correct
11 Correct 21 ms 51412 KB Output is correct
12 Correct 20 ms 51344 KB Output is correct
13 Correct 20 ms 51376 KB Output is correct
14 Correct 20 ms 51380 KB Output is correct
15 Correct 24 ms 51240 KB Output is correct
16 Correct 20 ms 51284 KB Output is correct
17 Correct 21 ms 51360 KB Output is correct
18 Correct 20 ms 51364 KB Output is correct
19 Correct 20 ms 51276 KB Output is correct
20 Correct 20 ms 51280 KB Output is correct
21 Correct 22 ms 51384 KB Output is correct
22 Correct 24 ms 51396 KB Output is correct
23 Correct 20 ms 51284 KB Output is correct
24 Correct 20 ms 51356 KB Output is correct
25 Correct 20 ms 51316 KB Output is correct
26 Correct 19 ms 51332 KB Output is correct
27 Correct 21 ms 51412 KB Output is correct
28 Correct 20 ms 51392 KB Output is correct
29 Correct 20 ms 51412 KB Output is correct
30 Correct 21 ms 51284 KB Output is correct
31 Correct 20 ms 51336 KB Output is correct
32 Correct 21 ms 51420 KB Output is correct
33 Correct 20 ms 51380 KB Output is correct
34 Correct 20 ms 51292 KB Output is correct
35 Correct 20 ms 51284 KB Output is correct
36 Correct 20 ms 51412 KB Output is correct
37 Correct 20 ms 51288 KB Output is correct
38 Correct 20 ms 51304 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 110 ms 57796 KB Output is correct
2 Correct 97 ms 57712 KB Output is correct
3 Correct 96 ms 57748 KB Output is correct
4 Correct 101 ms 57728 KB Output is correct
5 Correct 94 ms 57716 KB Output is correct
6 Correct 95 ms 57696 KB Output is correct
7 Correct 66 ms 56712 KB Output is correct
8 Correct 68 ms 56692 KB Output is correct
9 Correct 100 ms 57812 KB Output is correct
10 Correct 93 ms 57676 KB Output is correct
11 Correct 91 ms 57700 KB Output is correct
12 Correct 92 ms 57700 KB Output is correct
13 Correct 86 ms 56984 KB Output is correct
14 Correct 102 ms 57716 KB Output is correct
15 Correct 88 ms 57324 KB Output is correct
16 Correct 88 ms 57584 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 454 ms 74420 KB Output is correct
2 Correct 363 ms 69804 KB Output is correct
3 Correct 498 ms 76640 KB Output is correct
4 Correct 363 ms 69712 KB Output is correct
5 Correct 321 ms 69652 KB Output is correct
6 Correct 463 ms 76256 KB Output is correct
7 Correct 236 ms 72832 KB Output is correct
8 Correct 251 ms 71896 KB Output is correct
9 Correct 506 ms 76780 KB Output is correct
10 Correct 496 ms 76804 KB Output is correct
11 Correct 447 ms 76104 KB Output is correct
12 Correct 464 ms 76084 KB Output is correct
13 Correct 456 ms 76076 KB Output is correct
14 Correct 489 ms 76084 KB Output is correct
15 Correct 510 ms 76080 KB Output is correct
16 Correct 497 ms 76084 KB Output is correct
17 Correct 493 ms 76088 KB Output is correct
18 Correct 460 ms 76200 KB Output is correct
19 Correct 497 ms 76132 KB Output is correct
20 Correct 501 ms 76088 KB Output is correct
21 Correct 472 ms 76084 KB Output is correct
22 Correct 480 ms 76184 KB Output is correct
23 Correct 500 ms 76168 KB Output is correct
24 Correct 480 ms 76080 KB Output is correct
25 Correct 458 ms 73776 KB Output is correct
26 Correct 427 ms 74208 KB Output is correct
27 Correct 356 ms 74420 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 51284 KB Output is correct
2 Correct 20 ms 51288 KB Output is correct
3 Correct 19 ms 51284 KB Output is correct
4 Correct 19 ms 51420 KB Output is correct
5 Correct 19 ms 51388 KB Output is correct
6 Correct 19 ms 51280 KB Output is correct
7 Correct 19 ms 51412 KB Output is correct
8 Correct 21 ms 51388 KB Output is correct
9 Correct 20 ms 51412 KB Output is correct
10 Correct 20 ms 51336 KB Output is correct
11 Correct 21 ms 51412 KB Output is correct
12 Correct 20 ms 51344 KB Output is correct
13 Correct 20 ms 51376 KB Output is correct
14 Correct 20 ms 51380 KB Output is correct
15 Correct 24 ms 51240 KB Output is correct
16 Correct 20 ms 51284 KB Output is correct
17 Correct 21 ms 51360 KB Output is correct
18 Correct 20 ms 51364 KB Output is correct
19 Correct 20 ms 51276 KB Output is correct
20 Correct 20 ms 51280 KB Output is correct
21 Correct 110 ms 57796 KB Output is correct
22 Correct 97 ms 57712 KB Output is correct
23 Correct 96 ms 57748 KB Output is correct
24 Correct 101 ms 57728 KB Output is correct
25 Correct 94 ms 57716 KB Output is correct
26 Correct 95 ms 57696 KB Output is correct
27 Correct 66 ms 56712 KB Output is correct
28 Correct 68 ms 56692 KB Output is correct
29 Correct 100 ms 57812 KB Output is correct
30 Correct 93 ms 57676 KB Output is correct
31 Correct 91 ms 57700 KB Output is correct
32 Correct 92 ms 57700 KB Output is correct
33 Correct 86 ms 56984 KB Output is correct
34 Correct 102 ms 57716 KB Output is correct
35 Correct 88 ms 57324 KB Output is correct
36 Correct 88 ms 57584 KB Output is correct
37 Correct 120 ms 57128 KB Output is correct
38 Correct 80 ms 56412 KB Output is correct
39 Correct 57 ms 55728 KB Output is correct
40 Correct 64 ms 56584 KB Output is correct
41 Correct 98 ms 57732 KB Output is correct
42 Correct 96 ms 57680 KB Output is correct
43 Correct 102 ms 57732 KB Output is correct
44 Correct 98 ms 57680 KB Output is correct
45 Correct 115 ms 57716 KB Output is correct
46 Correct 107 ms 57724 KB Output is correct
47 Correct 82 ms 56956 KB Output is correct
48 Correct 112 ms 57180 KB Output is correct
49 Correct 76 ms 55804 KB Output is correct
50 Correct 85 ms 56756 KB Output is correct
51 Correct 101 ms 57728 KB Output is correct
52 Correct 94 ms 57656 KB Output is correct
53 Correct 81 ms 56276 KB Output is correct
54 Correct 97 ms 57560 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 135 ms 57212 KB Output is correct
2 Correct 114 ms 57828 KB Output is correct
3 Correct 121 ms 57964 KB Output is correct
4 Correct 85 ms 56000 KB Output is correct
5 Correct 111 ms 57024 KB Output is correct
6 Correct 121 ms 57852 KB Output is correct
7 Correct 77 ms 56048 KB Output is correct
8 Correct 77 ms 55776 KB Output is correct
9 Correct 100 ms 57140 KB Output is correct
10 Correct 81 ms 55452 KB Output is correct
11 Correct 103 ms 57216 KB Output is correct
12 Correct 105 ms 57340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 51284 KB Output is correct
2 Correct 20 ms 51288 KB Output is correct
3 Correct 19 ms 51284 KB Output is correct
4 Correct 19 ms 51420 KB Output is correct
5 Correct 19 ms 51388 KB Output is correct
6 Correct 19 ms 51280 KB Output is correct
7 Correct 19 ms 51412 KB Output is correct
8 Correct 21 ms 51388 KB Output is correct
9 Correct 20 ms 51412 KB Output is correct
10 Correct 20 ms 51336 KB Output is correct
11 Correct 21 ms 51412 KB Output is correct
12 Correct 20 ms 51344 KB Output is correct
13 Correct 20 ms 51376 KB Output is correct
14 Correct 20 ms 51380 KB Output is correct
15 Correct 24 ms 51240 KB Output is correct
16 Correct 20 ms 51284 KB Output is correct
17 Correct 21 ms 51360 KB Output is correct
18 Correct 20 ms 51364 KB Output is correct
19 Correct 20 ms 51276 KB Output is correct
20 Correct 20 ms 51280 KB Output is correct
21 Correct 22 ms 51384 KB Output is correct
22 Correct 24 ms 51396 KB Output is correct
23 Correct 20 ms 51284 KB Output is correct
24 Correct 20 ms 51356 KB Output is correct
25 Correct 20 ms 51316 KB Output is correct
26 Correct 19 ms 51332 KB Output is correct
27 Correct 21 ms 51412 KB Output is correct
28 Correct 20 ms 51392 KB Output is correct
29 Correct 20 ms 51412 KB Output is correct
30 Correct 21 ms 51284 KB Output is correct
31 Correct 20 ms 51336 KB Output is correct
32 Correct 21 ms 51420 KB Output is correct
33 Correct 20 ms 51380 KB Output is correct
34 Correct 20 ms 51292 KB Output is correct
35 Correct 20 ms 51284 KB Output is correct
36 Correct 20 ms 51412 KB Output is correct
37 Correct 20 ms 51288 KB Output is correct
38 Correct 20 ms 51304 KB Output is correct
39 Correct 110 ms 57796 KB Output is correct
40 Correct 97 ms 57712 KB Output is correct
41 Correct 96 ms 57748 KB Output is correct
42 Correct 101 ms 57728 KB Output is correct
43 Correct 94 ms 57716 KB Output is correct
44 Correct 95 ms 57696 KB Output is correct
45 Correct 66 ms 56712 KB Output is correct
46 Correct 68 ms 56692 KB Output is correct
47 Correct 100 ms 57812 KB Output is correct
48 Correct 93 ms 57676 KB Output is correct
49 Correct 91 ms 57700 KB Output is correct
50 Correct 92 ms 57700 KB Output is correct
51 Correct 86 ms 56984 KB Output is correct
52 Correct 102 ms 57716 KB Output is correct
53 Correct 88 ms 57324 KB Output is correct
54 Correct 88 ms 57584 KB Output is correct
55 Correct 120 ms 57128 KB Output is correct
56 Correct 80 ms 56412 KB Output is correct
57 Correct 57 ms 55728 KB Output is correct
58 Correct 64 ms 56584 KB Output is correct
59 Correct 98 ms 57732 KB Output is correct
60 Correct 96 ms 57680 KB Output is correct
61 Correct 102 ms 57732 KB Output is correct
62 Correct 98 ms 57680 KB Output is correct
63 Correct 115 ms 57716 KB Output is correct
64 Correct 107 ms 57724 KB Output is correct
65 Correct 82 ms 56956 KB Output is correct
66 Correct 112 ms 57180 KB Output is correct
67 Correct 76 ms 55804 KB Output is correct
68 Correct 85 ms 56756 KB Output is correct
69 Correct 101 ms 57728 KB Output is correct
70 Correct 94 ms 57656 KB Output is correct
71 Correct 81 ms 56276 KB Output is correct
72 Correct 97 ms 57560 KB Output is correct
73 Correct 135 ms 57212 KB Output is correct
74 Correct 114 ms 57828 KB Output is correct
75 Correct 121 ms 57964 KB Output is correct
76 Correct 85 ms 56000 KB Output is correct
77 Correct 111 ms 57024 KB Output is correct
78 Correct 121 ms 57852 KB Output is correct
79 Correct 77 ms 56048 KB Output is correct
80 Correct 77 ms 55776 KB Output is correct
81 Correct 100 ms 57140 KB Output is correct
82 Correct 81 ms 55452 KB Output is correct
83 Correct 103 ms 57216 KB Output is correct
84 Correct 105 ms 57340 KB Output is correct
85 Correct 102 ms 57112 KB Output is correct
86 Correct 108 ms 57752 KB Output is correct
87 Correct 89 ms 56880 KB Output is correct
88 Correct 105 ms 57668 KB Output is correct
89 Correct 71 ms 55644 KB Output is correct
90 Correct 104 ms 57676 KB Output is correct
91 Correct 86 ms 56500 KB Output is correct
92 Correct 83 ms 56284 KB Output is correct
93 Correct 103 ms 57732 KB Output is correct
94 Correct 100 ms 57792 KB Output is correct
95 Correct 112 ms 57492 KB Output is correct
96 Correct 102 ms 57736 KB Output is correct
97 Correct 104 ms 57668 KB Output is correct
98 Correct 89 ms 56680 KB Output is correct
99 Correct 81 ms 56920 KB Output is correct
100 Correct 103 ms 56132 KB Output is correct
101 Correct 98 ms 57164 KB Output is correct
102 Correct 85 ms 57248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 51284 KB Output is correct
2 Correct 20 ms 51288 KB Output is correct
3 Correct 19 ms 51284 KB Output is correct
4 Correct 19 ms 51420 KB Output is correct
5 Correct 19 ms 51388 KB Output is correct
6 Correct 19 ms 51280 KB Output is correct
7 Correct 19 ms 51412 KB Output is correct
8 Correct 21 ms 51388 KB Output is correct
9 Correct 20 ms 51412 KB Output is correct
10 Correct 20 ms 51336 KB Output is correct
11 Correct 21 ms 51412 KB Output is correct
12 Correct 20 ms 51344 KB Output is correct
13 Correct 20 ms 51376 KB Output is correct
14 Correct 20 ms 51380 KB Output is correct
15 Correct 24 ms 51240 KB Output is correct
16 Correct 20 ms 51284 KB Output is correct
17 Correct 21 ms 51360 KB Output is correct
18 Correct 20 ms 51364 KB Output is correct
19 Correct 20 ms 51276 KB Output is correct
20 Correct 20 ms 51280 KB Output is correct
21 Correct 22 ms 51384 KB Output is correct
22 Correct 24 ms 51396 KB Output is correct
23 Correct 20 ms 51284 KB Output is correct
24 Correct 20 ms 51356 KB Output is correct
25 Correct 20 ms 51316 KB Output is correct
26 Correct 19 ms 51332 KB Output is correct
27 Correct 21 ms 51412 KB Output is correct
28 Correct 20 ms 51392 KB Output is correct
29 Correct 20 ms 51412 KB Output is correct
30 Correct 21 ms 51284 KB Output is correct
31 Correct 20 ms 51336 KB Output is correct
32 Correct 21 ms 51420 KB Output is correct
33 Correct 20 ms 51380 KB Output is correct
34 Correct 20 ms 51292 KB Output is correct
35 Correct 20 ms 51284 KB Output is correct
36 Correct 20 ms 51412 KB Output is correct
37 Correct 20 ms 51288 KB Output is correct
38 Correct 20 ms 51304 KB Output is correct
39 Correct 110 ms 57796 KB Output is correct
40 Correct 97 ms 57712 KB Output is correct
41 Correct 96 ms 57748 KB Output is correct
42 Correct 101 ms 57728 KB Output is correct
43 Correct 94 ms 57716 KB Output is correct
44 Correct 95 ms 57696 KB Output is correct
45 Correct 66 ms 56712 KB Output is correct
46 Correct 68 ms 56692 KB Output is correct
47 Correct 100 ms 57812 KB Output is correct
48 Correct 93 ms 57676 KB Output is correct
49 Correct 91 ms 57700 KB Output is correct
50 Correct 92 ms 57700 KB Output is correct
51 Correct 86 ms 56984 KB Output is correct
52 Correct 102 ms 57716 KB Output is correct
53 Correct 88 ms 57324 KB Output is correct
54 Correct 88 ms 57584 KB Output is correct
55 Correct 454 ms 74420 KB Output is correct
56 Correct 363 ms 69804 KB Output is correct
57 Correct 498 ms 76640 KB Output is correct
58 Correct 363 ms 69712 KB Output is correct
59 Correct 321 ms 69652 KB Output is correct
60 Correct 463 ms 76256 KB Output is correct
61 Correct 236 ms 72832 KB Output is correct
62 Correct 251 ms 71896 KB Output is correct
63 Correct 506 ms 76780 KB Output is correct
64 Correct 496 ms 76804 KB Output is correct
65 Correct 447 ms 76104 KB Output is correct
66 Correct 464 ms 76084 KB Output is correct
67 Correct 456 ms 76076 KB Output is correct
68 Correct 489 ms 76084 KB Output is correct
69 Correct 510 ms 76080 KB Output is correct
70 Correct 497 ms 76084 KB Output is correct
71 Correct 493 ms 76088 KB Output is correct
72 Correct 460 ms 76200 KB Output is correct
73 Correct 497 ms 76132 KB Output is correct
74 Correct 501 ms 76088 KB Output is correct
75 Correct 472 ms 76084 KB Output is correct
76 Correct 480 ms 76184 KB Output is correct
77 Correct 500 ms 76168 KB Output is correct
78 Correct 480 ms 76080 KB Output is correct
79 Correct 458 ms 73776 KB Output is correct
80 Correct 427 ms 74208 KB Output is correct
81 Correct 356 ms 74420 KB Output is correct
82 Correct 120 ms 57128 KB Output is correct
83 Correct 80 ms 56412 KB Output is correct
84 Correct 57 ms 55728 KB Output is correct
85 Correct 64 ms 56584 KB Output is correct
86 Correct 98 ms 57732 KB Output is correct
87 Correct 96 ms 57680 KB Output is correct
88 Correct 102 ms 57732 KB Output is correct
89 Correct 98 ms 57680 KB Output is correct
90 Correct 115 ms 57716 KB Output is correct
91 Correct 107 ms 57724 KB Output is correct
92 Correct 82 ms 56956 KB Output is correct
93 Correct 112 ms 57180 KB Output is correct
94 Correct 76 ms 55804 KB Output is correct
95 Correct 85 ms 56756 KB Output is correct
96 Correct 101 ms 57728 KB Output is correct
97 Correct 94 ms 57656 KB Output is correct
98 Correct 81 ms 56276 KB Output is correct
99 Correct 97 ms 57560 KB Output is correct
100 Correct 135 ms 57212 KB Output is correct
101 Correct 114 ms 57828 KB Output is correct
102 Correct 121 ms 57964 KB Output is correct
103 Correct 85 ms 56000 KB Output is correct
104 Correct 111 ms 57024 KB Output is correct
105 Correct 121 ms 57852 KB Output is correct
106 Correct 77 ms 56048 KB Output is correct
107 Correct 77 ms 55776 KB Output is correct
108 Correct 100 ms 57140 KB Output is correct
109 Correct 81 ms 55452 KB Output is correct
110 Correct 103 ms 57216 KB Output is correct
111 Correct 105 ms 57340 KB Output is correct
112 Correct 102 ms 57112 KB Output is correct
113 Correct 108 ms 57752 KB Output is correct
114 Correct 89 ms 56880 KB Output is correct
115 Correct 105 ms 57668 KB Output is correct
116 Correct 71 ms 55644 KB Output is correct
117 Correct 104 ms 57676 KB Output is correct
118 Correct 86 ms 56500 KB Output is correct
119 Correct 83 ms 56284 KB Output is correct
120 Correct 103 ms 57732 KB Output is correct
121 Correct 100 ms 57792 KB Output is correct
122 Correct 112 ms 57492 KB Output is correct
123 Correct 102 ms 57736 KB Output is correct
124 Correct 104 ms 57668 KB Output is correct
125 Correct 89 ms 56680 KB Output is correct
126 Correct 81 ms 56920 KB Output is correct
127 Correct 103 ms 56132 KB Output is correct
128 Correct 98 ms 57164 KB Output is correct
129 Correct 85 ms 57248 KB Output is correct
130 Correct 535 ms 76740 KB Output is correct
131 Correct 374 ms 69868 KB Output is correct
132 Correct 510 ms 76784 KB Output is correct
133 Correct 437 ms 75224 KB Output is correct
134 Correct 399 ms 72812 KB Output is correct
135 Correct 460 ms 76376 KB Output is correct
136 Correct 520 ms 77080 KB Output is correct
137 Correct 517 ms 77192 KB Output is correct
138 Correct 459 ms 76344 KB Output is correct
139 Correct 454 ms 76340 KB Output is correct
140 Correct 496 ms 76340 KB Output is correct
141 Correct 490 ms 76336 KB Output is correct
142 Correct 496 ms 76496 KB Output is correct
143 Correct 541 ms 76360 KB Output is correct
144 Correct 486 ms 76388 KB Output is correct
145 Correct 502 ms 76404 KB Output is correct
146 Correct 535 ms 76312 KB Output is correct
147 Correct 569 ms 76344 KB Output is correct
148 Correct 538 ms 76336 KB Output is correct
149 Correct 536 ms 76372 KB Output is correct
150 Correct 326 ms 73292 KB Output is correct
151 Correct 473 ms 74576 KB Output is correct
152 Correct 450 ms 74472 KB Output is correct
153 Correct 367 ms 74552 KB Output is correct