Submission #1032427

# Submission time Handle Problem Language Result Execution time Memory
1032427 2024-07-23T17:49:35 Z Blagoj Food Court (JOI21_foodcourt) C++17
100 / 100
361 ms 88748 KB
#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define ll long long
#define all(x) (x).begin(), (x).end()

const int mxn = 3e5 + 100;

vector<pair<ll, ll>> qs[mxn], fs[mxn], xs[mxn]; 
ll l[mxn], r[mxn], c[mxn], k[mxn], a[mxn], b[mxn];

struct Node {
    ll sum = 0, suf = 0, total = 0;
} null;

struct SGT {
    vector<Node> sgt;

    SGT(int sz) {
        sgt.resize(4 * sz);
    }

    void merge(Node &k, Node k1, Node k2) {
        k.sum = k1.sum + k2.sum;
        k.suf = max(k2.suf, k1.suf + k2.sum);
    }

    void fix(int k, int l, int r, int i, ll val) {
        if (l > i || r < i) return;
        if (l == r) {
            sgt[k].sum = val;
            sgt[k].suf = max(val, 0LL);
            return;
        }
        int mid = (l + r) / 2;
        fix(k * 2, l, mid, i, val);
        fix(k * 2 + 1, mid + 1, r, i, val);
        merge(sgt[k], sgt[k * 2], sgt[k * 2 + 1]);
    }

    void update(int k, int l, int r, int i, ll val) {
        if (l > i || r < i) return;
        if (l == r) {
            sgt[k].total = val;
            return;
        }
        int mid = (l + r) / 2;
        update(k * 2, l, mid, i, val);
        update(k * 2 + 1, mid + 1, r, i, val);
        sgt[k].total = sgt[k * 2].total + sgt[k * 2 + 1].total;
    }

    Node mx(int k, int l, int r, int i, int j) {
        if (l > j || r < i) return null;
        if (i <= l && r <= j) return sgt[k];
        int mid = (l + r) / 2;
        Node ansL = mx(k * 2, l, mid, i, j), ansR = mx(k * 2 + 1, mid + 1, r, i, j);
        Node ans;
        merge(ans, ansL, ansR);
        return ans;
    }

    ll get(int k, int l, int r, int i, int j) {
        if (l > j || r < i) return 0;
        if (i <= l && r <= j) return sgt[k].total;
        int mid = (l + r) / 2;
        return get(k * 2, l, mid, i, j) + get(k * 2 + 1, mid + 1, r, i, j);
    }

    ll walk(int k, int l, int r, ll i) {
        if (l == r) return sgt[k].total > i ? l : l + 1;
        int mid = (l + r) / 2;
        if (sgt[k * 2].total > i) return walk(k * 2, l, mid, i);
        return walk(k * 2 + 1, mid + 1, r, i - sgt[k * 2].total);
    }
} sgt(mxn);

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, m, q;
    cin >> n >> m >> q;
    for (int i = 0; i < q; i++) {
        int type;
        cin >> type;
        if (type == 1) {
            cin >> l[i] >> r[i] >> c[i] >> k[i];
            qs[l[i]].push_back({i, k[i]});
            qs[r[i] + 1].push_back({i, 0});
            fs[l[i]].push_back({i, k[i]});
            fs[r[i] + 1].push_back({i, 0});
        }
        if (type == 2) {
            cin >> l[i] >> r[i] >> k[i];
            qs[l[i]].push_back({i, -k[i]});
            qs[r[i] + 1].push_back({i, 0});
        }
        if (type == 3) {
            cin >> a[i] >> b[i];
            xs[a[i]].push_back({i, b[i]});
        }
    }
    ll ans[q + 10];
    memset(ans, -1, sizeof(ans));
    for (int i = 1; i <= n; i++) {
        for (auto x : qs[i]) sgt.fix(1, 0, q - 1, x.first, x.second);
        for (auto x : fs[i]) sgt.update(1, 0, q - 1, x.first, x.second);
        for (auto x : xs[i]) {
            Node val = sgt.mx(1, 0, q - 1, 0, x.first);
            if (val.suf < x.second) {
                ans[x.first] = 0;
                continue; 
            }
            ll ind = sgt.get(1, 0, q - 1, 0, x.first) - val.suf + x.second;
            ans[x.first] = c[sgt.walk(1, 0, q - 1, ind - 1)]; 
        }
    }
    for (int i = 0; i < q; i++) {
        if (ans[i] != -1) cout << ans[i] << endl;
    }
}
# Verdict Execution time Memory Grader output
1 Correct 26 ms 50012 KB Output is correct
2 Correct 20 ms 50008 KB Output is correct
3 Correct 21 ms 50008 KB Output is correct
4 Correct 23 ms 50008 KB Output is correct
5 Correct 21 ms 49924 KB Output is correct
6 Correct 19 ms 50012 KB Output is correct
7 Correct 27 ms 50012 KB Output is correct
8 Correct 21 ms 50012 KB Output is correct
9 Correct 22 ms 50012 KB Output is correct
10 Correct 21 ms 50012 KB Output is correct
11 Correct 23 ms 50008 KB Output is correct
12 Correct 20 ms 50012 KB Output is correct
13 Correct 20 ms 50260 KB Output is correct
14 Correct 19 ms 50012 KB Output is correct
15 Correct 18 ms 50028 KB Output is correct
16 Correct 20 ms 50012 KB Output is correct
17 Correct 24 ms 50012 KB Output is correct
18 Correct 21 ms 49980 KB Output is correct
19 Correct 20 ms 50072 KB Output is correct
20 Correct 19 ms 50008 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 50012 KB Output is correct
2 Correct 20 ms 50008 KB Output is correct
3 Correct 21 ms 50008 KB Output is correct
4 Correct 23 ms 50008 KB Output is correct
5 Correct 21 ms 49924 KB Output is correct
6 Correct 19 ms 50012 KB Output is correct
7 Correct 27 ms 50012 KB Output is correct
8 Correct 21 ms 50012 KB Output is correct
9 Correct 22 ms 50012 KB Output is correct
10 Correct 21 ms 50012 KB Output is correct
11 Correct 23 ms 50008 KB Output is correct
12 Correct 20 ms 50012 KB Output is correct
13 Correct 20 ms 50260 KB Output is correct
14 Correct 19 ms 50012 KB Output is correct
15 Correct 18 ms 50028 KB Output is correct
16 Correct 20 ms 50012 KB Output is correct
17 Correct 24 ms 50012 KB Output is correct
18 Correct 21 ms 49980 KB Output is correct
19 Correct 20 ms 50072 KB Output is correct
20 Correct 19 ms 50008 KB Output is correct
21 Correct 23 ms 50008 KB Output is correct
22 Correct 19 ms 50112 KB Output is correct
23 Correct 21 ms 50012 KB Output is correct
24 Correct 22 ms 50144 KB Output is correct
25 Correct 20 ms 50012 KB Output is correct
26 Correct 20 ms 50012 KB Output is correct
27 Correct 21 ms 50012 KB Output is correct
28 Correct 20 ms 50008 KB Output is correct
29 Correct 20 ms 50012 KB Output is correct
30 Correct 21 ms 50008 KB Output is correct
31 Correct 20 ms 50008 KB Output is correct
32 Correct 21 ms 49928 KB Output is correct
33 Correct 19 ms 49952 KB Output is correct
34 Correct 25 ms 50008 KB Output is correct
35 Correct 20 ms 50008 KB Output is correct
36 Correct 24 ms 50068 KB Output is correct
37 Correct 22 ms 49824 KB Output is correct
38 Correct 22 ms 50076 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 69 ms 58452 KB Output is correct
2 Correct 75 ms 59192 KB Output is correct
3 Correct 71 ms 58448 KB Output is correct
4 Correct 74 ms 58452 KB Output is correct
5 Correct 81 ms 59220 KB Output is correct
6 Correct 71 ms 59220 KB Output is correct
7 Correct 42 ms 56232 KB Output is correct
8 Correct 42 ms 56724 KB Output is correct
9 Correct 78 ms 58704 KB Output is correct
10 Correct 72 ms 58784 KB Output is correct
11 Correct 68 ms 58708 KB Output is correct
12 Correct 70 ms 58964 KB Output is correct
13 Correct 73 ms 58144 KB Output is correct
14 Correct 68 ms 59220 KB Output is correct
15 Correct 75 ms 60244 KB Output is correct
16 Correct 75 ms 60564 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 293 ms 82260 KB Output is correct
2 Correct 208 ms 75600 KB Output is correct
3 Correct 300 ms 85076 KB Output is correct
4 Correct 244 ms 77392 KB Output is correct
5 Correct 240 ms 77908 KB Output is correct
6 Correct 307 ms 87748 KB Output is correct
7 Correct 109 ms 78608 KB Output is correct
8 Correct 123 ms 79280 KB Output is correct
9 Correct 334 ms 86352 KB Output is correct
10 Correct 323 ms 86744 KB Output is correct
11 Correct 322 ms 85076 KB Output is correct
12 Correct 324 ms 86416 KB Output is correct
13 Correct 331 ms 85072 KB Output is correct
14 Correct 311 ms 86096 KB Output is correct
15 Correct 351 ms 86048 KB Output is correct
16 Correct 335 ms 86020 KB Output is correct
17 Correct 316 ms 86300 KB Output is correct
18 Correct 334 ms 85588 KB Output is correct
19 Correct 341 ms 86096 KB Output is correct
20 Correct 307 ms 85584 KB Output is correct
21 Correct 319 ms 86100 KB Output is correct
22 Correct 342 ms 86100 KB Output is correct
23 Correct 306 ms 86096 KB Output is correct
24 Correct 322 ms 86104 KB Output is correct
25 Correct 252 ms 84308 KB Output is correct
26 Correct 276 ms 85096 KB Output is correct
27 Correct 276 ms 87892 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 50012 KB Output is correct
2 Correct 20 ms 50008 KB Output is correct
3 Correct 21 ms 50008 KB Output is correct
4 Correct 23 ms 50008 KB Output is correct
5 Correct 21 ms 49924 KB Output is correct
6 Correct 19 ms 50012 KB Output is correct
7 Correct 27 ms 50012 KB Output is correct
8 Correct 21 ms 50012 KB Output is correct
9 Correct 22 ms 50012 KB Output is correct
10 Correct 21 ms 50012 KB Output is correct
11 Correct 23 ms 50008 KB Output is correct
12 Correct 20 ms 50012 KB Output is correct
13 Correct 20 ms 50260 KB Output is correct
14 Correct 19 ms 50012 KB Output is correct
15 Correct 18 ms 50028 KB Output is correct
16 Correct 20 ms 50012 KB Output is correct
17 Correct 24 ms 50012 KB Output is correct
18 Correct 21 ms 49980 KB Output is correct
19 Correct 20 ms 50072 KB Output is correct
20 Correct 19 ms 50008 KB Output is correct
21 Correct 69 ms 58452 KB Output is correct
22 Correct 75 ms 59192 KB Output is correct
23 Correct 71 ms 58448 KB Output is correct
24 Correct 74 ms 58452 KB Output is correct
25 Correct 81 ms 59220 KB Output is correct
26 Correct 71 ms 59220 KB Output is correct
27 Correct 42 ms 56232 KB Output is correct
28 Correct 42 ms 56724 KB Output is correct
29 Correct 78 ms 58704 KB Output is correct
30 Correct 72 ms 58784 KB Output is correct
31 Correct 68 ms 58708 KB Output is correct
32 Correct 70 ms 58964 KB Output is correct
33 Correct 73 ms 58144 KB Output is correct
34 Correct 68 ms 59220 KB Output is correct
35 Correct 75 ms 60244 KB Output is correct
36 Correct 75 ms 60564 KB Output is correct
37 Correct 70 ms 57680 KB Output is correct
38 Correct 69 ms 57316 KB Output is correct
39 Correct 39 ms 55612 KB Output is correct
40 Correct 46 ms 56564 KB Output is correct
41 Correct 87 ms 58704 KB Output is correct
42 Correct 82 ms 58700 KB Output is correct
43 Correct 78 ms 58708 KB Output is correct
44 Correct 79 ms 58704 KB Output is correct
45 Correct 86 ms 58912 KB Output is correct
46 Correct 76 ms 58708 KB Output is correct
47 Correct 51 ms 57404 KB Output is correct
48 Correct 64 ms 58452 KB Output is correct
49 Correct 75 ms 56156 KB Output is correct
50 Correct 69 ms 57428 KB Output is correct
51 Correct 78 ms 58900 KB Output is correct
52 Correct 79 ms 58872 KB Output is correct
53 Correct 67 ms 58196 KB Output is correct
54 Correct 84 ms 60568 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 79 ms 58448 KB Output is correct
2 Correct 82 ms 59212 KB Output is correct
3 Correct 91 ms 59472 KB Output is correct
4 Correct 72 ms 56644 KB Output is correct
5 Correct 82 ms 58144 KB Output is correct
6 Correct 90 ms 59476 KB Output is correct
7 Correct 47 ms 56616 KB Output is correct
8 Correct 47 ms 56216 KB Output is correct
9 Correct 59 ms 58036 KB Output is correct
10 Correct 61 ms 56404 KB Output is correct
11 Correct 89 ms 58672 KB Output is correct
12 Correct 73 ms 58704 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 50012 KB Output is correct
2 Correct 20 ms 50008 KB Output is correct
3 Correct 21 ms 50008 KB Output is correct
4 Correct 23 ms 50008 KB Output is correct
5 Correct 21 ms 49924 KB Output is correct
6 Correct 19 ms 50012 KB Output is correct
7 Correct 27 ms 50012 KB Output is correct
8 Correct 21 ms 50012 KB Output is correct
9 Correct 22 ms 50012 KB Output is correct
10 Correct 21 ms 50012 KB Output is correct
11 Correct 23 ms 50008 KB Output is correct
12 Correct 20 ms 50012 KB Output is correct
13 Correct 20 ms 50260 KB Output is correct
14 Correct 19 ms 50012 KB Output is correct
15 Correct 18 ms 50028 KB Output is correct
16 Correct 20 ms 50012 KB Output is correct
17 Correct 24 ms 50012 KB Output is correct
18 Correct 21 ms 49980 KB Output is correct
19 Correct 20 ms 50072 KB Output is correct
20 Correct 19 ms 50008 KB Output is correct
21 Correct 23 ms 50008 KB Output is correct
22 Correct 19 ms 50112 KB Output is correct
23 Correct 21 ms 50012 KB Output is correct
24 Correct 22 ms 50144 KB Output is correct
25 Correct 20 ms 50012 KB Output is correct
26 Correct 20 ms 50012 KB Output is correct
27 Correct 21 ms 50012 KB Output is correct
28 Correct 20 ms 50008 KB Output is correct
29 Correct 20 ms 50012 KB Output is correct
30 Correct 21 ms 50008 KB Output is correct
31 Correct 20 ms 50008 KB Output is correct
32 Correct 21 ms 49928 KB Output is correct
33 Correct 19 ms 49952 KB Output is correct
34 Correct 25 ms 50008 KB Output is correct
35 Correct 20 ms 50008 KB Output is correct
36 Correct 24 ms 50068 KB Output is correct
37 Correct 22 ms 49824 KB Output is correct
38 Correct 22 ms 50076 KB Output is correct
39 Correct 69 ms 58452 KB Output is correct
40 Correct 75 ms 59192 KB Output is correct
41 Correct 71 ms 58448 KB Output is correct
42 Correct 74 ms 58452 KB Output is correct
43 Correct 81 ms 59220 KB Output is correct
44 Correct 71 ms 59220 KB Output is correct
45 Correct 42 ms 56232 KB Output is correct
46 Correct 42 ms 56724 KB Output is correct
47 Correct 78 ms 58704 KB Output is correct
48 Correct 72 ms 58784 KB Output is correct
49 Correct 68 ms 58708 KB Output is correct
50 Correct 70 ms 58964 KB Output is correct
51 Correct 73 ms 58144 KB Output is correct
52 Correct 68 ms 59220 KB Output is correct
53 Correct 75 ms 60244 KB Output is correct
54 Correct 75 ms 60564 KB Output is correct
55 Correct 70 ms 57680 KB Output is correct
56 Correct 69 ms 57316 KB Output is correct
57 Correct 39 ms 55612 KB Output is correct
58 Correct 46 ms 56564 KB Output is correct
59 Correct 87 ms 58704 KB Output is correct
60 Correct 82 ms 58700 KB Output is correct
61 Correct 78 ms 58708 KB Output is correct
62 Correct 79 ms 58704 KB Output is correct
63 Correct 86 ms 58912 KB Output is correct
64 Correct 76 ms 58708 KB Output is correct
65 Correct 51 ms 57404 KB Output is correct
66 Correct 64 ms 58452 KB Output is correct
67 Correct 75 ms 56156 KB Output is correct
68 Correct 69 ms 57428 KB Output is correct
69 Correct 78 ms 58900 KB Output is correct
70 Correct 79 ms 58872 KB Output is correct
71 Correct 67 ms 58196 KB Output is correct
72 Correct 84 ms 60568 KB Output is correct
73 Correct 79 ms 58448 KB Output is correct
74 Correct 82 ms 59212 KB Output is correct
75 Correct 91 ms 59472 KB Output is correct
76 Correct 72 ms 56644 KB Output is correct
77 Correct 82 ms 58144 KB Output is correct
78 Correct 90 ms 59476 KB Output is correct
79 Correct 47 ms 56616 KB Output is correct
80 Correct 47 ms 56216 KB Output is correct
81 Correct 59 ms 58036 KB Output is correct
82 Correct 61 ms 56404 KB Output is correct
83 Correct 89 ms 58672 KB Output is correct
84 Correct 73 ms 58704 KB Output is correct
85 Correct 78 ms 58192 KB Output is correct
86 Correct 116 ms 59016 KB Output is correct
87 Correct 77 ms 58448 KB Output is correct
88 Correct 80 ms 59732 KB Output is correct
89 Correct 58 ms 55892 KB Output is correct
90 Correct 78 ms 59216 KB Output is correct
91 Correct 69 ms 57512 KB Output is correct
92 Correct 67 ms 57140 KB Output is correct
93 Correct 79 ms 59220 KB Output is correct
94 Correct 80 ms 59216 KB Output is correct
95 Correct 78 ms 58960 KB Output is correct
96 Correct 80 ms 59220 KB Output is correct
97 Correct 80 ms 59220 KB Output is correct
98 Correct 67 ms 57680 KB Output is correct
99 Correct 52 ms 57516 KB Output is correct
100 Correct 58 ms 57172 KB Output is correct
101 Correct 70 ms 58964 KB Output is correct
102 Correct 72 ms 59736 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 50012 KB Output is correct
2 Correct 20 ms 50008 KB Output is correct
3 Correct 21 ms 50008 KB Output is correct
4 Correct 23 ms 50008 KB Output is correct
5 Correct 21 ms 49924 KB Output is correct
6 Correct 19 ms 50012 KB Output is correct
7 Correct 27 ms 50012 KB Output is correct
8 Correct 21 ms 50012 KB Output is correct
9 Correct 22 ms 50012 KB Output is correct
10 Correct 21 ms 50012 KB Output is correct
11 Correct 23 ms 50008 KB Output is correct
12 Correct 20 ms 50012 KB Output is correct
13 Correct 20 ms 50260 KB Output is correct
14 Correct 19 ms 50012 KB Output is correct
15 Correct 18 ms 50028 KB Output is correct
16 Correct 20 ms 50012 KB Output is correct
17 Correct 24 ms 50012 KB Output is correct
18 Correct 21 ms 49980 KB Output is correct
19 Correct 20 ms 50072 KB Output is correct
20 Correct 19 ms 50008 KB Output is correct
21 Correct 23 ms 50008 KB Output is correct
22 Correct 19 ms 50112 KB Output is correct
23 Correct 21 ms 50012 KB Output is correct
24 Correct 22 ms 50144 KB Output is correct
25 Correct 20 ms 50012 KB Output is correct
26 Correct 20 ms 50012 KB Output is correct
27 Correct 21 ms 50012 KB Output is correct
28 Correct 20 ms 50008 KB Output is correct
29 Correct 20 ms 50012 KB Output is correct
30 Correct 21 ms 50008 KB Output is correct
31 Correct 20 ms 50008 KB Output is correct
32 Correct 21 ms 49928 KB Output is correct
33 Correct 19 ms 49952 KB Output is correct
34 Correct 25 ms 50008 KB Output is correct
35 Correct 20 ms 50008 KB Output is correct
36 Correct 24 ms 50068 KB Output is correct
37 Correct 22 ms 49824 KB Output is correct
38 Correct 22 ms 50076 KB Output is correct
39 Correct 69 ms 58452 KB Output is correct
40 Correct 75 ms 59192 KB Output is correct
41 Correct 71 ms 58448 KB Output is correct
42 Correct 74 ms 58452 KB Output is correct
43 Correct 81 ms 59220 KB Output is correct
44 Correct 71 ms 59220 KB Output is correct
45 Correct 42 ms 56232 KB Output is correct
46 Correct 42 ms 56724 KB Output is correct
47 Correct 78 ms 58704 KB Output is correct
48 Correct 72 ms 58784 KB Output is correct
49 Correct 68 ms 58708 KB Output is correct
50 Correct 70 ms 58964 KB Output is correct
51 Correct 73 ms 58144 KB Output is correct
52 Correct 68 ms 59220 KB Output is correct
53 Correct 75 ms 60244 KB Output is correct
54 Correct 75 ms 60564 KB Output is correct
55 Correct 293 ms 82260 KB Output is correct
56 Correct 208 ms 75600 KB Output is correct
57 Correct 300 ms 85076 KB Output is correct
58 Correct 244 ms 77392 KB Output is correct
59 Correct 240 ms 77908 KB Output is correct
60 Correct 307 ms 87748 KB Output is correct
61 Correct 109 ms 78608 KB Output is correct
62 Correct 123 ms 79280 KB Output is correct
63 Correct 334 ms 86352 KB Output is correct
64 Correct 323 ms 86744 KB Output is correct
65 Correct 322 ms 85076 KB Output is correct
66 Correct 324 ms 86416 KB Output is correct
67 Correct 331 ms 85072 KB Output is correct
68 Correct 311 ms 86096 KB Output is correct
69 Correct 351 ms 86048 KB Output is correct
70 Correct 335 ms 86020 KB Output is correct
71 Correct 316 ms 86300 KB Output is correct
72 Correct 334 ms 85588 KB Output is correct
73 Correct 341 ms 86096 KB Output is correct
74 Correct 307 ms 85584 KB Output is correct
75 Correct 319 ms 86100 KB Output is correct
76 Correct 342 ms 86100 KB Output is correct
77 Correct 306 ms 86096 KB Output is correct
78 Correct 322 ms 86104 KB Output is correct
79 Correct 252 ms 84308 KB Output is correct
80 Correct 276 ms 85096 KB Output is correct
81 Correct 276 ms 87892 KB Output is correct
82 Correct 70 ms 57680 KB Output is correct
83 Correct 69 ms 57316 KB Output is correct
84 Correct 39 ms 55612 KB Output is correct
85 Correct 46 ms 56564 KB Output is correct
86 Correct 87 ms 58704 KB Output is correct
87 Correct 82 ms 58700 KB Output is correct
88 Correct 78 ms 58708 KB Output is correct
89 Correct 79 ms 58704 KB Output is correct
90 Correct 86 ms 58912 KB Output is correct
91 Correct 76 ms 58708 KB Output is correct
92 Correct 51 ms 57404 KB Output is correct
93 Correct 64 ms 58452 KB Output is correct
94 Correct 75 ms 56156 KB Output is correct
95 Correct 69 ms 57428 KB Output is correct
96 Correct 78 ms 58900 KB Output is correct
97 Correct 79 ms 58872 KB Output is correct
98 Correct 67 ms 58196 KB Output is correct
99 Correct 84 ms 60568 KB Output is correct
100 Correct 79 ms 58448 KB Output is correct
101 Correct 82 ms 59212 KB Output is correct
102 Correct 91 ms 59472 KB Output is correct
103 Correct 72 ms 56644 KB Output is correct
104 Correct 82 ms 58144 KB Output is correct
105 Correct 90 ms 59476 KB Output is correct
106 Correct 47 ms 56616 KB Output is correct
107 Correct 47 ms 56216 KB Output is correct
108 Correct 59 ms 58036 KB Output is correct
109 Correct 61 ms 56404 KB Output is correct
110 Correct 89 ms 58672 KB Output is correct
111 Correct 73 ms 58704 KB Output is correct
112 Correct 78 ms 58192 KB Output is correct
113 Correct 116 ms 59016 KB Output is correct
114 Correct 77 ms 58448 KB Output is correct
115 Correct 80 ms 59732 KB Output is correct
116 Correct 58 ms 55892 KB Output is correct
117 Correct 78 ms 59216 KB Output is correct
118 Correct 69 ms 57512 KB Output is correct
119 Correct 67 ms 57140 KB Output is correct
120 Correct 79 ms 59220 KB Output is correct
121 Correct 80 ms 59216 KB Output is correct
122 Correct 78 ms 58960 KB Output is correct
123 Correct 80 ms 59220 KB Output is correct
124 Correct 80 ms 59220 KB Output is correct
125 Correct 67 ms 57680 KB Output is correct
126 Correct 52 ms 57516 KB Output is correct
127 Correct 58 ms 57172 KB Output is correct
128 Correct 70 ms 58964 KB Output is correct
129 Correct 72 ms 59736 KB Output is correct
130 Correct 313 ms 85588 KB Output is correct
131 Correct 241 ms 75988 KB Output is correct
132 Correct 334 ms 85740 KB Output is correct
133 Correct 317 ms 86864 KB Output is correct
134 Correct 292 ms 82772 KB Output is correct
135 Correct 344 ms 88404 KB Output is correct
136 Correct 339 ms 87396 KB Output is correct
137 Correct 338 ms 87392 KB Output is correct
138 Correct 306 ms 85844 KB Output is correct
139 Correct 311 ms 86676 KB Output is correct
140 Correct 315 ms 85900 KB Output is correct
141 Correct 338 ms 86612 KB Output is correct
142 Correct 312 ms 86612 KB Output is correct
143 Correct 314 ms 86540 KB Output is correct
144 Correct 361 ms 86108 KB Output is correct
145 Correct 308 ms 86612 KB Output is correct
146 Correct 319 ms 86276 KB Output is correct
147 Correct 316 ms 86612 KB Output is correct
148 Correct 335 ms 86524 KB Output is correct
149 Correct 349 ms 86696 KB Output is correct
150 Correct 162 ms 81376 KB Output is correct
151 Correct 237 ms 85708 KB Output is correct
152 Correct 237 ms 85584 KB Output is correct
153 Correct 285 ms 88748 KB Output is correct