Submission #1098863

# Submission time Handle Problem Language Result Execution time Memory
1098863 2024-10-10T08:53:32 Z _callmelucian Food Court (JOI21_foodcourt) C++14
100 / 100
364 ms 72528 KB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef tuple<int,int,int> tt;

#define all(a) a.begin(), a.end()
#define filter(a) e.erase(unique(all(a)), a.end())

const int mn = 2e5 + 5e4 + 4;

struct node {
    ll neg, val;

    node() : neg(0), val(0) {}
    node (ll neg, ll val) : neg(neg), val(val) {}

    node operator + (const node &o) const {
        ll delta = val - o.neg;
        return node(neg - min(0LL, delta), o.val + max(0LL, delta));
    }
};

struct IT {
    vector<node> tr;
    IT (int sz) : tr(4 * sz) {}

    void update (int pos, ll val, int k, int l, int r) {
        if (pos < l || r < pos) return;
        if (l == r) {
            if (val < 0) tr[k] = node(-val, 0);
            else tr[k] = node(0, val);
            return;
        }
        int mid = (l + r) >> 1;
        update(pos, val, 2 * k, l, mid);
        update(pos, val, 2 * k + 1, mid + 1, r);
        tr[k] = tr[2 * k] + tr[2 * k + 1];
    }

    node query (int a, int b, int k, int l, int r) {
        if (b < l || r < a) return node(0, 0);
        if (a <= l && r <= b) return tr[k];
        int mid = (l + r) >> 1;
        return query(a, b, 2 * k, l, mid) + query(a, b, 2 * k + 1, mid + 1, r);
    }
} tree(mn);

struct BIT {
    vector<ll> tr;
    BIT (int sz) : tr(sz + 1) {}

    int p (int k) { return k & -k; }

    void update (int k, ll val) {
        for (; k < tr.size(); k += p(k)) tr[k] += val;
    }

    ll preSum (int k, ll ans = 0) {
        for (; k; k -= p(k)) ans += tr[k];
        return ans;
    }

    int walk (ll ub) {
        int ans = 0, lg = 31 - __builtin_clz(tr.size()); ll sum = 0;
        for (int mask = (1 << lg); mask > 0; mask >>= 1) {
            if ((ans | mask) < tr.size() && tr[ans | mask] + sum < ub) ans |= mask, sum += tr[ans];
        }
        return ans + 1;
    }
} customer(mn);

vector<ll> openPush[mn], closePush[mn], openPop[mn], closePop[mn], query[mn];
ll group[mn], population[mn], ans[mn];

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

    int n, m, q; cin >> n >> m >> q;
    for (int i = 1; i <= q; i++) {
        int type; cin >> type;
        if (type == 1) {
            int l, r; cin >> l >> r >> group[i] >> population[i];
            openPush[l].push_back(i);
            closePush[r].push_back(i);
        }
        else if (type == 2) {
            int l, r; cin >> l >> r >> population[i];
            openPop[l].push_back(i);
            closePop[r].push_back(i);
        }
        else {
            int pos; cin >> pos >> population[i];
            query[pos].push_back(i);
        }
        ans[i] = -1;
    }

    for (int i = 1; i <= n; i++) {
        for (int u : openPush[i]) {
            customer.update(u, population[u]);
            tree.update(u, population[u], 1, 1, q);
        }
        for (int u : openPop[i])
            tree.update(u, -population[u], 1, 1, q);

        for (int moment : query[i]) {
            ll allCustomer = customer.preSum(moment), actual = tree.query(1, moment, 1, 1, q).val;
            ll leave = allCustomer - actual;
            if (population[moment] + leave <= allCustomer)
                ans[moment] = group[customer.walk(population[moment] + leave)];
            else ans[moment] = 0;
        }

        for (int u : closePush[i]) {
            customer.update(u, -population[u]);
            tree.update(u, 0, 1, 1, q);
        }
        for (int u : closePop[i])
            tree.update(u, 0, 1, 1, q);
    }
    for (int i = 1; i <= q; i++)
        if (ans[i] != -1) cout << ans[i] << "\n";

    return 0;
}

Compilation message

foodcourt.cpp: In member function 'void BIT::update(int, ll)':
foodcourt.cpp:58:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   58 |         for (; k < tr.size(); k += p(k)) tr[k] += val;
      |                ~~^~~~~~~~~~~
foodcourt.cpp: In member function 'int BIT::walk(ll)':
foodcourt.cpp:69:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   69 |             if ((ans | mask) < tr.size() && tr[ans | mask] + sum < ub) ans |= mask, sum += tr[ans];
      |                 ~~~~~~~~~~~~~^~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 20 ms 47452 KB Output is correct
2 Correct 23 ms 47480 KB Output is correct
3 Correct 21 ms 47448 KB Output is correct
4 Correct 20 ms 47480 KB Output is correct
5 Correct 20 ms 47452 KB Output is correct
6 Correct 19 ms 47336 KB Output is correct
7 Correct 21 ms 47452 KB Output is correct
8 Correct 20 ms 47452 KB Output is correct
9 Correct 20 ms 47536 KB Output is correct
10 Correct 20 ms 47452 KB Output is correct
11 Correct 19 ms 47452 KB Output is correct
12 Correct 20 ms 47452 KB Output is correct
13 Correct 19 ms 47452 KB Output is correct
14 Correct 20 ms 47568 KB Output is correct
15 Correct 23 ms 47452 KB Output is correct
16 Correct 23 ms 47448 KB Output is correct
17 Correct 22 ms 47440 KB Output is correct
18 Correct 22 ms 47452 KB Output is correct
19 Correct 20 ms 47452 KB Output is correct
20 Correct 24 ms 47448 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 47452 KB Output is correct
2 Correct 23 ms 47480 KB Output is correct
3 Correct 21 ms 47448 KB Output is correct
4 Correct 20 ms 47480 KB Output is correct
5 Correct 20 ms 47452 KB Output is correct
6 Correct 19 ms 47336 KB Output is correct
7 Correct 21 ms 47452 KB Output is correct
8 Correct 20 ms 47452 KB Output is correct
9 Correct 20 ms 47536 KB Output is correct
10 Correct 20 ms 47452 KB Output is correct
11 Correct 19 ms 47452 KB Output is correct
12 Correct 20 ms 47452 KB Output is correct
13 Correct 19 ms 47452 KB Output is correct
14 Correct 20 ms 47568 KB Output is correct
15 Correct 23 ms 47452 KB Output is correct
16 Correct 23 ms 47448 KB Output is correct
17 Correct 22 ms 47440 KB Output is correct
18 Correct 22 ms 47452 KB Output is correct
19 Correct 20 ms 47452 KB Output is correct
20 Correct 24 ms 47448 KB Output is correct
21 Correct 23 ms 47452 KB Output is correct
22 Correct 23 ms 47704 KB Output is correct
23 Correct 24 ms 47484 KB Output is correct
24 Correct 29 ms 47596 KB Output is correct
25 Correct 22 ms 47452 KB Output is correct
26 Correct 26 ms 47452 KB Output is correct
27 Correct 22 ms 47556 KB Output is correct
28 Correct 20 ms 47592 KB Output is correct
29 Correct 23 ms 47556 KB Output is correct
30 Correct 23 ms 47584 KB Output is correct
31 Correct 23 ms 47448 KB Output is correct
32 Correct 23 ms 47448 KB Output is correct
33 Correct 21 ms 47452 KB Output is correct
34 Correct 30 ms 47448 KB Output is correct
35 Correct 25 ms 47448 KB Output is correct
36 Correct 19 ms 47452 KB Output is correct
37 Correct 20 ms 47452 KB Output is correct
38 Correct 22 ms 47448 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 61 ms 52832 KB Output is correct
2 Correct 63 ms 53136 KB Output is correct
3 Correct 61 ms 52820 KB Output is correct
4 Correct 69 ms 52816 KB Output is correct
5 Correct 66 ms 53080 KB Output is correct
6 Correct 67 ms 52960 KB Output is correct
7 Correct 44 ms 50364 KB Output is correct
8 Correct 44 ms 50724 KB Output is correct
9 Correct 69 ms 52812 KB Output is correct
10 Correct 65 ms 53072 KB Output is correct
11 Correct 76 ms 52812 KB Output is correct
12 Correct 66 ms 53036 KB Output is correct
13 Correct 68 ms 52052 KB Output is correct
14 Correct 72 ms 52816 KB Output is correct
15 Correct 67 ms 52564 KB Output is correct
16 Correct 75 ms 52816 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 289 ms 68180 KB Output is correct
2 Correct 237 ms 64336 KB Output is correct
3 Correct 364 ms 69972 KB Output is correct
4 Correct 223 ms 64084 KB Output is correct
5 Correct 188 ms 64224 KB Output is correct
6 Correct 284 ms 70228 KB Output is correct
7 Correct 121 ms 60828 KB Output is correct
8 Correct 119 ms 61236 KB Output is correct
9 Correct 263 ms 68432 KB Output is correct
10 Correct 310 ms 68500 KB Output is correct
11 Correct 287 ms 69204 KB Output is correct
12 Correct 291 ms 69964 KB Output is correct
13 Correct 305 ms 68948 KB Output is correct
14 Correct 287 ms 69968 KB Output is correct
15 Correct 331 ms 69944 KB Output is correct
16 Correct 315 ms 69928 KB Output is correct
17 Correct 344 ms 69972 KB Output is correct
18 Correct 320 ms 69400 KB Output is correct
19 Correct 317 ms 70224 KB Output is correct
20 Correct 305 ms 69412 KB Output is correct
21 Correct 317 ms 70076 KB Output is correct
22 Correct 328 ms 69936 KB Output is correct
23 Correct 340 ms 69888 KB Output is correct
24 Correct 333 ms 69972 KB Output is correct
25 Correct 231 ms 65656 KB Output is correct
26 Correct 224 ms 65800 KB Output is correct
27 Correct 208 ms 71508 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 47452 KB Output is correct
2 Correct 23 ms 47480 KB Output is correct
3 Correct 21 ms 47448 KB Output is correct
4 Correct 20 ms 47480 KB Output is correct
5 Correct 20 ms 47452 KB Output is correct
6 Correct 19 ms 47336 KB Output is correct
7 Correct 21 ms 47452 KB Output is correct
8 Correct 20 ms 47452 KB Output is correct
9 Correct 20 ms 47536 KB Output is correct
10 Correct 20 ms 47452 KB Output is correct
11 Correct 19 ms 47452 KB Output is correct
12 Correct 20 ms 47452 KB Output is correct
13 Correct 19 ms 47452 KB Output is correct
14 Correct 20 ms 47568 KB Output is correct
15 Correct 23 ms 47452 KB Output is correct
16 Correct 23 ms 47448 KB Output is correct
17 Correct 22 ms 47440 KB Output is correct
18 Correct 22 ms 47452 KB Output is correct
19 Correct 20 ms 47452 KB Output is correct
20 Correct 24 ms 47448 KB Output is correct
21 Correct 61 ms 52832 KB Output is correct
22 Correct 63 ms 53136 KB Output is correct
23 Correct 61 ms 52820 KB Output is correct
24 Correct 69 ms 52816 KB Output is correct
25 Correct 66 ms 53080 KB Output is correct
26 Correct 67 ms 52960 KB Output is correct
27 Correct 44 ms 50364 KB Output is correct
28 Correct 44 ms 50724 KB Output is correct
29 Correct 69 ms 52812 KB Output is correct
30 Correct 65 ms 53072 KB Output is correct
31 Correct 76 ms 52812 KB Output is correct
32 Correct 66 ms 53036 KB Output is correct
33 Correct 68 ms 52052 KB Output is correct
34 Correct 72 ms 52816 KB Output is correct
35 Correct 67 ms 52564 KB Output is correct
36 Correct 75 ms 52816 KB Output is correct
37 Correct 66 ms 52308 KB Output is correct
38 Correct 55 ms 51656 KB Output is correct
39 Correct 37 ms 50120 KB Output is correct
40 Correct 41 ms 50668 KB Output is correct
41 Correct 61 ms 52564 KB Output is correct
42 Correct 62 ms 52816 KB Output is correct
43 Correct 68 ms 52868 KB Output is correct
44 Correct 71 ms 52568 KB Output is correct
45 Correct 63 ms 52820 KB Output is correct
46 Correct 82 ms 52820 KB Output is correct
47 Correct 70 ms 51140 KB Output is correct
48 Correct 61 ms 51792 KB Output is correct
49 Correct 61 ms 51284 KB Output is correct
50 Correct 66 ms 52048 KB Output is correct
51 Correct 76 ms 52852 KB Output is correct
52 Correct 83 ms 52812 KB Output is correct
53 Correct 59 ms 51800 KB Output is correct
54 Correct 68 ms 52872 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 67 ms 52304 KB Output is correct
2 Correct 84 ms 52800 KB Output is correct
3 Correct 74 ms 53076 KB Output is correct
4 Correct 57 ms 51292 KB Output is correct
5 Correct 66 ms 52060 KB Output is correct
6 Correct 70 ms 52980 KB Output is correct
7 Correct 43 ms 50896 KB Output is correct
8 Correct 45 ms 50512 KB Output is correct
9 Correct 59 ms 51784 KB Output is correct
10 Correct 54 ms 50796 KB Output is correct
11 Correct 65 ms 52048 KB Output is correct
12 Correct 64 ms 52052 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 47452 KB Output is correct
2 Correct 23 ms 47480 KB Output is correct
3 Correct 21 ms 47448 KB Output is correct
4 Correct 20 ms 47480 KB Output is correct
5 Correct 20 ms 47452 KB Output is correct
6 Correct 19 ms 47336 KB Output is correct
7 Correct 21 ms 47452 KB Output is correct
8 Correct 20 ms 47452 KB Output is correct
9 Correct 20 ms 47536 KB Output is correct
10 Correct 20 ms 47452 KB Output is correct
11 Correct 19 ms 47452 KB Output is correct
12 Correct 20 ms 47452 KB Output is correct
13 Correct 19 ms 47452 KB Output is correct
14 Correct 20 ms 47568 KB Output is correct
15 Correct 23 ms 47452 KB Output is correct
16 Correct 23 ms 47448 KB Output is correct
17 Correct 22 ms 47440 KB Output is correct
18 Correct 22 ms 47452 KB Output is correct
19 Correct 20 ms 47452 KB Output is correct
20 Correct 24 ms 47448 KB Output is correct
21 Correct 23 ms 47452 KB Output is correct
22 Correct 23 ms 47704 KB Output is correct
23 Correct 24 ms 47484 KB Output is correct
24 Correct 29 ms 47596 KB Output is correct
25 Correct 22 ms 47452 KB Output is correct
26 Correct 26 ms 47452 KB Output is correct
27 Correct 22 ms 47556 KB Output is correct
28 Correct 20 ms 47592 KB Output is correct
29 Correct 23 ms 47556 KB Output is correct
30 Correct 23 ms 47584 KB Output is correct
31 Correct 23 ms 47448 KB Output is correct
32 Correct 23 ms 47448 KB Output is correct
33 Correct 21 ms 47452 KB Output is correct
34 Correct 30 ms 47448 KB Output is correct
35 Correct 25 ms 47448 KB Output is correct
36 Correct 19 ms 47452 KB Output is correct
37 Correct 20 ms 47452 KB Output is correct
38 Correct 22 ms 47448 KB Output is correct
39 Correct 61 ms 52832 KB Output is correct
40 Correct 63 ms 53136 KB Output is correct
41 Correct 61 ms 52820 KB Output is correct
42 Correct 69 ms 52816 KB Output is correct
43 Correct 66 ms 53080 KB Output is correct
44 Correct 67 ms 52960 KB Output is correct
45 Correct 44 ms 50364 KB Output is correct
46 Correct 44 ms 50724 KB Output is correct
47 Correct 69 ms 52812 KB Output is correct
48 Correct 65 ms 53072 KB Output is correct
49 Correct 76 ms 52812 KB Output is correct
50 Correct 66 ms 53036 KB Output is correct
51 Correct 68 ms 52052 KB Output is correct
52 Correct 72 ms 52816 KB Output is correct
53 Correct 67 ms 52564 KB Output is correct
54 Correct 75 ms 52816 KB Output is correct
55 Correct 66 ms 52308 KB Output is correct
56 Correct 55 ms 51656 KB Output is correct
57 Correct 37 ms 50120 KB Output is correct
58 Correct 41 ms 50668 KB Output is correct
59 Correct 61 ms 52564 KB Output is correct
60 Correct 62 ms 52816 KB Output is correct
61 Correct 68 ms 52868 KB Output is correct
62 Correct 71 ms 52568 KB Output is correct
63 Correct 63 ms 52820 KB Output is correct
64 Correct 82 ms 52820 KB Output is correct
65 Correct 70 ms 51140 KB Output is correct
66 Correct 61 ms 51792 KB Output is correct
67 Correct 61 ms 51284 KB Output is correct
68 Correct 66 ms 52048 KB Output is correct
69 Correct 76 ms 52852 KB Output is correct
70 Correct 83 ms 52812 KB Output is correct
71 Correct 59 ms 51800 KB Output is correct
72 Correct 68 ms 52872 KB Output is correct
73 Correct 67 ms 52304 KB Output is correct
74 Correct 84 ms 52800 KB Output is correct
75 Correct 74 ms 53076 KB Output is correct
76 Correct 57 ms 51292 KB Output is correct
77 Correct 66 ms 52060 KB Output is correct
78 Correct 70 ms 52980 KB Output is correct
79 Correct 43 ms 50896 KB Output is correct
80 Correct 45 ms 50512 KB Output is correct
81 Correct 59 ms 51784 KB Output is correct
82 Correct 54 ms 50796 KB Output is correct
83 Correct 65 ms 52048 KB Output is correct
84 Correct 64 ms 52052 KB Output is correct
85 Correct 67 ms 52816 KB Output is correct
86 Correct 74 ms 53384 KB Output is correct
87 Correct 69 ms 52756 KB Output is correct
88 Correct 78 ms 53328 KB Output is correct
89 Correct 60 ms 51280 KB Output is correct
90 Correct 71 ms 53328 KB Output is correct
91 Correct 62 ms 52204 KB Output is correct
92 Correct 70 ms 51788 KB Output is correct
93 Correct 69 ms 53332 KB Output is correct
94 Correct 71 ms 53072 KB Output is correct
95 Correct 71 ms 53076 KB Output is correct
96 Correct 69 ms 53416 KB Output is correct
97 Correct 70 ms 53328 KB Output is correct
98 Correct 62 ms 52372 KB Output is correct
99 Correct 50 ms 51512 KB Output is correct
100 Correct 53 ms 51280 KB Output is correct
101 Correct 74 ms 52308 KB Output is correct
102 Correct 71 ms 53736 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 47452 KB Output is correct
2 Correct 23 ms 47480 KB Output is correct
3 Correct 21 ms 47448 KB Output is correct
4 Correct 20 ms 47480 KB Output is correct
5 Correct 20 ms 47452 KB Output is correct
6 Correct 19 ms 47336 KB Output is correct
7 Correct 21 ms 47452 KB Output is correct
8 Correct 20 ms 47452 KB Output is correct
9 Correct 20 ms 47536 KB Output is correct
10 Correct 20 ms 47452 KB Output is correct
11 Correct 19 ms 47452 KB Output is correct
12 Correct 20 ms 47452 KB Output is correct
13 Correct 19 ms 47452 KB Output is correct
14 Correct 20 ms 47568 KB Output is correct
15 Correct 23 ms 47452 KB Output is correct
16 Correct 23 ms 47448 KB Output is correct
17 Correct 22 ms 47440 KB Output is correct
18 Correct 22 ms 47452 KB Output is correct
19 Correct 20 ms 47452 KB Output is correct
20 Correct 24 ms 47448 KB Output is correct
21 Correct 23 ms 47452 KB Output is correct
22 Correct 23 ms 47704 KB Output is correct
23 Correct 24 ms 47484 KB Output is correct
24 Correct 29 ms 47596 KB Output is correct
25 Correct 22 ms 47452 KB Output is correct
26 Correct 26 ms 47452 KB Output is correct
27 Correct 22 ms 47556 KB Output is correct
28 Correct 20 ms 47592 KB Output is correct
29 Correct 23 ms 47556 KB Output is correct
30 Correct 23 ms 47584 KB Output is correct
31 Correct 23 ms 47448 KB Output is correct
32 Correct 23 ms 47448 KB Output is correct
33 Correct 21 ms 47452 KB Output is correct
34 Correct 30 ms 47448 KB Output is correct
35 Correct 25 ms 47448 KB Output is correct
36 Correct 19 ms 47452 KB Output is correct
37 Correct 20 ms 47452 KB Output is correct
38 Correct 22 ms 47448 KB Output is correct
39 Correct 61 ms 52832 KB Output is correct
40 Correct 63 ms 53136 KB Output is correct
41 Correct 61 ms 52820 KB Output is correct
42 Correct 69 ms 52816 KB Output is correct
43 Correct 66 ms 53080 KB Output is correct
44 Correct 67 ms 52960 KB Output is correct
45 Correct 44 ms 50364 KB Output is correct
46 Correct 44 ms 50724 KB Output is correct
47 Correct 69 ms 52812 KB Output is correct
48 Correct 65 ms 53072 KB Output is correct
49 Correct 76 ms 52812 KB Output is correct
50 Correct 66 ms 53036 KB Output is correct
51 Correct 68 ms 52052 KB Output is correct
52 Correct 72 ms 52816 KB Output is correct
53 Correct 67 ms 52564 KB Output is correct
54 Correct 75 ms 52816 KB Output is correct
55 Correct 289 ms 68180 KB Output is correct
56 Correct 237 ms 64336 KB Output is correct
57 Correct 364 ms 69972 KB Output is correct
58 Correct 223 ms 64084 KB Output is correct
59 Correct 188 ms 64224 KB Output is correct
60 Correct 284 ms 70228 KB Output is correct
61 Correct 121 ms 60828 KB Output is correct
62 Correct 119 ms 61236 KB Output is correct
63 Correct 263 ms 68432 KB Output is correct
64 Correct 310 ms 68500 KB Output is correct
65 Correct 287 ms 69204 KB Output is correct
66 Correct 291 ms 69964 KB Output is correct
67 Correct 305 ms 68948 KB Output is correct
68 Correct 287 ms 69968 KB Output is correct
69 Correct 331 ms 69944 KB Output is correct
70 Correct 315 ms 69928 KB Output is correct
71 Correct 344 ms 69972 KB Output is correct
72 Correct 320 ms 69400 KB Output is correct
73 Correct 317 ms 70224 KB Output is correct
74 Correct 305 ms 69412 KB Output is correct
75 Correct 317 ms 70076 KB Output is correct
76 Correct 328 ms 69936 KB Output is correct
77 Correct 340 ms 69888 KB Output is correct
78 Correct 333 ms 69972 KB Output is correct
79 Correct 231 ms 65656 KB Output is correct
80 Correct 224 ms 65800 KB Output is correct
81 Correct 208 ms 71508 KB Output is correct
82 Correct 66 ms 52308 KB Output is correct
83 Correct 55 ms 51656 KB Output is correct
84 Correct 37 ms 50120 KB Output is correct
85 Correct 41 ms 50668 KB Output is correct
86 Correct 61 ms 52564 KB Output is correct
87 Correct 62 ms 52816 KB Output is correct
88 Correct 68 ms 52868 KB Output is correct
89 Correct 71 ms 52568 KB Output is correct
90 Correct 63 ms 52820 KB Output is correct
91 Correct 82 ms 52820 KB Output is correct
92 Correct 70 ms 51140 KB Output is correct
93 Correct 61 ms 51792 KB Output is correct
94 Correct 61 ms 51284 KB Output is correct
95 Correct 66 ms 52048 KB Output is correct
96 Correct 76 ms 52852 KB Output is correct
97 Correct 83 ms 52812 KB Output is correct
98 Correct 59 ms 51800 KB Output is correct
99 Correct 68 ms 52872 KB Output is correct
100 Correct 67 ms 52304 KB Output is correct
101 Correct 84 ms 52800 KB Output is correct
102 Correct 74 ms 53076 KB Output is correct
103 Correct 57 ms 51292 KB Output is correct
104 Correct 66 ms 52060 KB Output is correct
105 Correct 70 ms 52980 KB Output is correct
106 Correct 43 ms 50896 KB Output is correct
107 Correct 45 ms 50512 KB Output is correct
108 Correct 59 ms 51784 KB Output is correct
109 Correct 54 ms 50796 KB Output is correct
110 Correct 65 ms 52048 KB Output is correct
111 Correct 64 ms 52052 KB Output is correct
112 Correct 67 ms 52816 KB Output is correct
113 Correct 74 ms 53384 KB Output is correct
114 Correct 69 ms 52756 KB Output is correct
115 Correct 78 ms 53328 KB Output is correct
116 Correct 60 ms 51280 KB Output is correct
117 Correct 71 ms 53328 KB Output is correct
118 Correct 62 ms 52204 KB Output is correct
119 Correct 70 ms 51788 KB Output is correct
120 Correct 69 ms 53332 KB Output is correct
121 Correct 71 ms 53072 KB Output is correct
122 Correct 71 ms 53076 KB Output is correct
123 Correct 69 ms 53416 KB Output is correct
124 Correct 70 ms 53328 KB Output is correct
125 Correct 62 ms 52372 KB Output is correct
126 Correct 50 ms 51512 KB Output is correct
127 Correct 53 ms 51280 KB Output is correct
128 Correct 74 ms 52308 KB Output is correct
129 Correct 71 ms 53736 KB Output is correct
130 Correct 320 ms 70740 KB Output is correct
131 Correct 248 ms 64404 KB Output is correct
132 Correct 351 ms 70588 KB Output is correct
133 Correct 313 ms 69924 KB Output is correct
134 Correct 331 ms 67408 KB Output is correct
135 Correct 320 ms 70972 KB Output is correct
136 Correct 307 ms 69460 KB Output is correct
137 Correct 303 ms 69268 KB Output is correct
138 Correct 263 ms 69712 KB Output is correct
139 Correct 269 ms 70736 KB Output is correct
140 Correct 267 ms 69600 KB Output is correct
141 Correct 309 ms 70512 KB Output is correct
142 Correct 343 ms 70620 KB Output is correct
143 Correct 323 ms 70480 KB Output is correct
144 Correct 281 ms 70032 KB Output is correct
145 Correct 293 ms 70668 KB Output is correct
146 Correct 277 ms 70308 KB Output is correct
147 Correct 296 ms 70608 KB Output is correct
148 Correct 300 ms 70508 KB Output is correct
149 Correct 302 ms 70480 KB Output is correct
150 Correct 168 ms 64028 KB Output is correct
151 Correct 265 ms 66640 KB Output is correct
152 Correct 283 ms 66408 KB Output is correct
153 Correct 217 ms 72528 KB Output is correct