답안 #1007343

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1007343 2024-06-24T16:09:59 Z LOLOLO 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
521 ms 110988 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
 
#define           f     first
#define           s     second
#define           pb    push_back
#define           ep    emplace
#define           eb    emplace_back
#define           lb    lower_bound
#define           ub    upper_bound
#define       all(x)    x.begin(), x.end()
#define      rall(x)    x.rbegin(), x.rend()
#define   uniquev(v)    sort(all(v)), (v).resize(unique(all(v)) - (v).begin())
#define     mem(f,x)    memset(f , x , sizeof(f))
#define        sz(x)    (ll)(x).size()
#define  __lcm(a, b)    (1ll * ((a) / __gcd((a), (b))) * (b))
#define          mxx    *max_element
#define          mnn    *min_element
#define    cntbit(x)    __builtin_popcountll(x)
#define       len(x)    (int)(x.length())

const int N = 3e5 + 20;

struct seg{
    vector <ll> sum, mi;
    seg(int n) {
        sum.assign(n * 4 + 100, 0);
        mi.assign(n * 4 + 100, 0);
    }

    void upd(int i, int l, int r, int p, ll v) {
        if (l > p || r < p)
            return;

        if (l == r) {
            sum[i] += v;
            mi[i] = min((ll)0, sum[i]);
            return; 
        }

        int m = (l + r) / 2;
        upd(i * 2, l, m, p, v);
        upd(i * 2 + 1, m + 1, r, p, v);
        sum[i] = sum[i * 2] + sum[i * 2 + 1];
        mi[i] = min(mi[i * 2], sum[i * 2] + mi[i * 2 + 1]);
    }

    pair <ll, ll> get(int i, int l, int r, int u) {
        if (l > u)
            return {0, 0};

        if (r <= u)
            return {sum[i], mi[i]};

        int m = (l + r) / 2;
        pair <ll, ll> A = get(i * 2, l, m, u), B = get(i * 2 + 1, m + 1, r, u);
        return {A.f + B.f, min(A.s, B.s + A.f)};
    }
};

struct fen{
    vector <ll> f;
    int N;
    fen(int n) {
        N = n;
        f.assign(n + 1, 0);
    }

    void upd(int i, int x) {
        for (; i <= N; i += i & (-i))
            f[i] += x;
    }

    ll get(int i) {
        ll s = 0;
        for (; i; i -= i & (-i))
            s += f[i];

        return s;
    }
};

struct ST{
    vector <pair <ll, ll>> st;
    vector <ll> laz;

    void build(int i, int l, int r) {
        if (l == r) {
            st[i] = {0, l};
            return;
        }

        int m = (l + r) / 2;
        build(i * 2, l, m);
        build(i * 2 + 1, m + 1, r);
        st[i] = min(st[i * 2], st[i * 2 + 1]);
    }

    ST(int n) {
        st.assign(n * 4 + 10, {0, 0});
        laz.assign(n * 4 + 10, 0);
        build(1, 1, n);
    }

    void push(int i) {
        ll t = laz[i];
        laz[i * 2] += t;
        laz[i * 2 + 1] += t;
        st[i * 2].f += t;
        st[i * 2 + 1].f += t;
        laz[i] = 0;
    }

    void upd(int i, int l, int r, int u, int v, ll c) {
        if (l > v || r < u)
            return;

        if (l >= u && r <= v) {
            laz[i] += c;
            st[i].f += c;
            return;
        }

        push(i);
        int m = (l + r) / 2;
        upd(i * 2, l, m, u, v, c);
        upd(i * 2 + 1, m + 1, r, u, v, c);
        st[i] = min(st[i * 2], st[i * 2 + 1]);
    }

    pair <ll, ll> get() {
        return st[1];
    }
};

ll ans[N];
bool is[N];

vector < pair <ll, ll>> event[N], add[N], ask[N], save[N];

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    vector < vector <ll>> need;
    int n, m, q;
    cin >> n >> m >> q;

    fen bit(q);
    seg seg(q);
    ST st(n);

    for (int i = 1; i <= q; i++) {
        int t;
        cin >> t;
        if (t == 1) {
            ll l, r, c, k;
            cin >> l >> r >> c >> k;
            need.pb({l, r, c, k});
            add[l].pb({i, k});
            add[r + 1].pb({i, -k});
            event[l].pb({i, k});
            event[r + 1].pb({i, -k});
        }

        if (t == 2) {
            ll l, r, k;
            cin >> l >> r >> k;
            event[l].pb({i, -k});
            event[r + 1].pb({i, k});   
        }

        if (t == 3) {
            ll a, b;
            cin >> a >> b;
            ask[a].pb({i, b});
            is[i] = 1;
        }
    }

    for (int i = 1; i <= n; i++) {
        for (auto x : event[i]) {
            seg.upd(1, 1, q, x.f, x.s);
        }

        for (auto x : add[i]) {
            bit.upd(x.f, x.s);
        }

        for (auto x : ask[i]) {
            pair <ll, ll> tt = seg.get(1, 1, q, x.f);
            ll num = tt.f - tt.s;
            if (num >= x.s) {
                save[i].pb({bit.get(x.f) - (num - x.s), x.f});
            }
        }

        sort(all(save[i]), greater <pair <ll, ll>> ());
        if (sz(save[i])) {
            st.upd(1, 1, n, i, i, save[i].back().f);
        } else {
            st.upd(1, 1, n, i, i, 1e16);
        }
    }

    for (auto x : need) {
        st.upd(1, 1, n, x[0], x[1], -x[3]);
        while (1) {
            pair <ll, ll> tt = st.get();
            if (tt.f <= 0) {
                int i = tt.s;
                ans[save[i].back().s] = x[2];
                ll pr = save[i].back().f;
                save[i].pop_back();
                if (sz(save[i])) {
                    st.upd(1, 1, n, i, i, save[i].back().f - pr);
                } else {
                    st.upd(1, 1, n, i, i, 1e16 - pr);
                }
            } else {
                break;
            }
        }
    }

    for (int i = 1; i <= q; i++) {
        if (is[i]) {
            cout << ans[i] << '\n';
        }
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 29532 KB Output is correct
2 Correct 13 ms 29788 KB Output is correct
3 Correct 11 ms 29788 KB Output is correct
4 Correct 10 ms 29760 KB Output is correct
5 Correct 10 ms 29532 KB Output is correct
6 Correct 8 ms 29532 KB Output is correct
7 Correct 11 ms 29784 KB Output is correct
8 Correct 8 ms 29788 KB Output is correct
9 Correct 8 ms 29788 KB Output is correct
10 Correct 14 ms 29876 KB Output is correct
11 Correct 9 ms 29788 KB Output is correct
12 Correct 9 ms 29712 KB Output is correct
13 Correct 7 ms 29784 KB Output is correct
14 Correct 8 ms 29884 KB Output is correct
15 Correct 9 ms 29532 KB Output is correct
16 Correct 10 ms 29788 KB Output is correct
17 Correct 11 ms 29528 KB Output is correct
18 Correct 10 ms 29788 KB Output is correct
19 Correct 9 ms 29900 KB Output is correct
20 Correct 10 ms 29788 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 29532 KB Output is correct
2 Correct 13 ms 29788 KB Output is correct
3 Correct 11 ms 29788 KB Output is correct
4 Correct 10 ms 29760 KB Output is correct
5 Correct 10 ms 29532 KB Output is correct
6 Correct 8 ms 29532 KB Output is correct
7 Correct 11 ms 29784 KB Output is correct
8 Correct 8 ms 29788 KB Output is correct
9 Correct 8 ms 29788 KB Output is correct
10 Correct 14 ms 29876 KB Output is correct
11 Correct 9 ms 29788 KB Output is correct
12 Correct 9 ms 29712 KB Output is correct
13 Correct 7 ms 29784 KB Output is correct
14 Correct 8 ms 29884 KB Output is correct
15 Correct 9 ms 29532 KB Output is correct
16 Correct 10 ms 29788 KB Output is correct
17 Correct 11 ms 29528 KB Output is correct
18 Correct 10 ms 29788 KB Output is correct
19 Correct 9 ms 29900 KB Output is correct
20 Correct 10 ms 29788 KB Output is correct
21 Correct 10 ms 29784 KB Output is correct
22 Correct 9 ms 29788 KB Output is correct
23 Correct 9 ms 29788 KB Output is correct
24 Correct 9 ms 29876 KB Output is correct
25 Correct 7 ms 29680 KB Output is correct
26 Correct 8 ms 29532 KB Output is correct
27 Correct 11 ms 29880 KB Output is correct
28 Correct 10 ms 29784 KB Output is correct
29 Correct 10 ms 29788 KB Output is correct
30 Correct 10 ms 29788 KB Output is correct
31 Correct 10 ms 29880 KB Output is correct
32 Correct 9 ms 29812 KB Output is correct
33 Correct 8 ms 29788 KB Output is correct
34 Correct 9 ms 29788 KB Output is correct
35 Correct 8 ms 29788 KB Output is correct
36 Correct 9 ms 29784 KB Output is correct
37 Correct 9 ms 29788 KB Output is correct
38 Correct 10 ms 29880 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 76 ms 45588 KB Output is correct
2 Correct 85 ms 47024 KB Output is correct
3 Correct 79 ms 45648 KB Output is correct
4 Correct 99 ms 45580 KB Output is correct
5 Correct 88 ms 47052 KB Output is correct
6 Correct 80 ms 46864 KB Output is correct
7 Correct 29 ms 37628 KB Output is correct
8 Correct 30 ms 38044 KB Output is correct
9 Correct 77 ms 45912 KB Output is correct
10 Correct 78 ms 45836 KB Output is correct
11 Correct 85 ms 46088 KB Output is correct
12 Correct 82 ms 46100 KB Output is correct
13 Correct 69 ms 44036 KB Output is correct
14 Correct 96 ms 47472 KB Output is correct
15 Correct 88 ms 47592 KB Output is correct
16 Correct 96 ms 49672 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 426 ms 94756 KB Output is correct
2 Correct 364 ms 82952 KB Output is correct
3 Correct 432 ms 101376 KB Output is correct
4 Correct 363 ms 91396 KB Output is correct
5 Correct 348 ms 86276 KB Output is correct
6 Correct 490 ms 106236 KB Output is correct
7 Correct 184 ms 69816 KB Output is correct
8 Correct 116 ms 69464 KB Output is correct
9 Correct 521 ms 105980 KB Output is correct
10 Correct 501 ms 105980 KB Output is correct
11 Correct 452 ms 102436 KB Output is correct
12 Correct 442 ms 102404 KB Output is correct
13 Correct 454 ms 102400 KB Output is correct
14 Correct 443 ms 102400 KB Output is correct
15 Correct 424 ms 102400 KB Output is correct
16 Correct 504 ms 102408 KB Output is correct
17 Correct 449 ms 102528 KB Output is correct
18 Correct 439 ms 102464 KB Output is correct
19 Correct 454 ms 102356 KB Output is correct
20 Correct 451 ms 102404 KB Output is correct
21 Correct 470 ms 102348 KB Output is correct
22 Correct 485 ms 102444 KB Output is correct
23 Correct 433 ms 102400 KB Output is correct
24 Correct 489 ms 102404 KB Output is correct
25 Correct 331 ms 93440 KB Output is correct
26 Correct 349 ms 99920 KB Output is correct
27 Correct 398 ms 110072 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 29532 KB Output is correct
2 Correct 13 ms 29788 KB Output is correct
3 Correct 11 ms 29788 KB Output is correct
4 Correct 10 ms 29760 KB Output is correct
5 Correct 10 ms 29532 KB Output is correct
6 Correct 8 ms 29532 KB Output is correct
7 Correct 11 ms 29784 KB Output is correct
8 Correct 8 ms 29788 KB Output is correct
9 Correct 8 ms 29788 KB Output is correct
10 Correct 14 ms 29876 KB Output is correct
11 Correct 9 ms 29788 KB Output is correct
12 Correct 9 ms 29712 KB Output is correct
13 Correct 7 ms 29784 KB Output is correct
14 Correct 8 ms 29884 KB Output is correct
15 Correct 9 ms 29532 KB Output is correct
16 Correct 10 ms 29788 KB Output is correct
17 Correct 11 ms 29528 KB Output is correct
18 Correct 10 ms 29788 KB Output is correct
19 Correct 9 ms 29900 KB Output is correct
20 Correct 10 ms 29788 KB Output is correct
21 Correct 76 ms 45588 KB Output is correct
22 Correct 85 ms 47024 KB Output is correct
23 Correct 79 ms 45648 KB Output is correct
24 Correct 99 ms 45580 KB Output is correct
25 Correct 88 ms 47052 KB Output is correct
26 Correct 80 ms 46864 KB Output is correct
27 Correct 29 ms 37628 KB Output is correct
28 Correct 30 ms 38044 KB Output is correct
29 Correct 77 ms 45912 KB Output is correct
30 Correct 78 ms 45836 KB Output is correct
31 Correct 85 ms 46088 KB Output is correct
32 Correct 82 ms 46100 KB Output is correct
33 Correct 69 ms 44036 KB Output is correct
34 Correct 96 ms 47472 KB Output is correct
35 Correct 88 ms 47592 KB Output is correct
36 Correct 96 ms 49672 KB Output is correct
37 Correct 76 ms 44444 KB Output is correct
38 Correct 76 ms 44368 KB Output is correct
39 Correct 26 ms 36976 KB Output is correct
40 Correct 31 ms 37836 KB Output is correct
41 Correct 89 ms 46348 KB Output is correct
42 Correct 98 ms 46604 KB Output is correct
43 Correct 90 ms 46348 KB Output is correct
44 Correct 103 ms 46316 KB Output is correct
45 Correct 87 ms 46352 KB Output is correct
46 Correct 96 ms 46348 KB Output is correct
47 Correct 52 ms 44820 KB Output is correct
48 Correct 80 ms 45836 KB Output is correct
49 Correct 63 ms 41284 KB Output is correct
50 Correct 83 ms 44792 KB Output is correct
51 Correct 91 ms 46604 KB Output is correct
52 Correct 91 ms 46604 KB Output is correct
53 Correct 78 ms 45836 KB Output is correct
54 Correct 102 ms 49672 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 97 ms 47372 KB Output is correct
2 Correct 100 ms 47764 KB Output is correct
3 Correct 94 ms 49160 KB Output is correct
4 Correct 77 ms 44732 KB Output is correct
5 Correct 94 ms 46860 KB Output is correct
6 Correct 116 ms 49108 KB Output is correct
7 Correct 33 ms 39796 KB Output is correct
8 Correct 34 ms 38868 KB Output is correct
9 Correct 59 ms 47728 KB Output is correct
10 Correct 68 ms 43788 KB Output is correct
11 Correct 91 ms 48340 KB Output is correct
12 Correct 104 ms 48392 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 29532 KB Output is correct
2 Correct 13 ms 29788 KB Output is correct
3 Correct 11 ms 29788 KB Output is correct
4 Correct 10 ms 29760 KB Output is correct
5 Correct 10 ms 29532 KB Output is correct
6 Correct 8 ms 29532 KB Output is correct
7 Correct 11 ms 29784 KB Output is correct
8 Correct 8 ms 29788 KB Output is correct
9 Correct 8 ms 29788 KB Output is correct
10 Correct 14 ms 29876 KB Output is correct
11 Correct 9 ms 29788 KB Output is correct
12 Correct 9 ms 29712 KB Output is correct
13 Correct 7 ms 29784 KB Output is correct
14 Correct 8 ms 29884 KB Output is correct
15 Correct 9 ms 29532 KB Output is correct
16 Correct 10 ms 29788 KB Output is correct
17 Correct 11 ms 29528 KB Output is correct
18 Correct 10 ms 29788 KB Output is correct
19 Correct 9 ms 29900 KB Output is correct
20 Correct 10 ms 29788 KB Output is correct
21 Correct 10 ms 29784 KB Output is correct
22 Correct 9 ms 29788 KB Output is correct
23 Correct 9 ms 29788 KB Output is correct
24 Correct 9 ms 29876 KB Output is correct
25 Correct 7 ms 29680 KB Output is correct
26 Correct 8 ms 29532 KB Output is correct
27 Correct 11 ms 29880 KB Output is correct
28 Correct 10 ms 29784 KB Output is correct
29 Correct 10 ms 29788 KB Output is correct
30 Correct 10 ms 29788 KB Output is correct
31 Correct 10 ms 29880 KB Output is correct
32 Correct 9 ms 29812 KB Output is correct
33 Correct 8 ms 29788 KB Output is correct
34 Correct 9 ms 29788 KB Output is correct
35 Correct 8 ms 29788 KB Output is correct
36 Correct 9 ms 29784 KB Output is correct
37 Correct 9 ms 29788 KB Output is correct
38 Correct 10 ms 29880 KB Output is correct
39 Correct 76 ms 45588 KB Output is correct
40 Correct 85 ms 47024 KB Output is correct
41 Correct 79 ms 45648 KB Output is correct
42 Correct 99 ms 45580 KB Output is correct
43 Correct 88 ms 47052 KB Output is correct
44 Correct 80 ms 46864 KB Output is correct
45 Correct 29 ms 37628 KB Output is correct
46 Correct 30 ms 38044 KB Output is correct
47 Correct 77 ms 45912 KB Output is correct
48 Correct 78 ms 45836 KB Output is correct
49 Correct 85 ms 46088 KB Output is correct
50 Correct 82 ms 46100 KB Output is correct
51 Correct 69 ms 44036 KB Output is correct
52 Correct 96 ms 47472 KB Output is correct
53 Correct 88 ms 47592 KB Output is correct
54 Correct 96 ms 49672 KB Output is correct
55 Correct 76 ms 44444 KB Output is correct
56 Correct 76 ms 44368 KB Output is correct
57 Correct 26 ms 36976 KB Output is correct
58 Correct 31 ms 37836 KB Output is correct
59 Correct 89 ms 46348 KB Output is correct
60 Correct 98 ms 46604 KB Output is correct
61 Correct 90 ms 46348 KB Output is correct
62 Correct 103 ms 46316 KB Output is correct
63 Correct 87 ms 46352 KB Output is correct
64 Correct 96 ms 46348 KB Output is correct
65 Correct 52 ms 44820 KB Output is correct
66 Correct 80 ms 45836 KB Output is correct
67 Correct 63 ms 41284 KB Output is correct
68 Correct 83 ms 44792 KB Output is correct
69 Correct 91 ms 46604 KB Output is correct
70 Correct 91 ms 46604 KB Output is correct
71 Correct 78 ms 45836 KB Output is correct
72 Correct 102 ms 49672 KB Output is correct
73 Correct 97 ms 47372 KB Output is correct
74 Correct 100 ms 47764 KB Output is correct
75 Correct 94 ms 49160 KB Output is correct
76 Correct 77 ms 44732 KB Output is correct
77 Correct 94 ms 46860 KB Output is correct
78 Correct 116 ms 49108 KB Output is correct
79 Correct 33 ms 39796 KB Output is correct
80 Correct 34 ms 38868 KB Output is correct
81 Correct 59 ms 47728 KB Output is correct
82 Correct 68 ms 43788 KB Output is correct
83 Correct 91 ms 48340 KB Output is correct
84 Correct 104 ms 48392 KB Output is correct
85 Correct 105 ms 45320 KB Output is correct
86 Correct 96 ms 47640 KB Output is correct
87 Correct 100 ms 46992 KB Output is correct
88 Correct 102 ms 48956 KB Output is correct
89 Correct 70 ms 42640 KB Output is correct
90 Correct 96 ms 48032 KB Output is correct
91 Correct 78 ms 43616 KB Output is correct
92 Correct 71 ms 43212 KB Output is correct
93 Correct 99 ms 48128 KB Output is correct
94 Correct 96 ms 48004 KB Output is correct
95 Correct 87 ms 47116 KB Output is correct
96 Correct 88 ms 48140 KB Output is correct
97 Correct 95 ms 47884 KB Output is correct
98 Correct 74 ms 44276 KB Output is correct
99 Correct 55 ms 46216 KB Output is correct
100 Correct 62 ms 44296 KB Output is correct
101 Correct 78 ms 47432 KB Output is correct
102 Correct 87 ms 50436 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 29532 KB Output is correct
2 Correct 13 ms 29788 KB Output is correct
3 Correct 11 ms 29788 KB Output is correct
4 Correct 10 ms 29760 KB Output is correct
5 Correct 10 ms 29532 KB Output is correct
6 Correct 8 ms 29532 KB Output is correct
7 Correct 11 ms 29784 KB Output is correct
8 Correct 8 ms 29788 KB Output is correct
9 Correct 8 ms 29788 KB Output is correct
10 Correct 14 ms 29876 KB Output is correct
11 Correct 9 ms 29788 KB Output is correct
12 Correct 9 ms 29712 KB Output is correct
13 Correct 7 ms 29784 KB Output is correct
14 Correct 8 ms 29884 KB Output is correct
15 Correct 9 ms 29532 KB Output is correct
16 Correct 10 ms 29788 KB Output is correct
17 Correct 11 ms 29528 KB Output is correct
18 Correct 10 ms 29788 KB Output is correct
19 Correct 9 ms 29900 KB Output is correct
20 Correct 10 ms 29788 KB Output is correct
21 Correct 10 ms 29784 KB Output is correct
22 Correct 9 ms 29788 KB Output is correct
23 Correct 9 ms 29788 KB Output is correct
24 Correct 9 ms 29876 KB Output is correct
25 Correct 7 ms 29680 KB Output is correct
26 Correct 8 ms 29532 KB Output is correct
27 Correct 11 ms 29880 KB Output is correct
28 Correct 10 ms 29784 KB Output is correct
29 Correct 10 ms 29788 KB Output is correct
30 Correct 10 ms 29788 KB Output is correct
31 Correct 10 ms 29880 KB Output is correct
32 Correct 9 ms 29812 KB Output is correct
33 Correct 8 ms 29788 KB Output is correct
34 Correct 9 ms 29788 KB Output is correct
35 Correct 8 ms 29788 KB Output is correct
36 Correct 9 ms 29784 KB Output is correct
37 Correct 9 ms 29788 KB Output is correct
38 Correct 10 ms 29880 KB Output is correct
39 Correct 76 ms 45588 KB Output is correct
40 Correct 85 ms 47024 KB Output is correct
41 Correct 79 ms 45648 KB Output is correct
42 Correct 99 ms 45580 KB Output is correct
43 Correct 88 ms 47052 KB Output is correct
44 Correct 80 ms 46864 KB Output is correct
45 Correct 29 ms 37628 KB Output is correct
46 Correct 30 ms 38044 KB Output is correct
47 Correct 77 ms 45912 KB Output is correct
48 Correct 78 ms 45836 KB Output is correct
49 Correct 85 ms 46088 KB Output is correct
50 Correct 82 ms 46100 KB Output is correct
51 Correct 69 ms 44036 KB Output is correct
52 Correct 96 ms 47472 KB Output is correct
53 Correct 88 ms 47592 KB Output is correct
54 Correct 96 ms 49672 KB Output is correct
55 Correct 426 ms 94756 KB Output is correct
56 Correct 364 ms 82952 KB Output is correct
57 Correct 432 ms 101376 KB Output is correct
58 Correct 363 ms 91396 KB Output is correct
59 Correct 348 ms 86276 KB Output is correct
60 Correct 490 ms 106236 KB Output is correct
61 Correct 184 ms 69816 KB Output is correct
62 Correct 116 ms 69464 KB Output is correct
63 Correct 521 ms 105980 KB Output is correct
64 Correct 501 ms 105980 KB Output is correct
65 Correct 452 ms 102436 KB Output is correct
66 Correct 442 ms 102404 KB Output is correct
67 Correct 454 ms 102400 KB Output is correct
68 Correct 443 ms 102400 KB Output is correct
69 Correct 424 ms 102400 KB Output is correct
70 Correct 504 ms 102408 KB Output is correct
71 Correct 449 ms 102528 KB Output is correct
72 Correct 439 ms 102464 KB Output is correct
73 Correct 454 ms 102356 KB Output is correct
74 Correct 451 ms 102404 KB Output is correct
75 Correct 470 ms 102348 KB Output is correct
76 Correct 485 ms 102444 KB Output is correct
77 Correct 433 ms 102400 KB Output is correct
78 Correct 489 ms 102404 KB Output is correct
79 Correct 331 ms 93440 KB Output is correct
80 Correct 349 ms 99920 KB Output is correct
81 Correct 398 ms 110072 KB Output is correct
82 Correct 76 ms 44444 KB Output is correct
83 Correct 76 ms 44368 KB Output is correct
84 Correct 26 ms 36976 KB Output is correct
85 Correct 31 ms 37836 KB Output is correct
86 Correct 89 ms 46348 KB Output is correct
87 Correct 98 ms 46604 KB Output is correct
88 Correct 90 ms 46348 KB Output is correct
89 Correct 103 ms 46316 KB Output is correct
90 Correct 87 ms 46352 KB Output is correct
91 Correct 96 ms 46348 KB Output is correct
92 Correct 52 ms 44820 KB Output is correct
93 Correct 80 ms 45836 KB Output is correct
94 Correct 63 ms 41284 KB Output is correct
95 Correct 83 ms 44792 KB Output is correct
96 Correct 91 ms 46604 KB Output is correct
97 Correct 91 ms 46604 KB Output is correct
98 Correct 78 ms 45836 KB Output is correct
99 Correct 102 ms 49672 KB Output is correct
100 Correct 97 ms 47372 KB Output is correct
101 Correct 100 ms 47764 KB Output is correct
102 Correct 94 ms 49160 KB Output is correct
103 Correct 77 ms 44732 KB Output is correct
104 Correct 94 ms 46860 KB Output is correct
105 Correct 116 ms 49108 KB Output is correct
106 Correct 33 ms 39796 KB Output is correct
107 Correct 34 ms 38868 KB Output is correct
108 Correct 59 ms 47728 KB Output is correct
109 Correct 68 ms 43788 KB Output is correct
110 Correct 91 ms 48340 KB Output is correct
111 Correct 104 ms 48392 KB Output is correct
112 Correct 105 ms 45320 KB Output is correct
113 Correct 96 ms 47640 KB Output is correct
114 Correct 100 ms 46992 KB Output is correct
115 Correct 102 ms 48956 KB Output is correct
116 Correct 70 ms 42640 KB Output is correct
117 Correct 96 ms 48032 KB Output is correct
118 Correct 78 ms 43616 KB Output is correct
119 Correct 71 ms 43212 KB Output is correct
120 Correct 99 ms 48128 KB Output is correct
121 Correct 96 ms 48004 KB Output is correct
122 Correct 87 ms 47116 KB Output is correct
123 Correct 88 ms 48140 KB Output is correct
124 Correct 95 ms 47884 KB Output is correct
125 Correct 74 ms 44276 KB Output is correct
126 Correct 55 ms 46216 KB Output is correct
127 Correct 62 ms 44296 KB Output is correct
128 Correct 78 ms 47432 KB Output is correct
129 Correct 87 ms 50436 KB Output is correct
130 Correct 477 ms 101120 KB Output is correct
131 Correct 323 ms 82176 KB Output is correct
132 Correct 466 ms 101800 KB Output is correct
133 Correct 514 ms 103956 KB Output is correct
134 Correct 439 ms 98188 KB Output is correct
135 Correct 482 ms 107132 KB Output is correct
136 Correct 509 ms 107008 KB Output is correct
137 Correct 503 ms 107004 KB Output is correct
138 Correct 446 ms 103216 KB Output is correct
139 Correct 453 ms 103240 KB Output is correct
140 Correct 427 ms 103160 KB Output is correct
141 Correct 457 ms 103040 KB Output is correct
142 Correct 450 ms 103016 KB Output is correct
143 Correct 439 ms 103044 KB Output is correct
144 Correct 465 ms 103168 KB Output is correct
145 Correct 500 ms 103136 KB Output is correct
146 Correct 506 ms 103104 KB Output is correct
147 Correct 455 ms 102884 KB Output is correct
148 Correct 458 ms 102912 KB Output is correct
149 Correct 493 ms 103168 KB Output is correct
150 Correct 232 ms 95652 KB Output is correct
151 Correct 358 ms 100192 KB Output is correct
152 Correct 338 ms 100360 KB Output is correct
153 Correct 411 ms 110988 KB Output is correct