답안 #1065618

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1065618 2024-08-19T10:02:30 Z phoenix 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
654 ms 74580 KB
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

const int N = (1 << 18);

#define cerr if (false) cout

struct node {
    ll sum = 0;
    ll pre = 0;
};
node tr[2 * N];

node combine(node a, node b) {
    node res;
    res.sum = a.sum + b.sum;
    res.pre = min(a.pre, a.sum + b.pre);
    return res;
}

void update(int pos, ll val) {
    // cerr << "upd: " << pos << ' ' << val << '\n';
    tr[pos += N] = {val, min(0ll, val)};
    for (pos >>= 1; pos; pos >>= 1) 
        tr[pos] = combine(tr[2 * pos], tr[2 * pos + 1]);
    // cerr << "tree: " << tr[1].sum << ' ' << tr[1].pre << '\n';
}
node get(int ql, int qr, int l = 0, int r = N - 1, int v = 1) {
    if (r < ql || l > qr)
        return node();
    if (ql <= l && r <= qr) 
        return tr[v];
    int m = (l + r) / 2;
    return combine(get(ql, qr, l, m, 2 * v), get(ql, qr, m + 1, r, 2 * v + 1)); 
}

ll cnt[2 * N];
void add(int v, ll a) {
    for (cnt[v += N] += a; v > 1; v >>= 1)
        cnt[v >> 1] = cnt[v] + cnt[v^1];
}
ll count(int ql, int qr, int l = 0, int r = N - 1, int v = 1) {
    if (r < ql || l > qr)   
        return 0;
    if (ql <= l && r <= qr)
        return cnt[v];
    int m = (l + r) / 2;
    return count(ql, qr, l, m, 2 * v) + count(ql, qr, m + 1, r, 2 * v + 1);
}

int n, m, q;

vector<pair<ll, ll>> join[N][2];
vector<pair<ll, ll>> leave[N][2];
vector<pair<ll, ll>> service[N];  

map<ll, ll> timeToGroup;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin >> n >> m >> q;
    for (int t = 1; t <= q; t++) {
        int type;
        cin >> type;
        if (type == 1) {
            ll l, r, k, c;
            cin >> l >> r >> c >> k;
            timeToGroup[t] = c;
            join[l][0].push_back({t, k});
            join[r][1].push_back({t, k});
        }
        if (type == 2) {
            ll l, r, k;
            cin >> l >> r >> k;
            leave[l][0].push_back({t, k});
            leave[r][1].push_back({t, k});
        }
        if (type == 3) {
            ll a, b;
            cin >> a >> b;
            service[a].push_back({t, b});
        }
    }
    
    vector<int> res(q + 1, -2);

    for (int i = 1; i <= n; i++) {
        for (auto o : join[i][0]) {
            int t = o.first, k = o.second;
            update(t, +k);
            add(t, +k);
        }
        for (auto o : leave[i][0]) {
            int t = o.first, k = o.second;
            update(t, -k);
        }
        for (auto [t, b] : service[i]) {
            ll num = get(1, t).sum - get(1, t).pre;
            if (num < b) {
                res[t] = 0;
                continue;
            }
            int l = 0, r = t + 1;
            while (r - l > 1) {
                int m = (l + r) / 2;
                if (count(m, t) >= num - b + 1)
                    l = m;
                else 
                    r = m;
            }
            res[t] = timeToGroup[l];
        }
        for (auto o : join[i][1]) {
            int t = o.first, k = o.second;
            update(t, 0);
            add(t, -k);
        }
        for (auto o : leave[i][1]) {
            int t = o.first, k = o.second;
            update(t, 0);
        }
    }
    for (int i = 1; i <= q; i++) {
        if (res[i] != -2)
            cout << res[i] << '\n';
    }
}

Compilation message

foodcourt.cpp: In function 'int main()':
foodcourt.cpp:122:30: warning: unused variable 'k' [-Wunused-variable]
  122 |             int t = o.first, k = o.second;
      |                              ^
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 31320 KB Output is correct
2 Correct 16 ms 31580 KB Output is correct
3 Correct 15 ms 31308 KB Output is correct
4 Correct 16 ms 31580 KB Output is correct
5 Correct 14 ms 31324 KB Output is correct
6 Correct 14 ms 31324 KB Output is correct
7 Correct 15 ms 31520 KB Output is correct
8 Correct 15 ms 31372 KB Output is correct
9 Correct 17 ms 31588 KB Output is correct
10 Correct 15 ms 31576 KB Output is correct
11 Correct 15 ms 31580 KB Output is correct
12 Correct 14 ms 31600 KB Output is correct
13 Correct 14 ms 31320 KB Output is correct
14 Correct 15 ms 31320 KB Output is correct
15 Correct 13 ms 31324 KB Output is correct
16 Correct 13 ms 31580 KB Output is correct
17 Correct 13 ms 31324 KB Output is correct
18 Correct 13 ms 31592 KB Output is correct
19 Correct 13 ms 31576 KB Output is correct
20 Correct 13 ms 31576 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 31320 KB Output is correct
2 Correct 16 ms 31580 KB Output is correct
3 Correct 15 ms 31308 KB Output is correct
4 Correct 16 ms 31580 KB Output is correct
5 Correct 14 ms 31324 KB Output is correct
6 Correct 14 ms 31324 KB Output is correct
7 Correct 15 ms 31520 KB Output is correct
8 Correct 15 ms 31372 KB Output is correct
9 Correct 17 ms 31588 KB Output is correct
10 Correct 15 ms 31576 KB Output is correct
11 Correct 15 ms 31580 KB Output is correct
12 Correct 14 ms 31600 KB Output is correct
13 Correct 14 ms 31320 KB Output is correct
14 Correct 15 ms 31320 KB Output is correct
15 Correct 13 ms 31324 KB Output is correct
16 Correct 13 ms 31580 KB Output is correct
17 Correct 13 ms 31324 KB Output is correct
18 Correct 13 ms 31592 KB Output is correct
19 Correct 13 ms 31576 KB Output is correct
20 Correct 13 ms 31576 KB Output is correct
21 Correct 16 ms 31580 KB Output is correct
22 Correct 24 ms 31576 KB Output is correct
23 Correct 13 ms 31580 KB Output is correct
24 Correct 24 ms 31408 KB Output is correct
25 Correct 14 ms 31580 KB Output is correct
26 Correct 18 ms 31580 KB Output is correct
27 Correct 14 ms 31580 KB Output is correct
28 Correct 15 ms 31580 KB Output is correct
29 Correct 15 ms 31580 KB Output is correct
30 Correct 16 ms 31580 KB Output is correct
31 Correct 17 ms 31740 KB Output is correct
32 Correct 16 ms 31624 KB Output is correct
33 Correct 19 ms 31508 KB Output is correct
34 Correct 19 ms 31576 KB Output is correct
35 Correct 14 ms 31484 KB Output is correct
36 Correct 16 ms 31388 KB Output is correct
37 Correct 13 ms 31580 KB Output is correct
38 Correct 14 ms 31608 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 70 ms 38976 KB Output is correct
2 Correct 81 ms 39760 KB Output is correct
3 Correct 80 ms 39128 KB Output is correct
4 Correct 88 ms 39080 KB Output is correct
5 Correct 99 ms 39748 KB Output is correct
6 Correct 62 ms 39780 KB Output is correct
7 Correct 55 ms 37184 KB Output is correct
8 Correct 61 ms 37436 KB Output is correct
9 Correct 68 ms 38952 KB Output is correct
10 Correct 98 ms 39252 KB Output is correct
11 Correct 61 ms 39260 KB Output is correct
12 Correct 63 ms 39252 KB Output is correct
13 Correct 77 ms 38996 KB Output is correct
14 Correct 70 ms 39760 KB Output is correct
15 Correct 65 ms 41044 KB Output is correct
16 Correct 76 ms 41296 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 497 ms 64084 KB Output is correct
2 Correct 374 ms 57524 KB Output is correct
3 Correct 590 ms 67136 KB Output is correct
4 Correct 338 ms 59652 KB Output is correct
5 Correct 324 ms 60116 KB Output is correct
6 Correct 494 ms 70312 KB Output is correct
7 Correct 312 ms 60044 KB Output is correct
8 Correct 312 ms 59924 KB Output is correct
9 Correct 647 ms 68204 KB Output is correct
10 Correct 654 ms 68228 KB Output is correct
11 Correct 459 ms 66340 KB Output is correct
12 Correct 479 ms 68260 KB Output is correct
13 Correct 443 ms 66620 KB Output is correct
14 Correct 479 ms 68220 KB Output is correct
15 Correct 563 ms 68128 KB Output is correct
16 Correct 453 ms 68180 KB Output is correct
17 Correct 492 ms 68264 KB Output is correct
18 Correct 495 ms 67248 KB Output is correct
19 Correct 473 ms 68180 KB Output is correct
20 Correct 520 ms 67408 KB Output is correct
21 Correct 546 ms 68068 KB Output is correct
22 Correct 466 ms 68176 KB Output is correct
23 Correct 500 ms 68188 KB Output is correct
24 Correct 525 ms 68176 KB Output is correct
25 Correct 429 ms 65172 KB Output is correct
26 Correct 467 ms 65960 KB Output is correct
27 Correct 370 ms 73644 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 31320 KB Output is correct
2 Correct 16 ms 31580 KB Output is correct
3 Correct 15 ms 31308 KB Output is correct
4 Correct 16 ms 31580 KB Output is correct
5 Correct 14 ms 31324 KB Output is correct
6 Correct 14 ms 31324 KB Output is correct
7 Correct 15 ms 31520 KB Output is correct
8 Correct 15 ms 31372 KB Output is correct
9 Correct 17 ms 31588 KB Output is correct
10 Correct 15 ms 31576 KB Output is correct
11 Correct 15 ms 31580 KB Output is correct
12 Correct 14 ms 31600 KB Output is correct
13 Correct 14 ms 31320 KB Output is correct
14 Correct 15 ms 31320 KB Output is correct
15 Correct 13 ms 31324 KB Output is correct
16 Correct 13 ms 31580 KB Output is correct
17 Correct 13 ms 31324 KB Output is correct
18 Correct 13 ms 31592 KB Output is correct
19 Correct 13 ms 31576 KB Output is correct
20 Correct 13 ms 31576 KB Output is correct
21 Correct 70 ms 38976 KB Output is correct
22 Correct 81 ms 39760 KB Output is correct
23 Correct 80 ms 39128 KB Output is correct
24 Correct 88 ms 39080 KB Output is correct
25 Correct 99 ms 39748 KB Output is correct
26 Correct 62 ms 39780 KB Output is correct
27 Correct 55 ms 37184 KB Output is correct
28 Correct 61 ms 37436 KB Output is correct
29 Correct 68 ms 38952 KB Output is correct
30 Correct 98 ms 39252 KB Output is correct
31 Correct 61 ms 39260 KB Output is correct
32 Correct 63 ms 39252 KB Output is correct
33 Correct 77 ms 38996 KB Output is correct
34 Correct 70 ms 39760 KB Output is correct
35 Correct 65 ms 41044 KB Output is correct
36 Correct 76 ms 41296 KB Output is correct
37 Correct 108 ms 38228 KB Output is correct
38 Correct 83 ms 37968 KB Output is correct
39 Correct 55 ms 36784 KB Output is correct
40 Correct 64 ms 37812 KB Output is correct
41 Correct 115 ms 38844 KB Output is correct
42 Correct 96 ms 39360 KB Output is correct
43 Correct 93 ms 39252 KB Output is correct
44 Correct 93 ms 39000 KB Output is correct
45 Correct 97 ms 39256 KB Output is correct
46 Correct 99 ms 39248 KB Output is correct
47 Correct 91 ms 37996 KB Output is correct
48 Correct 97 ms 38848 KB Output is correct
49 Correct 67 ms 36948 KB Output is correct
50 Correct 78 ms 38308 KB Output is correct
51 Correct 92 ms 39540 KB Output is correct
52 Correct 104 ms 39556 KB Output is correct
53 Correct 62 ms 39008 KB Output is correct
54 Correct 70 ms 41184 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 132 ms 39960 KB Output is correct
2 Correct 139 ms 40788 KB Output is correct
3 Correct 134 ms 41040 KB Output is correct
4 Correct 98 ms 38224 KB Output is correct
5 Correct 138 ms 39664 KB Output is correct
6 Correct 149 ms 41004 KB Output is correct
7 Correct 96 ms 38596 KB Output is correct
8 Correct 88 ms 38136 KB Output is correct
9 Correct 125 ms 40168 KB Output is correct
10 Correct 84 ms 37968 KB Output is correct
11 Correct 128 ms 40532 KB Output is correct
12 Correct 122 ms 40528 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 31320 KB Output is correct
2 Correct 16 ms 31580 KB Output is correct
3 Correct 15 ms 31308 KB Output is correct
4 Correct 16 ms 31580 KB Output is correct
5 Correct 14 ms 31324 KB Output is correct
6 Correct 14 ms 31324 KB Output is correct
7 Correct 15 ms 31520 KB Output is correct
8 Correct 15 ms 31372 KB Output is correct
9 Correct 17 ms 31588 KB Output is correct
10 Correct 15 ms 31576 KB Output is correct
11 Correct 15 ms 31580 KB Output is correct
12 Correct 14 ms 31600 KB Output is correct
13 Correct 14 ms 31320 KB Output is correct
14 Correct 15 ms 31320 KB Output is correct
15 Correct 13 ms 31324 KB Output is correct
16 Correct 13 ms 31580 KB Output is correct
17 Correct 13 ms 31324 KB Output is correct
18 Correct 13 ms 31592 KB Output is correct
19 Correct 13 ms 31576 KB Output is correct
20 Correct 13 ms 31576 KB Output is correct
21 Correct 16 ms 31580 KB Output is correct
22 Correct 24 ms 31576 KB Output is correct
23 Correct 13 ms 31580 KB Output is correct
24 Correct 24 ms 31408 KB Output is correct
25 Correct 14 ms 31580 KB Output is correct
26 Correct 18 ms 31580 KB Output is correct
27 Correct 14 ms 31580 KB Output is correct
28 Correct 15 ms 31580 KB Output is correct
29 Correct 15 ms 31580 KB Output is correct
30 Correct 16 ms 31580 KB Output is correct
31 Correct 17 ms 31740 KB Output is correct
32 Correct 16 ms 31624 KB Output is correct
33 Correct 19 ms 31508 KB Output is correct
34 Correct 19 ms 31576 KB Output is correct
35 Correct 14 ms 31484 KB Output is correct
36 Correct 16 ms 31388 KB Output is correct
37 Correct 13 ms 31580 KB Output is correct
38 Correct 14 ms 31608 KB Output is correct
39 Correct 70 ms 38976 KB Output is correct
40 Correct 81 ms 39760 KB Output is correct
41 Correct 80 ms 39128 KB Output is correct
42 Correct 88 ms 39080 KB Output is correct
43 Correct 99 ms 39748 KB Output is correct
44 Correct 62 ms 39780 KB Output is correct
45 Correct 55 ms 37184 KB Output is correct
46 Correct 61 ms 37436 KB Output is correct
47 Correct 68 ms 38952 KB Output is correct
48 Correct 98 ms 39252 KB Output is correct
49 Correct 61 ms 39260 KB Output is correct
50 Correct 63 ms 39252 KB Output is correct
51 Correct 77 ms 38996 KB Output is correct
52 Correct 70 ms 39760 KB Output is correct
53 Correct 65 ms 41044 KB Output is correct
54 Correct 76 ms 41296 KB Output is correct
55 Correct 108 ms 38228 KB Output is correct
56 Correct 83 ms 37968 KB Output is correct
57 Correct 55 ms 36784 KB Output is correct
58 Correct 64 ms 37812 KB Output is correct
59 Correct 115 ms 38844 KB Output is correct
60 Correct 96 ms 39360 KB Output is correct
61 Correct 93 ms 39252 KB Output is correct
62 Correct 93 ms 39000 KB Output is correct
63 Correct 97 ms 39256 KB Output is correct
64 Correct 99 ms 39248 KB Output is correct
65 Correct 91 ms 37996 KB Output is correct
66 Correct 97 ms 38848 KB Output is correct
67 Correct 67 ms 36948 KB Output is correct
68 Correct 78 ms 38308 KB Output is correct
69 Correct 92 ms 39540 KB Output is correct
70 Correct 104 ms 39556 KB Output is correct
71 Correct 62 ms 39008 KB Output is correct
72 Correct 70 ms 41184 KB Output is correct
73 Correct 132 ms 39960 KB Output is correct
74 Correct 139 ms 40788 KB Output is correct
75 Correct 134 ms 41040 KB Output is correct
76 Correct 98 ms 38224 KB Output is correct
77 Correct 138 ms 39664 KB Output is correct
78 Correct 149 ms 41004 KB Output is correct
79 Correct 96 ms 38596 KB Output is correct
80 Correct 88 ms 38136 KB Output is correct
81 Correct 125 ms 40168 KB Output is correct
82 Correct 84 ms 37968 KB Output is correct
83 Correct 128 ms 40532 KB Output is correct
84 Correct 122 ms 40528 KB Output is correct
85 Correct 98 ms 39848 KB Output is correct
86 Correct 140 ms 40680 KB Output is correct
87 Correct 85 ms 40276 KB Output is correct
88 Correct 107 ms 41552 KB Output is correct
89 Correct 65 ms 37488 KB Output is correct
90 Correct 93 ms 40912 KB Output is correct
91 Correct 85 ms 39252 KB Output is correct
92 Correct 82 ms 38736 KB Output is correct
93 Correct 94 ms 40788 KB Output is correct
94 Correct 98 ms 40700 KB Output is correct
95 Correct 92 ms 40720 KB Output is correct
96 Correct 98 ms 40900 KB Output is correct
97 Correct 96 ms 40788 KB Output is correct
98 Correct 80 ms 39356 KB Output is correct
99 Correct 87 ms 39416 KB Output is correct
100 Correct 85 ms 38740 KB Output is correct
101 Correct 106 ms 40320 KB Output is correct
102 Correct 80 ms 42400 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 31320 KB Output is correct
2 Correct 16 ms 31580 KB Output is correct
3 Correct 15 ms 31308 KB Output is correct
4 Correct 16 ms 31580 KB Output is correct
5 Correct 14 ms 31324 KB Output is correct
6 Correct 14 ms 31324 KB Output is correct
7 Correct 15 ms 31520 KB Output is correct
8 Correct 15 ms 31372 KB Output is correct
9 Correct 17 ms 31588 KB Output is correct
10 Correct 15 ms 31576 KB Output is correct
11 Correct 15 ms 31580 KB Output is correct
12 Correct 14 ms 31600 KB Output is correct
13 Correct 14 ms 31320 KB Output is correct
14 Correct 15 ms 31320 KB Output is correct
15 Correct 13 ms 31324 KB Output is correct
16 Correct 13 ms 31580 KB Output is correct
17 Correct 13 ms 31324 KB Output is correct
18 Correct 13 ms 31592 KB Output is correct
19 Correct 13 ms 31576 KB Output is correct
20 Correct 13 ms 31576 KB Output is correct
21 Correct 16 ms 31580 KB Output is correct
22 Correct 24 ms 31576 KB Output is correct
23 Correct 13 ms 31580 KB Output is correct
24 Correct 24 ms 31408 KB Output is correct
25 Correct 14 ms 31580 KB Output is correct
26 Correct 18 ms 31580 KB Output is correct
27 Correct 14 ms 31580 KB Output is correct
28 Correct 15 ms 31580 KB Output is correct
29 Correct 15 ms 31580 KB Output is correct
30 Correct 16 ms 31580 KB Output is correct
31 Correct 17 ms 31740 KB Output is correct
32 Correct 16 ms 31624 KB Output is correct
33 Correct 19 ms 31508 KB Output is correct
34 Correct 19 ms 31576 KB Output is correct
35 Correct 14 ms 31484 KB Output is correct
36 Correct 16 ms 31388 KB Output is correct
37 Correct 13 ms 31580 KB Output is correct
38 Correct 14 ms 31608 KB Output is correct
39 Correct 70 ms 38976 KB Output is correct
40 Correct 81 ms 39760 KB Output is correct
41 Correct 80 ms 39128 KB Output is correct
42 Correct 88 ms 39080 KB Output is correct
43 Correct 99 ms 39748 KB Output is correct
44 Correct 62 ms 39780 KB Output is correct
45 Correct 55 ms 37184 KB Output is correct
46 Correct 61 ms 37436 KB Output is correct
47 Correct 68 ms 38952 KB Output is correct
48 Correct 98 ms 39252 KB Output is correct
49 Correct 61 ms 39260 KB Output is correct
50 Correct 63 ms 39252 KB Output is correct
51 Correct 77 ms 38996 KB Output is correct
52 Correct 70 ms 39760 KB Output is correct
53 Correct 65 ms 41044 KB Output is correct
54 Correct 76 ms 41296 KB Output is correct
55 Correct 497 ms 64084 KB Output is correct
56 Correct 374 ms 57524 KB Output is correct
57 Correct 590 ms 67136 KB Output is correct
58 Correct 338 ms 59652 KB Output is correct
59 Correct 324 ms 60116 KB Output is correct
60 Correct 494 ms 70312 KB Output is correct
61 Correct 312 ms 60044 KB Output is correct
62 Correct 312 ms 59924 KB Output is correct
63 Correct 647 ms 68204 KB Output is correct
64 Correct 654 ms 68228 KB Output is correct
65 Correct 459 ms 66340 KB Output is correct
66 Correct 479 ms 68260 KB Output is correct
67 Correct 443 ms 66620 KB Output is correct
68 Correct 479 ms 68220 KB Output is correct
69 Correct 563 ms 68128 KB Output is correct
70 Correct 453 ms 68180 KB Output is correct
71 Correct 492 ms 68264 KB Output is correct
72 Correct 495 ms 67248 KB Output is correct
73 Correct 473 ms 68180 KB Output is correct
74 Correct 520 ms 67408 KB Output is correct
75 Correct 546 ms 68068 KB Output is correct
76 Correct 466 ms 68176 KB Output is correct
77 Correct 500 ms 68188 KB Output is correct
78 Correct 525 ms 68176 KB Output is correct
79 Correct 429 ms 65172 KB Output is correct
80 Correct 467 ms 65960 KB Output is correct
81 Correct 370 ms 73644 KB Output is correct
82 Correct 108 ms 38228 KB Output is correct
83 Correct 83 ms 37968 KB Output is correct
84 Correct 55 ms 36784 KB Output is correct
85 Correct 64 ms 37812 KB Output is correct
86 Correct 115 ms 38844 KB Output is correct
87 Correct 96 ms 39360 KB Output is correct
88 Correct 93 ms 39252 KB Output is correct
89 Correct 93 ms 39000 KB Output is correct
90 Correct 97 ms 39256 KB Output is correct
91 Correct 99 ms 39248 KB Output is correct
92 Correct 91 ms 37996 KB Output is correct
93 Correct 97 ms 38848 KB Output is correct
94 Correct 67 ms 36948 KB Output is correct
95 Correct 78 ms 38308 KB Output is correct
96 Correct 92 ms 39540 KB Output is correct
97 Correct 104 ms 39556 KB Output is correct
98 Correct 62 ms 39008 KB Output is correct
99 Correct 70 ms 41184 KB Output is correct
100 Correct 132 ms 39960 KB Output is correct
101 Correct 139 ms 40788 KB Output is correct
102 Correct 134 ms 41040 KB Output is correct
103 Correct 98 ms 38224 KB Output is correct
104 Correct 138 ms 39664 KB Output is correct
105 Correct 149 ms 41004 KB Output is correct
106 Correct 96 ms 38596 KB Output is correct
107 Correct 88 ms 38136 KB Output is correct
108 Correct 125 ms 40168 KB Output is correct
109 Correct 84 ms 37968 KB Output is correct
110 Correct 128 ms 40532 KB Output is correct
111 Correct 122 ms 40528 KB Output is correct
112 Correct 98 ms 39848 KB Output is correct
113 Correct 140 ms 40680 KB Output is correct
114 Correct 85 ms 40276 KB Output is correct
115 Correct 107 ms 41552 KB Output is correct
116 Correct 65 ms 37488 KB Output is correct
117 Correct 93 ms 40912 KB Output is correct
118 Correct 85 ms 39252 KB Output is correct
119 Correct 82 ms 38736 KB Output is correct
120 Correct 94 ms 40788 KB Output is correct
121 Correct 98 ms 40700 KB Output is correct
122 Correct 92 ms 40720 KB Output is correct
123 Correct 98 ms 40900 KB Output is correct
124 Correct 96 ms 40788 KB Output is correct
125 Correct 80 ms 39356 KB Output is correct
126 Correct 87 ms 39416 KB Output is correct
127 Correct 85 ms 38740 KB Output is correct
128 Correct 106 ms 40320 KB Output is correct
129 Correct 80 ms 42400 KB Output is correct
130 Correct 525 ms 67640 KB Output is correct
131 Correct 359 ms 57924 KB Output is correct
132 Correct 527 ms 67772 KB Output is correct
133 Correct 429 ms 69356 KB Output is correct
134 Correct 430 ms 65216 KB Output is correct
135 Correct 511 ms 71116 KB Output is correct
136 Correct 630 ms 69260 KB Output is correct
137 Correct 631 ms 69276 KB Output is correct
138 Correct 513 ms 66940 KB Output is correct
139 Correct 494 ms 68932 KB Output is correct
140 Correct 448 ms 67580 KB Output is correct
141 Correct 487 ms 68948 KB Output is correct
142 Correct 438 ms 68700 KB Output is correct
143 Correct 432 ms 68692 KB Output is correct
144 Correct 467 ms 67920 KB Output is correct
145 Correct 410 ms 68692 KB Output is correct
146 Correct 434 ms 68176 KB Output is correct
147 Correct 424 ms 68672 KB Output is correct
148 Correct 430 ms 68688 KB Output is correct
149 Correct 410 ms 68668 KB Output is correct
150 Correct 361 ms 62860 KB Output is correct
151 Correct 385 ms 66388 KB Output is correct
152 Correct 436 ms 66492 KB Output is correct
153 Correct 352 ms 74580 KB Output is correct