답안 #728619

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
728619 2023-04-22T17:54:46 Z piOOE 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
418 ms 53496 KB
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

namespace SegmentTree {
    constexpr int N = 1 << 18;
    array<ll, 2> t[N * 2];

    array<ll, 2> operator+(const array<ll, 2> &a, const array<ll, 2> &b) {
        return {a[0] + b[0], max(b[1], a[1] + b[0])};
    }

    void pull(int x) {
        t[x] = t[x << 1] + t[x << 1 | 1];
    }

    void modify(int x, ll v) {
        x += N;
        t[x][0] = v, t[x][1] = max(0LL, v);
        while (x >>= 1) {
            pull(x);
        }
    }

    array<ll, 2> rangeQuery(int l, int r) {
        array<ll, 2> L{}, R{};
        for (l += N, r += N; l < r; r >>= 1, l >>= 1) {
            if (l & 1) {
                L = L + t[l++];
            }
            if (r & 1) {
                R = t[--r] + R;
            }
        }
        return L + R;
    }
}

template<typename T>
struct Fenwick {
    int n;
    vector<T> a;

    Fenwick() = default;

    explicit Fenwick(int n) : n(n), a(n + 1) {}

    void modify(int x, T v) {
        for (int i = x + 1; i <= n; i += i & -i) {
            a[i] += v;
        }
    }

    void modify(int l, int r, T v) {
        if (l >= r) return;
        modify(l, v), modify(r, -v);
    }

    T sum(int x) {
        T ans = 0;
        for (int i = x + 1; i > 0; i -= i & -i) {
            ans += a[i];
        }
        return ans;
    }

    T rangeSum(int l, int r) { //[l, r)
        if (l >= r) return 0;
        return sum(r - 1) - sum(l - 1);
    }

    int kth(T k) {
        int x = 0;
        for (int i = 1 << __lg(n); i; i >>= 1) {
            if (x + i <= n && k > a[x + i]) {
                x += i;
                k -= a[x];
            }
        }
        return x;
    }
};


int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n, m, q;
    cin >> n >> m >> q;

    vector<vector<int>> qr(n + 1), ql(n), que(n);
    vector<ll> L(q), R(q), ans(q), K(q);

    for (int i = 0; i < q; ++i) {
        int t;
        cin >> t >> L[i] >> R[i];
        L[i] -= 1;

        if (t == 1 || t == 2) {
            ql[L[i]].push_back(i);
            qr[R[i]].push_back(i);
        } else if (t == 3) {
            que[L[i]].push_back(i);
        }

        if (t == 1) {
            cin >> R[i] >> K[i];
        } else if (t == 2) {
            cin >> K[i];
            K[i] = -K[i];
        } else {
            L[i] = -1;
        }
    }

    Fenwick<ll> fn(q);

    for (int i = 0; i < n; ++i) {
        for (int j : qr[i]) {
            SegmentTree::modify(j, 0);
            if (K[j] > 0) {
                fn.modify(j, -K[j]);
            }
        }

        for (int j : ql[i]) {
            SegmentTree::modify(j, K[j]);
            if (K[j] > 0) {
                fn.modify(j, K[j]);
            }
        }

        for (int j : que[i]) {
            ll have = SegmentTree::rangeQuery(0, j)[1];
            if (have >= R[j]) {
                ans[j] = R[fn.kth(fn.sum(j) - (have - R[j]))];
            }
        }
    }

    for (int i = 0; i < q; ++i) {
        if (L[i] == -1) {
            cout << ans[i] << '\n';
        }
    }

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 724 KB Output is correct
3 Correct 2 ms 596 KB Output is correct
4 Correct 2 ms 724 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 728 KB Output is correct
8 Correct 2 ms 724 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 724 KB Output is correct
11 Correct 2 ms 724 KB Output is correct
12 Correct 2 ms 724 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 1 ms 724 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 3 ms 724 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 724 KB Output is correct
19 Correct 2 ms 676 KB Output is correct
20 Correct 2 ms 728 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 724 KB Output is correct
3 Correct 2 ms 596 KB Output is correct
4 Correct 2 ms 724 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 728 KB Output is correct
8 Correct 2 ms 724 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 724 KB Output is correct
11 Correct 2 ms 724 KB Output is correct
12 Correct 2 ms 724 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 1 ms 724 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 3 ms 724 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 724 KB Output is correct
19 Correct 2 ms 676 KB Output is correct
20 Correct 2 ms 728 KB Output is correct
21 Correct 2 ms 732 KB Output is correct
22 Correct 2 ms 724 KB Output is correct
23 Correct 3 ms 596 KB Output is correct
24 Correct 2 ms 724 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 2 ms 724 KB Output is correct
28 Correct 3 ms 724 KB Output is correct
29 Correct 2 ms 732 KB Output is correct
30 Correct 2 ms 720 KB Output is correct
31 Correct 2 ms 720 KB Output is correct
32 Correct 2 ms 724 KB Output is correct
33 Correct 2 ms 596 KB Output is correct
34 Correct 2 ms 724 KB Output is correct
35 Correct 2 ms 592 KB Output is correct
36 Correct 2 ms 724 KB Output is correct
37 Correct 2 ms 596 KB Output is correct
38 Correct 2 ms 724 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 54 ms 13236 KB Output is correct
2 Correct 59 ms 13316 KB Output is correct
3 Correct 57 ms 13212 KB Output is correct
4 Correct 52 ms 13236 KB Output is correct
5 Correct 52 ms 13260 KB Output is correct
6 Correct 74 ms 13292 KB Output is correct
7 Correct 24 ms 6096 KB Output is correct
8 Correct 24 ms 6216 KB Output is correct
9 Correct 49 ms 13188 KB Output is correct
10 Correct 62 ms 13272 KB Output is correct
11 Correct 60 ms 13276 KB Output is correct
12 Correct 79 ms 13200 KB Output is correct
13 Correct 56 ms 10628 KB Output is correct
14 Correct 56 ms 13140 KB Output is correct
15 Correct 49 ms 11460 KB Output is correct
16 Correct 60 ms 13376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 313 ms 44448 KB Output is correct
2 Correct 267 ms 36980 KB Output is correct
3 Correct 400 ms 49588 KB Output is correct
4 Correct 240 ms 40596 KB Output is correct
5 Correct 249 ms 36256 KB Output is correct
6 Correct 335 ms 49548 KB Output is correct
7 Correct 105 ms 23060 KB Output is correct
8 Correct 107 ms 23212 KB Output is correct
9 Correct 337 ms 49028 KB Output is correct
10 Correct 320 ms 48896 KB Output is correct
11 Correct 310 ms 48976 KB Output is correct
12 Correct 315 ms 49084 KB Output is correct
13 Correct 341 ms 49076 KB Output is correct
14 Correct 329 ms 49004 KB Output is correct
15 Correct 348 ms 48932 KB Output is correct
16 Correct 315 ms 48844 KB Output is correct
17 Correct 368 ms 48824 KB Output is correct
18 Correct 317 ms 48984 KB Output is correct
19 Correct 313 ms 48808 KB Output is correct
20 Correct 344 ms 48872 KB Output is correct
21 Correct 321 ms 48744 KB Output is correct
22 Correct 317 ms 48736 KB Output is correct
23 Correct 305 ms 48916 KB Output is correct
24 Correct 309 ms 48776 KB Output is correct
25 Correct 231 ms 39980 KB Output is correct
26 Correct 229 ms 44608 KB Output is correct
27 Correct 296 ms 51088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 724 KB Output is correct
3 Correct 2 ms 596 KB Output is correct
4 Correct 2 ms 724 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 728 KB Output is correct
8 Correct 2 ms 724 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 724 KB Output is correct
11 Correct 2 ms 724 KB Output is correct
12 Correct 2 ms 724 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 1 ms 724 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 3 ms 724 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 724 KB Output is correct
19 Correct 2 ms 676 KB Output is correct
20 Correct 2 ms 728 KB Output is correct
21 Correct 54 ms 13236 KB Output is correct
22 Correct 59 ms 13316 KB Output is correct
23 Correct 57 ms 13212 KB Output is correct
24 Correct 52 ms 13236 KB Output is correct
25 Correct 52 ms 13260 KB Output is correct
26 Correct 74 ms 13292 KB Output is correct
27 Correct 24 ms 6096 KB Output is correct
28 Correct 24 ms 6216 KB Output is correct
29 Correct 49 ms 13188 KB Output is correct
30 Correct 62 ms 13272 KB Output is correct
31 Correct 60 ms 13276 KB Output is correct
32 Correct 79 ms 13200 KB Output is correct
33 Correct 56 ms 10628 KB Output is correct
34 Correct 56 ms 13140 KB Output is correct
35 Correct 49 ms 11460 KB Output is correct
36 Correct 60 ms 13376 KB Output is correct
37 Correct 48 ms 11740 KB Output is correct
38 Correct 46 ms 10952 KB Output is correct
39 Correct 21 ms 5164 KB Output is correct
40 Correct 22 ms 5908 KB Output is correct
41 Correct 73 ms 12868 KB Output is correct
42 Correct 77 ms 12860 KB Output is correct
43 Correct 58 ms 12848 KB Output is correct
44 Correct 56 ms 12872 KB Output is correct
45 Correct 56 ms 12920 KB Output is correct
46 Correct 55 ms 12780 KB Output is correct
47 Correct 32 ms 11332 KB Output is correct
48 Correct 50 ms 11684 KB Output is correct
49 Correct 56 ms 9172 KB Output is correct
50 Correct 51 ms 11804 KB Output is correct
51 Correct 57 ms 12932 KB Output is correct
52 Correct 62 ms 12976 KB Output is correct
53 Correct 45 ms 10996 KB Output is correct
54 Correct 68 ms 13332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 59 ms 12560 KB Output is correct
2 Correct 64 ms 12564 KB Output is correct
3 Correct 60 ms 13608 KB Output is correct
4 Correct 46 ms 10824 KB Output is correct
5 Correct 57 ms 12108 KB Output is correct
6 Correct 80 ms 13468 KB Output is correct
7 Correct 32 ms 6220 KB Output is correct
8 Correct 27 ms 5912 KB Output is correct
9 Correct 44 ms 12200 KB Output is correct
10 Correct 35 ms 9676 KB Output is correct
11 Correct 54 ms 12492 KB Output is correct
12 Correct 52 ms 12392 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 724 KB Output is correct
3 Correct 2 ms 596 KB Output is correct
4 Correct 2 ms 724 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 728 KB Output is correct
8 Correct 2 ms 724 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 724 KB Output is correct
11 Correct 2 ms 724 KB Output is correct
12 Correct 2 ms 724 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 1 ms 724 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 3 ms 724 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 724 KB Output is correct
19 Correct 2 ms 676 KB Output is correct
20 Correct 2 ms 728 KB Output is correct
21 Correct 2 ms 732 KB Output is correct
22 Correct 2 ms 724 KB Output is correct
23 Correct 3 ms 596 KB Output is correct
24 Correct 2 ms 724 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 2 ms 724 KB Output is correct
28 Correct 3 ms 724 KB Output is correct
29 Correct 2 ms 732 KB Output is correct
30 Correct 2 ms 720 KB Output is correct
31 Correct 2 ms 720 KB Output is correct
32 Correct 2 ms 724 KB Output is correct
33 Correct 2 ms 596 KB Output is correct
34 Correct 2 ms 724 KB Output is correct
35 Correct 2 ms 592 KB Output is correct
36 Correct 2 ms 724 KB Output is correct
37 Correct 2 ms 596 KB Output is correct
38 Correct 2 ms 724 KB Output is correct
39 Correct 54 ms 13236 KB Output is correct
40 Correct 59 ms 13316 KB Output is correct
41 Correct 57 ms 13212 KB Output is correct
42 Correct 52 ms 13236 KB Output is correct
43 Correct 52 ms 13260 KB Output is correct
44 Correct 74 ms 13292 KB Output is correct
45 Correct 24 ms 6096 KB Output is correct
46 Correct 24 ms 6216 KB Output is correct
47 Correct 49 ms 13188 KB Output is correct
48 Correct 62 ms 13272 KB Output is correct
49 Correct 60 ms 13276 KB Output is correct
50 Correct 79 ms 13200 KB Output is correct
51 Correct 56 ms 10628 KB Output is correct
52 Correct 56 ms 13140 KB Output is correct
53 Correct 49 ms 11460 KB Output is correct
54 Correct 60 ms 13376 KB Output is correct
55 Correct 48 ms 11740 KB Output is correct
56 Correct 46 ms 10952 KB Output is correct
57 Correct 21 ms 5164 KB Output is correct
58 Correct 22 ms 5908 KB Output is correct
59 Correct 73 ms 12868 KB Output is correct
60 Correct 77 ms 12860 KB Output is correct
61 Correct 58 ms 12848 KB Output is correct
62 Correct 56 ms 12872 KB Output is correct
63 Correct 56 ms 12920 KB Output is correct
64 Correct 55 ms 12780 KB Output is correct
65 Correct 32 ms 11332 KB Output is correct
66 Correct 50 ms 11684 KB Output is correct
67 Correct 56 ms 9172 KB Output is correct
68 Correct 51 ms 11804 KB Output is correct
69 Correct 57 ms 12932 KB Output is correct
70 Correct 62 ms 12976 KB Output is correct
71 Correct 45 ms 10996 KB Output is correct
72 Correct 68 ms 13332 KB Output is correct
73 Correct 59 ms 12560 KB Output is correct
74 Correct 64 ms 12564 KB Output is correct
75 Correct 60 ms 13608 KB Output is correct
76 Correct 46 ms 10824 KB Output is correct
77 Correct 57 ms 12108 KB Output is correct
78 Correct 80 ms 13468 KB Output is correct
79 Correct 32 ms 6220 KB Output is correct
80 Correct 27 ms 5912 KB Output is correct
81 Correct 44 ms 12200 KB Output is correct
82 Correct 35 ms 9676 KB Output is correct
83 Correct 54 ms 12492 KB Output is correct
84 Correct 52 ms 12392 KB Output is correct
85 Correct 54 ms 11724 KB Output is correct
86 Correct 77 ms 13500 KB Output is correct
87 Correct 57 ms 12160 KB Output is correct
88 Correct 74 ms 13508 KB Output is correct
89 Correct 36 ms 9688 KB Output is correct
90 Correct 63 ms 13516 KB Output is correct
91 Correct 53 ms 10268 KB Output is correct
92 Correct 46 ms 9944 KB Output is correct
93 Correct 67 ms 13348 KB Output is correct
94 Correct 61 ms 13440 KB Output is correct
95 Correct 74 ms 12672 KB Output is correct
96 Correct 86 ms 13344 KB Output is correct
97 Correct 68 ms 13388 KB Output is correct
98 Correct 47 ms 10668 KB Output is correct
99 Correct 39 ms 11976 KB Output is correct
100 Correct 38 ms 10344 KB Output is correct
101 Correct 50 ms 12236 KB Output is correct
102 Correct 53 ms 13996 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 724 KB Output is correct
3 Correct 2 ms 596 KB Output is correct
4 Correct 2 ms 724 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 728 KB Output is correct
8 Correct 2 ms 724 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 724 KB Output is correct
11 Correct 2 ms 724 KB Output is correct
12 Correct 2 ms 724 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 1 ms 724 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 3 ms 724 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 724 KB Output is correct
19 Correct 2 ms 676 KB Output is correct
20 Correct 2 ms 728 KB Output is correct
21 Correct 2 ms 732 KB Output is correct
22 Correct 2 ms 724 KB Output is correct
23 Correct 3 ms 596 KB Output is correct
24 Correct 2 ms 724 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 2 ms 724 KB Output is correct
28 Correct 3 ms 724 KB Output is correct
29 Correct 2 ms 732 KB Output is correct
30 Correct 2 ms 720 KB Output is correct
31 Correct 2 ms 720 KB Output is correct
32 Correct 2 ms 724 KB Output is correct
33 Correct 2 ms 596 KB Output is correct
34 Correct 2 ms 724 KB Output is correct
35 Correct 2 ms 592 KB Output is correct
36 Correct 2 ms 724 KB Output is correct
37 Correct 2 ms 596 KB Output is correct
38 Correct 2 ms 724 KB Output is correct
39 Correct 54 ms 13236 KB Output is correct
40 Correct 59 ms 13316 KB Output is correct
41 Correct 57 ms 13212 KB Output is correct
42 Correct 52 ms 13236 KB Output is correct
43 Correct 52 ms 13260 KB Output is correct
44 Correct 74 ms 13292 KB Output is correct
45 Correct 24 ms 6096 KB Output is correct
46 Correct 24 ms 6216 KB Output is correct
47 Correct 49 ms 13188 KB Output is correct
48 Correct 62 ms 13272 KB Output is correct
49 Correct 60 ms 13276 KB Output is correct
50 Correct 79 ms 13200 KB Output is correct
51 Correct 56 ms 10628 KB Output is correct
52 Correct 56 ms 13140 KB Output is correct
53 Correct 49 ms 11460 KB Output is correct
54 Correct 60 ms 13376 KB Output is correct
55 Correct 313 ms 44448 KB Output is correct
56 Correct 267 ms 36980 KB Output is correct
57 Correct 400 ms 49588 KB Output is correct
58 Correct 240 ms 40596 KB Output is correct
59 Correct 249 ms 36256 KB Output is correct
60 Correct 335 ms 49548 KB Output is correct
61 Correct 105 ms 23060 KB Output is correct
62 Correct 107 ms 23212 KB Output is correct
63 Correct 337 ms 49028 KB Output is correct
64 Correct 320 ms 48896 KB Output is correct
65 Correct 310 ms 48976 KB Output is correct
66 Correct 315 ms 49084 KB Output is correct
67 Correct 341 ms 49076 KB Output is correct
68 Correct 329 ms 49004 KB Output is correct
69 Correct 348 ms 48932 KB Output is correct
70 Correct 315 ms 48844 KB Output is correct
71 Correct 368 ms 48824 KB Output is correct
72 Correct 317 ms 48984 KB Output is correct
73 Correct 313 ms 48808 KB Output is correct
74 Correct 344 ms 48872 KB Output is correct
75 Correct 321 ms 48744 KB Output is correct
76 Correct 317 ms 48736 KB Output is correct
77 Correct 305 ms 48916 KB Output is correct
78 Correct 309 ms 48776 KB Output is correct
79 Correct 231 ms 39980 KB Output is correct
80 Correct 229 ms 44608 KB Output is correct
81 Correct 296 ms 51088 KB Output is correct
82 Correct 48 ms 11740 KB Output is correct
83 Correct 46 ms 10952 KB Output is correct
84 Correct 21 ms 5164 KB Output is correct
85 Correct 22 ms 5908 KB Output is correct
86 Correct 73 ms 12868 KB Output is correct
87 Correct 77 ms 12860 KB Output is correct
88 Correct 58 ms 12848 KB Output is correct
89 Correct 56 ms 12872 KB Output is correct
90 Correct 56 ms 12920 KB Output is correct
91 Correct 55 ms 12780 KB Output is correct
92 Correct 32 ms 11332 KB Output is correct
93 Correct 50 ms 11684 KB Output is correct
94 Correct 56 ms 9172 KB Output is correct
95 Correct 51 ms 11804 KB Output is correct
96 Correct 57 ms 12932 KB Output is correct
97 Correct 62 ms 12976 KB Output is correct
98 Correct 45 ms 10996 KB Output is correct
99 Correct 68 ms 13332 KB Output is correct
100 Correct 59 ms 12560 KB Output is correct
101 Correct 64 ms 12564 KB Output is correct
102 Correct 60 ms 13608 KB Output is correct
103 Correct 46 ms 10824 KB Output is correct
104 Correct 57 ms 12108 KB Output is correct
105 Correct 80 ms 13468 KB Output is correct
106 Correct 32 ms 6220 KB Output is correct
107 Correct 27 ms 5912 KB Output is correct
108 Correct 44 ms 12200 KB Output is correct
109 Correct 35 ms 9676 KB Output is correct
110 Correct 54 ms 12492 KB Output is correct
111 Correct 52 ms 12392 KB Output is correct
112 Correct 54 ms 11724 KB Output is correct
113 Correct 77 ms 13500 KB Output is correct
114 Correct 57 ms 12160 KB Output is correct
115 Correct 74 ms 13508 KB Output is correct
116 Correct 36 ms 9688 KB Output is correct
117 Correct 63 ms 13516 KB Output is correct
118 Correct 53 ms 10268 KB Output is correct
119 Correct 46 ms 9944 KB Output is correct
120 Correct 67 ms 13348 KB Output is correct
121 Correct 61 ms 13440 KB Output is correct
122 Correct 74 ms 12672 KB Output is correct
123 Correct 86 ms 13344 KB Output is correct
124 Correct 68 ms 13388 KB Output is correct
125 Correct 47 ms 10668 KB Output is correct
126 Correct 39 ms 11976 KB Output is correct
127 Correct 38 ms 10344 KB Output is correct
128 Correct 50 ms 12236 KB Output is correct
129 Correct 53 ms 13996 KB Output is correct
130 Correct 336 ms 50956 KB Output is correct
131 Correct 219 ms 37988 KB Output is correct
132 Correct 318 ms 51404 KB Output is correct
133 Correct 341 ms 49240 KB Output is correct
134 Correct 288 ms 46028 KB Output is correct
135 Correct 376 ms 51480 KB Output is correct
136 Correct 321 ms 51116 KB Output is correct
137 Correct 364 ms 51108 KB Output is correct
138 Correct 326 ms 50936 KB Output is correct
139 Correct 343 ms 50984 KB Output is correct
140 Correct 354 ms 50892 KB Output is correct
141 Correct 382 ms 50884 KB Output is correct
142 Correct 375 ms 50876 KB Output is correct
143 Correct 355 ms 50868 KB Output is correct
144 Correct 365 ms 50904 KB Output is correct
145 Correct 418 ms 50876 KB Output is correct
146 Correct 361 ms 50860 KB Output is correct
147 Correct 359 ms 50860 KB Output is correct
148 Correct 382 ms 50796 KB Output is correct
149 Correct 378 ms 50860 KB Output is correct
150 Correct 185 ms 45136 KB Output is correct
151 Correct 289 ms 46572 KB Output is correct
152 Correct 285 ms 46572 KB Output is correct
153 Correct 289 ms 53496 KB Output is correct