답안 #481444

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
481444 2021-10-20T22:19:01 Z fishy15 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
389 ms 66460 KB
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <array>
#include <algorithm>
#include <utility>
#include <map>
#include <queue>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstring>

#define ll long long
#define ld long double
#define eps 1e-8
#define MOD 1000000007

#define INF 0x3f3f3f3f
#define INFLL 0x3f3f3f3f3f3f3f3f

// change if necessary
#define MAXN 250010

using namespace std;

template<typename T>
T &ckmin(T &a, T b) {
    return a = min(a, b);
}

struct BIT {
    int n;
    vector<ll> bit;

    BIT(int n) : n(n), bit(n) {}

    void upd(int x, ll q) {
        x++;
        while (x <= n) {
            bit[x - 1] += q;
            x += x & -x;
        }
    }

    ll qry(int x) {
        ll res = 0;
        while (x > 0) {
            res += bit[x - 1];
            x -= x & -x;
        }
        return res;
    }

    int bsearch(ll r) {
        int cur = 0;
        ll sum = 0;
        for (int i = (1 << 20); i > 0; i /= 2) {
            if (cur + i <= n && sum + bit[cur + i - 1] <= r) {
                cur += i;
                sum += bit[cur - 1];
            }
        }
        return cur;
    }
};

BIT tot_add(0);

// represents max(a, x + b)
struct Func {
    ll a, b;

    Func() : Func(0, 0) {}
    Func(ll a, ll b) : a(a), b(b) {}

    ll operator()() { return max(a, b); }

    Func operator+(const Func &f2) const {
        return Func(max(a, b + f2.a), b + f2.b);
    }
};

template<typename Node>
struct segtree {
    int n;
    vector<Node> lazy;

    segtree(int n) : n(n), lazy(4 * n) {}

    void push(int v, int l, int r) {
        if (l + 1 != r) {
            lazy[2 * v] = lazy[v] + lazy[2 * v];
            lazy[2 * v + 1] = lazy[v] + lazy[2 * v + 1];
            lazy[v] = Node();
        }
    }

    void upd(int x, int y, Node q) { upd(1, 0, n, x, y, q); }
    void upd(int v, int l, int r, int x, int y, Node q) {
        push(v, l, r);
        if (r <= x || l >= y) return;
        if (x <= l && r <= y) {
            lazy[v] = q + lazy[v];
            push(v, l, r);
        } else {
            int m = (l + r) / 2;
            upd(2 * v, l, m, x, y, q);
            upd(2 * v + 1, m, r, x, y, q);
        }
    }

    ll qry(int a) { return qry(1, 0, n, a)(); }
    Node qry(int v, int l, int r, int a) {
        push(v, l, r);
        if (l + 1 == r) {
            return lazy[v];
        } else {
            int m = (l + r) / 2;
            if (a < m) {
                return qry(2 * v, l, m, a);
            } else {
                return qry(2 * v + 1, m, r, a);
            }
        }
    }
};

int n, m, q;
array<ll, 5> qry[MAXN];
vector<pair<ll, int>> in_q;
vector<int> add[MAXN]; // elements to add to the queue
vector<int> rem[MAXN]; // elements to remove from the queue
vector<pair<ll, int>> to_ans[MAXN];
vector<ll> ans;

int main() {
    cin.tie(0)->sync_with_stdio(0);

    cin >> n >> m >> q;
    for (int i = 0; i < q; i++) {
        qry[i] = {0, 0, 0, 0, 0};
        cin >> qry[i][0];
        switch (qry[i][0]) {
            case 1: 
                cin >> qry[i][1] >> qry[i][2] >> qry[i][3] >> qry[i][4];
                break;
            case 2:
                cin >> qry[i][1] >> qry[i][2] >> qry[i][3];
                break;
            case 3:
                cin >> qry[i][1] >> qry[i][2];
                break;
        }
    }

    segtree<Func> st(n);
    tot_add = BIT(n);

    for (int i = 0; i < q; i++) {
        auto qq = qry[i];
        if (qq[0] == 1) {
            auto [t, l, r, c, k] = qq;
            l--;
            add[l].push_back(in_q.size());
            rem[r].push_back(in_q.size());
            in_q.push_back({k, c});
            st.upd(l, r, Func(k, k));
            tot_add.upd(l, k);
            tot_add.upd(r, -k);
        } else if (qq[0] == 2) {
            auto [t, l, r, k, _] = qq;
            l--;
            st.upd(l, r, Func(0, -k));
        } else {
            auto [t, a, b, _, __] = qq;
            a--; b--;
            ll num_q = st.qry(a);
            ll p_idx = num_q <= b ? -1 : tot_add.qry(a + 1) - num_q + b;
            to_ans[a].push_back({p_idx, ans.size()});
            ans.emplace_back();
        }
    }

    int sz = in_q.size();
    BIT bit(sz);
    for (int i = 0; i < n; i++) {
        for (int x : add[i]) {
            bit.upd(x, in_q[x].first);
        }

        for (int x : rem[i]) {
            bit.upd(x, -in_q[x].first);
        }

        for (auto [loc, idx] : to_ans[i]) {
            if (loc == -1) {
                ans[idx] = 0;
            } else {
                int pos = bit.bsearch(loc);
                ans[idx] = in_q[pos].second;
            }
        }
    }

    for (int x : ans) {
        cout << x << '\n';
    }

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 18076 KB Output is correct
2 Correct 11 ms 18236 KB Output is correct
3 Correct 11 ms 18124 KB Output is correct
4 Correct 11 ms 18124 KB Output is correct
5 Correct 11 ms 17996 KB Output is correct
6 Correct 10 ms 17996 KB Output is correct
7 Correct 11 ms 18124 KB Output is correct
8 Correct 11 ms 18124 KB Output is correct
9 Correct 11 ms 18124 KB Output is correct
10 Correct 11 ms 18124 KB Output is correct
11 Correct 11 ms 18124 KB Output is correct
12 Correct 11 ms 18124 KB Output is correct
13 Correct 10 ms 18084 KB Output is correct
14 Correct 10 ms 18124 KB Output is correct
15 Correct 10 ms 18124 KB Output is correct
16 Correct 11 ms 18228 KB Output is correct
17 Correct 10 ms 18124 KB Output is correct
18 Correct 11 ms 18124 KB Output is correct
19 Correct 11 ms 18124 KB Output is correct
20 Correct 11 ms 18252 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 18076 KB Output is correct
2 Correct 11 ms 18236 KB Output is correct
3 Correct 11 ms 18124 KB Output is correct
4 Correct 11 ms 18124 KB Output is correct
5 Correct 11 ms 17996 KB Output is correct
6 Correct 10 ms 17996 KB Output is correct
7 Correct 11 ms 18124 KB Output is correct
8 Correct 11 ms 18124 KB Output is correct
9 Correct 11 ms 18124 KB Output is correct
10 Correct 11 ms 18124 KB Output is correct
11 Correct 11 ms 18124 KB Output is correct
12 Correct 11 ms 18124 KB Output is correct
13 Correct 10 ms 18084 KB Output is correct
14 Correct 10 ms 18124 KB Output is correct
15 Correct 10 ms 18124 KB Output is correct
16 Correct 11 ms 18228 KB Output is correct
17 Correct 10 ms 18124 KB Output is correct
18 Correct 11 ms 18124 KB Output is correct
19 Correct 11 ms 18124 KB Output is correct
20 Correct 11 ms 18252 KB Output is correct
21 Correct 11 ms 18228 KB Output is correct
22 Correct 11 ms 18264 KB Output is correct
23 Correct 11 ms 18124 KB Output is correct
24 Correct 11 ms 18252 KB Output is correct
25 Correct 10 ms 18076 KB Output is correct
26 Correct 10 ms 17996 KB Output is correct
27 Correct 11 ms 18204 KB Output is correct
28 Correct 11 ms 18252 KB Output is correct
29 Correct 13 ms 18252 KB Output is correct
30 Correct 12 ms 18320 KB Output is correct
31 Correct 11 ms 18252 KB Output is correct
32 Correct 11 ms 18204 KB Output is correct
33 Correct 10 ms 18208 KB Output is correct
34 Correct 10 ms 18260 KB Output is correct
35 Correct 11 ms 18116 KB Output is correct
36 Correct 11 ms 18208 KB Output is correct
37 Correct 10 ms 18124 KB Output is correct
38 Correct 12 ms 18252 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 82 ms 27452 KB Output is correct
2 Correct 72 ms 28012 KB Output is correct
3 Correct 66 ms 27516 KB Output is correct
4 Correct 74 ms 27656 KB Output is correct
5 Correct 72 ms 27968 KB Output is correct
6 Correct 71 ms 27968 KB Output is correct
7 Correct 26 ms 21636 KB Output is correct
8 Correct 27 ms 21700 KB Output is correct
9 Correct 67 ms 27668 KB Output is correct
10 Correct 68 ms 27456 KB Output is correct
11 Correct 71 ms 27524 KB Output is correct
12 Correct 70 ms 27540 KB Output is correct
13 Correct 64 ms 26044 KB Output is correct
14 Correct 74 ms 28220 KB Output is correct
15 Correct 70 ms 27064 KB Output is correct
16 Correct 76 ms 28880 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 322 ms 51372 KB Output is correct
2 Correct 250 ms 50048 KB Output is correct
3 Correct 351 ms 60648 KB Output is correct
4 Correct 279 ms 54868 KB Output is correct
5 Correct 275 ms 50744 KB Output is correct
6 Correct 389 ms 62080 KB Output is correct
7 Correct 89 ms 37744 KB Output is correct
8 Correct 91 ms 37764 KB Output is correct
9 Correct 382 ms 64132 KB Output is correct
10 Correct 379 ms 64176 KB Output is correct
11 Correct 361 ms 60364 KB Output is correct
12 Correct 350 ms 60336 KB Output is correct
13 Correct 360 ms 60456 KB Output is correct
14 Correct 356 ms 60232 KB Output is correct
15 Correct 366 ms 60432 KB Output is correct
16 Correct 356 ms 60180 KB Output is correct
17 Correct 352 ms 60280 KB Output is correct
18 Correct 353 ms 60340 KB Output is correct
19 Correct 349 ms 60336 KB Output is correct
20 Correct 363 ms 60228 KB Output is correct
21 Correct 376 ms 60212 KB Output is correct
22 Correct 365 ms 60272 KB Output is correct
23 Correct 363 ms 60344 KB Output is correct
24 Correct 365 ms 60352 KB Output is correct
25 Correct 251 ms 52876 KB Output is correct
26 Correct 271 ms 57260 KB Output is correct
27 Correct 293 ms 65656 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 18076 KB Output is correct
2 Correct 11 ms 18236 KB Output is correct
3 Correct 11 ms 18124 KB Output is correct
4 Correct 11 ms 18124 KB Output is correct
5 Correct 11 ms 17996 KB Output is correct
6 Correct 10 ms 17996 KB Output is correct
7 Correct 11 ms 18124 KB Output is correct
8 Correct 11 ms 18124 KB Output is correct
9 Correct 11 ms 18124 KB Output is correct
10 Correct 11 ms 18124 KB Output is correct
11 Correct 11 ms 18124 KB Output is correct
12 Correct 11 ms 18124 KB Output is correct
13 Correct 10 ms 18084 KB Output is correct
14 Correct 10 ms 18124 KB Output is correct
15 Correct 10 ms 18124 KB Output is correct
16 Correct 11 ms 18228 KB Output is correct
17 Correct 10 ms 18124 KB Output is correct
18 Correct 11 ms 18124 KB Output is correct
19 Correct 11 ms 18124 KB Output is correct
20 Correct 11 ms 18252 KB Output is correct
21 Correct 82 ms 27452 KB Output is correct
22 Correct 72 ms 28012 KB Output is correct
23 Correct 66 ms 27516 KB Output is correct
24 Correct 74 ms 27656 KB Output is correct
25 Correct 72 ms 27968 KB Output is correct
26 Correct 71 ms 27968 KB Output is correct
27 Correct 26 ms 21636 KB Output is correct
28 Correct 27 ms 21700 KB Output is correct
29 Correct 67 ms 27668 KB Output is correct
30 Correct 68 ms 27456 KB Output is correct
31 Correct 71 ms 27524 KB Output is correct
32 Correct 70 ms 27540 KB Output is correct
33 Correct 64 ms 26044 KB Output is correct
34 Correct 74 ms 28220 KB Output is correct
35 Correct 70 ms 27064 KB Output is correct
36 Correct 76 ms 28880 KB Output is correct
37 Correct 65 ms 26552 KB Output is correct
38 Correct 62 ms 26288 KB Output is correct
39 Correct 24 ms 21188 KB Output is correct
40 Correct 27 ms 21608 KB Output is correct
41 Correct 76 ms 27304 KB Output is correct
42 Correct 73 ms 27324 KB Output is correct
43 Correct 72 ms 27376 KB Output is correct
44 Correct 72 ms 27436 KB Output is correct
45 Correct 73 ms 27396 KB Output is correct
46 Correct 73 ms 27344 KB Output is correct
47 Correct 38 ms 26588 KB Output is correct
48 Correct 67 ms 26784 KB Output is correct
49 Correct 54 ms 24516 KB Output is correct
50 Correct 68 ms 26644 KB Output is correct
51 Correct 76 ms 27380 KB Output is correct
52 Correct 74 ms 27448 KB Output is correct
53 Correct 60 ms 26936 KB Output is correct
54 Correct 77 ms 28896 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 70 ms 27780 KB Output is correct
2 Correct 77 ms 29240 KB Output is correct
3 Correct 79 ms 30224 KB Output is correct
4 Correct 58 ms 27656 KB Output is correct
5 Correct 69 ms 28968 KB Output is correct
6 Correct 97 ms 30072 KB Output is correct
7 Correct 31 ms 23160 KB Output is correct
8 Correct 31 ms 23024 KB Output is correct
9 Correct 48 ms 28852 KB Output is correct
10 Correct 50 ms 26560 KB Output is correct
11 Correct 67 ms 29064 KB Output is correct
12 Correct 72 ms 29104 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 18076 KB Output is correct
2 Correct 11 ms 18236 KB Output is correct
3 Correct 11 ms 18124 KB Output is correct
4 Correct 11 ms 18124 KB Output is correct
5 Correct 11 ms 17996 KB Output is correct
6 Correct 10 ms 17996 KB Output is correct
7 Correct 11 ms 18124 KB Output is correct
8 Correct 11 ms 18124 KB Output is correct
9 Correct 11 ms 18124 KB Output is correct
10 Correct 11 ms 18124 KB Output is correct
11 Correct 11 ms 18124 KB Output is correct
12 Correct 11 ms 18124 KB Output is correct
13 Correct 10 ms 18084 KB Output is correct
14 Correct 10 ms 18124 KB Output is correct
15 Correct 10 ms 18124 KB Output is correct
16 Correct 11 ms 18228 KB Output is correct
17 Correct 10 ms 18124 KB Output is correct
18 Correct 11 ms 18124 KB Output is correct
19 Correct 11 ms 18124 KB Output is correct
20 Correct 11 ms 18252 KB Output is correct
21 Correct 11 ms 18228 KB Output is correct
22 Correct 11 ms 18264 KB Output is correct
23 Correct 11 ms 18124 KB Output is correct
24 Correct 11 ms 18252 KB Output is correct
25 Correct 10 ms 18076 KB Output is correct
26 Correct 10 ms 17996 KB Output is correct
27 Correct 11 ms 18204 KB Output is correct
28 Correct 11 ms 18252 KB Output is correct
29 Correct 13 ms 18252 KB Output is correct
30 Correct 12 ms 18320 KB Output is correct
31 Correct 11 ms 18252 KB Output is correct
32 Correct 11 ms 18204 KB Output is correct
33 Correct 10 ms 18208 KB Output is correct
34 Correct 10 ms 18260 KB Output is correct
35 Correct 11 ms 18116 KB Output is correct
36 Correct 11 ms 18208 KB Output is correct
37 Correct 10 ms 18124 KB Output is correct
38 Correct 12 ms 18252 KB Output is correct
39 Correct 82 ms 27452 KB Output is correct
40 Correct 72 ms 28012 KB Output is correct
41 Correct 66 ms 27516 KB Output is correct
42 Correct 74 ms 27656 KB Output is correct
43 Correct 72 ms 27968 KB Output is correct
44 Correct 71 ms 27968 KB Output is correct
45 Correct 26 ms 21636 KB Output is correct
46 Correct 27 ms 21700 KB Output is correct
47 Correct 67 ms 27668 KB Output is correct
48 Correct 68 ms 27456 KB Output is correct
49 Correct 71 ms 27524 KB Output is correct
50 Correct 70 ms 27540 KB Output is correct
51 Correct 64 ms 26044 KB Output is correct
52 Correct 74 ms 28220 KB Output is correct
53 Correct 70 ms 27064 KB Output is correct
54 Correct 76 ms 28880 KB Output is correct
55 Correct 65 ms 26552 KB Output is correct
56 Correct 62 ms 26288 KB Output is correct
57 Correct 24 ms 21188 KB Output is correct
58 Correct 27 ms 21608 KB Output is correct
59 Correct 76 ms 27304 KB Output is correct
60 Correct 73 ms 27324 KB Output is correct
61 Correct 72 ms 27376 KB Output is correct
62 Correct 72 ms 27436 KB Output is correct
63 Correct 73 ms 27396 KB Output is correct
64 Correct 73 ms 27344 KB Output is correct
65 Correct 38 ms 26588 KB Output is correct
66 Correct 67 ms 26784 KB Output is correct
67 Correct 54 ms 24516 KB Output is correct
68 Correct 68 ms 26644 KB Output is correct
69 Correct 76 ms 27380 KB Output is correct
70 Correct 74 ms 27448 KB Output is correct
71 Correct 60 ms 26936 KB Output is correct
72 Correct 77 ms 28896 KB Output is correct
73 Correct 70 ms 27780 KB Output is correct
74 Correct 77 ms 29240 KB Output is correct
75 Correct 79 ms 30224 KB Output is correct
76 Correct 58 ms 27656 KB Output is correct
77 Correct 69 ms 28968 KB Output is correct
78 Correct 97 ms 30072 KB Output is correct
79 Correct 31 ms 23160 KB Output is correct
80 Correct 31 ms 23024 KB Output is correct
81 Correct 48 ms 28852 KB Output is correct
82 Correct 50 ms 26560 KB Output is correct
83 Correct 67 ms 29064 KB Output is correct
84 Correct 72 ms 29104 KB Output is correct
85 Correct 66 ms 27416 KB Output is correct
86 Correct 79 ms 29120 KB Output is correct
87 Correct 73 ms 28356 KB Output is correct
88 Correct 82 ms 29504 KB Output is correct
89 Correct 55 ms 25896 KB Output is correct
90 Correct 77 ms 28996 KB Output is correct
91 Correct 62 ms 26300 KB Output is correct
92 Correct 61 ms 26036 KB Output is correct
93 Correct 76 ms 28956 KB Output is correct
94 Correct 78 ms 29148 KB Output is correct
95 Correct 76 ms 28432 KB Output is correct
96 Correct 83 ms 28964 KB Output is correct
97 Correct 77 ms 28988 KB Output is correct
98 Correct 64 ms 26684 KB Output is correct
99 Correct 42 ms 28064 KB Output is correct
100 Correct 58 ms 26688 KB Output is correct
101 Correct 66 ms 28168 KB Output is correct
102 Correct 88 ms 30392 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 18076 KB Output is correct
2 Correct 11 ms 18236 KB Output is correct
3 Correct 11 ms 18124 KB Output is correct
4 Correct 11 ms 18124 KB Output is correct
5 Correct 11 ms 17996 KB Output is correct
6 Correct 10 ms 17996 KB Output is correct
7 Correct 11 ms 18124 KB Output is correct
8 Correct 11 ms 18124 KB Output is correct
9 Correct 11 ms 18124 KB Output is correct
10 Correct 11 ms 18124 KB Output is correct
11 Correct 11 ms 18124 KB Output is correct
12 Correct 11 ms 18124 KB Output is correct
13 Correct 10 ms 18084 KB Output is correct
14 Correct 10 ms 18124 KB Output is correct
15 Correct 10 ms 18124 KB Output is correct
16 Correct 11 ms 18228 KB Output is correct
17 Correct 10 ms 18124 KB Output is correct
18 Correct 11 ms 18124 KB Output is correct
19 Correct 11 ms 18124 KB Output is correct
20 Correct 11 ms 18252 KB Output is correct
21 Correct 11 ms 18228 KB Output is correct
22 Correct 11 ms 18264 KB Output is correct
23 Correct 11 ms 18124 KB Output is correct
24 Correct 11 ms 18252 KB Output is correct
25 Correct 10 ms 18076 KB Output is correct
26 Correct 10 ms 17996 KB Output is correct
27 Correct 11 ms 18204 KB Output is correct
28 Correct 11 ms 18252 KB Output is correct
29 Correct 13 ms 18252 KB Output is correct
30 Correct 12 ms 18320 KB Output is correct
31 Correct 11 ms 18252 KB Output is correct
32 Correct 11 ms 18204 KB Output is correct
33 Correct 10 ms 18208 KB Output is correct
34 Correct 10 ms 18260 KB Output is correct
35 Correct 11 ms 18116 KB Output is correct
36 Correct 11 ms 18208 KB Output is correct
37 Correct 10 ms 18124 KB Output is correct
38 Correct 12 ms 18252 KB Output is correct
39 Correct 82 ms 27452 KB Output is correct
40 Correct 72 ms 28012 KB Output is correct
41 Correct 66 ms 27516 KB Output is correct
42 Correct 74 ms 27656 KB Output is correct
43 Correct 72 ms 27968 KB Output is correct
44 Correct 71 ms 27968 KB Output is correct
45 Correct 26 ms 21636 KB Output is correct
46 Correct 27 ms 21700 KB Output is correct
47 Correct 67 ms 27668 KB Output is correct
48 Correct 68 ms 27456 KB Output is correct
49 Correct 71 ms 27524 KB Output is correct
50 Correct 70 ms 27540 KB Output is correct
51 Correct 64 ms 26044 KB Output is correct
52 Correct 74 ms 28220 KB Output is correct
53 Correct 70 ms 27064 KB Output is correct
54 Correct 76 ms 28880 KB Output is correct
55 Correct 322 ms 51372 KB Output is correct
56 Correct 250 ms 50048 KB Output is correct
57 Correct 351 ms 60648 KB Output is correct
58 Correct 279 ms 54868 KB Output is correct
59 Correct 275 ms 50744 KB Output is correct
60 Correct 389 ms 62080 KB Output is correct
61 Correct 89 ms 37744 KB Output is correct
62 Correct 91 ms 37764 KB Output is correct
63 Correct 382 ms 64132 KB Output is correct
64 Correct 379 ms 64176 KB Output is correct
65 Correct 361 ms 60364 KB Output is correct
66 Correct 350 ms 60336 KB Output is correct
67 Correct 360 ms 60456 KB Output is correct
68 Correct 356 ms 60232 KB Output is correct
69 Correct 366 ms 60432 KB Output is correct
70 Correct 356 ms 60180 KB Output is correct
71 Correct 352 ms 60280 KB Output is correct
72 Correct 353 ms 60340 KB Output is correct
73 Correct 349 ms 60336 KB Output is correct
74 Correct 363 ms 60228 KB Output is correct
75 Correct 376 ms 60212 KB Output is correct
76 Correct 365 ms 60272 KB Output is correct
77 Correct 363 ms 60344 KB Output is correct
78 Correct 365 ms 60352 KB Output is correct
79 Correct 251 ms 52876 KB Output is correct
80 Correct 271 ms 57260 KB Output is correct
81 Correct 293 ms 65656 KB Output is correct
82 Correct 65 ms 26552 KB Output is correct
83 Correct 62 ms 26288 KB Output is correct
84 Correct 24 ms 21188 KB Output is correct
85 Correct 27 ms 21608 KB Output is correct
86 Correct 76 ms 27304 KB Output is correct
87 Correct 73 ms 27324 KB Output is correct
88 Correct 72 ms 27376 KB Output is correct
89 Correct 72 ms 27436 KB Output is correct
90 Correct 73 ms 27396 KB Output is correct
91 Correct 73 ms 27344 KB Output is correct
92 Correct 38 ms 26588 KB Output is correct
93 Correct 67 ms 26784 KB Output is correct
94 Correct 54 ms 24516 KB Output is correct
95 Correct 68 ms 26644 KB Output is correct
96 Correct 76 ms 27380 KB Output is correct
97 Correct 74 ms 27448 KB Output is correct
98 Correct 60 ms 26936 KB Output is correct
99 Correct 77 ms 28896 KB Output is correct
100 Correct 70 ms 27780 KB Output is correct
101 Correct 77 ms 29240 KB Output is correct
102 Correct 79 ms 30224 KB Output is correct
103 Correct 58 ms 27656 KB Output is correct
104 Correct 69 ms 28968 KB Output is correct
105 Correct 97 ms 30072 KB Output is correct
106 Correct 31 ms 23160 KB Output is correct
107 Correct 31 ms 23024 KB Output is correct
108 Correct 48 ms 28852 KB Output is correct
109 Correct 50 ms 26560 KB Output is correct
110 Correct 67 ms 29064 KB Output is correct
111 Correct 72 ms 29104 KB Output is correct
112 Correct 66 ms 27416 KB Output is correct
113 Correct 79 ms 29120 KB Output is correct
114 Correct 73 ms 28356 KB Output is correct
115 Correct 82 ms 29504 KB Output is correct
116 Correct 55 ms 25896 KB Output is correct
117 Correct 77 ms 28996 KB Output is correct
118 Correct 62 ms 26300 KB Output is correct
119 Correct 61 ms 26036 KB Output is correct
120 Correct 76 ms 28956 KB Output is correct
121 Correct 78 ms 29148 KB Output is correct
122 Correct 76 ms 28432 KB Output is correct
123 Correct 83 ms 28964 KB Output is correct
124 Correct 77 ms 28988 KB Output is correct
125 Correct 64 ms 26684 KB Output is correct
126 Correct 42 ms 28064 KB Output is correct
127 Correct 58 ms 26688 KB Output is correct
128 Correct 66 ms 28168 KB Output is correct
129 Correct 88 ms 30392 KB Output is correct
130 Correct 353 ms 60788 KB Output is correct
131 Correct 241 ms 49720 KB Output is correct
132 Correct 352 ms 61260 KB Output is correct
133 Correct 363 ms 60956 KB Output is correct
134 Correct 331 ms 58344 KB Output is correct
135 Correct 373 ms 62892 KB Output is correct
136 Correct 372 ms 65140 KB Output is correct
137 Correct 365 ms 65024 KB Output is correct
138 Correct 341 ms 61008 KB Output is correct
139 Correct 352 ms 60984 KB Output is correct
140 Correct 334 ms 60852 KB Output is correct
141 Correct 344 ms 60980 KB Output is correct
142 Correct 342 ms 60852 KB Output is correct
143 Correct 354 ms 60924 KB Output is correct
144 Correct 340 ms 60932 KB Output is correct
145 Correct 356 ms 60944 KB Output is correct
146 Correct 341 ms 60908 KB Output is correct
147 Correct 353 ms 60940 KB Output is correct
148 Correct 338 ms 60860 KB Output is correct
149 Correct 351 ms 60968 KB Output is correct
150 Correct 153 ms 57600 KB Output is correct
151 Correct 262 ms 57896 KB Output is correct
152 Correct 265 ms 58036 KB Output is correct
153 Correct 286 ms 66460 KB Output is correct