답안 #878635

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
878635 2023-11-25T02:46:38 Z thangdz2k7 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
441 ms 62804 KB
#include <bits/stdc++.h>
#define ll pair <long long, long long>
#define ii pair <int, long long>
#define F first
#define S second
#define pb push_back
#define ill long long

using namespace std;

const int N = 2e5 + 5e4 + 5;

int n, m, q, group[N], ans[N];
vector <ii> event[N], numadd[N], query[N];

long long cur[4 * N], Min[4 * N];

void update_cur(int s, int l, int r, int u, ill val){
    if (l == r){
        cur[s] += val;
        Min[s] = min(0ll, cur[s]);
        return;
    }

    int mid = l + r >> 1;
    if (mid >= u) update_cur(2 * s, l, mid, u, val);
    else update_cur(2 * s + 1, mid + 1, r, u, val);

    cur[s] = cur[2 * s] + cur[2 * s + 1];
    Min[s] = min(Min[2 * s], cur[2 * s] + Min[2 * s + 1]);
}

ll get_cur(int s, int l, int r, int u){
    if (l > u) return ll(0, 0);
    if (r <= u) return ll(cur[s], Min[s]);

    int mid = l + r >> 1;
    ll A = get_cur(2 * s, l, mid, u);
    ll B = get_cur(2 * s + 1, mid + 1, r, u);

    return ll(A.F + B.F, min(A.S, A.F + B.S));
}

long long sumadd[4 * N];

void update_sumadd(int s, int l, int r, int u, ill val){
    if (l == r){
        sumadd[s] += val;
        return;
    }

    int mid = l + r >> 1;
    if (mid >= u) update_sumadd(2 * s, l, mid, u, val);
    else update_sumadd(2 * s + 1, mid + 1, r, u, val);
    sumadd[s] = sumadd[2 * s] + sumadd[2 * s + 1];
}

long long get_sumadd(int s, int l, int r, int u){
    if (l > u) return 0;
    if (r <= u) return sumadd[s];

    int mid = l + r >> 1;
    return get_sumadd(2 * s, l, mid, u) + get_sumadd(2 * s + 1, mid + 1, r, u);
}

int get_pos(int s, int l, int r, long long val){
    if (l == r) return l;
    int mid = l + r >> 1;
    if (sumadd[2 * s] < val) return get_pos(2 * s + 1, mid + 1, r, val - sumadd[2 * s]);
    return get_pos(2 * s, l, mid, val);
}

void solve(){
    cin >> n >> m >> q;
    for (int i = 1; i <= q; ++ i){
        ans[i] = -1;
        int t; cin >> t;
        if (t == 1){
            int l, r, k; cin >> l >> r >> group[i] >> k;
            event[l].pb(ii(i, k));
            event[r + 1].pb(ii(i, -k));
            numadd[l].pb(ii(i, k));
            numadd[r + 1].pb(ii(i, -k));
        }
        if (t == 2){
            int l, r, k; cin >> l >> r >> k;
            event[l].pb(ii(i, -k));
            event[r + 1].pb(ii(i, k));
        }
        if (t == 3){
            int a;
            ill b; cin >> a >> b;
            query[a].pb(ii(i, b));
        }
    }

    for (int i = 1; i <= n; ++ i){
        for (ii v : event[i]) {
            update_cur(1, 1, q, v.F, v.S);
            //cout << i << ' ' << v.F << ' ' << v.S << endl;
        }
        for (ii v : numadd[i]) update_sumadd(1, 1, q, v.F, v.S);
        for (ii v : query[i]){
            ll gnum_cur = get_cur(1, 1, q, v.F);
            long long num_cur = gnum_cur.F - gnum_cur.S;
            //cout << gnum_cur.F << ' ' << gnum_cur.S << endl;
            long long num_add = get_sumadd(1, 1, q, v.F);
            if (num_cur < v.S) ans[v.F] = 0;
            else ans[v.F] = group[get_pos(1, 1, q, num_add - num_cur + v.S)];
        }
    }

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

signed main(){
    //freopen("foodcourt.inp", "r", stdin);
    //freopen("foodcourt.out", "w", stdout);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    solve();

    return 0;
}

Compilation message

foodcourt.cpp: In function 'void update_cur(int, int, int, int, long long int)':
foodcourt.cpp:25:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   25 |     int mid = l + r >> 1;
      |               ~~^~~
foodcourt.cpp: In function 'std::pair<long long int, long long int> get_cur(int, int, int, int)':
foodcourt.cpp:37:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   37 |     int mid = l + r >> 1;
      |               ~~^~~
foodcourt.cpp: In function 'void update_sumadd(int, int, int, int, long long int)':
foodcourt.cpp:52:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   52 |     int mid = l + r >> 1;
      |               ~~^~~
foodcourt.cpp: In function 'long long int get_sumadd(int, int, int, int)':
foodcourt.cpp:62:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   62 |     int mid = l + r >> 1;
      |               ~~^~~
foodcourt.cpp: In function 'int get_pos(int, int, int, long long int)':
foodcourt.cpp:68:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   68 |     int mid = l + r >> 1;
      |               ~~^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 21080 KB Output is correct
2 Correct 6 ms 21084 KB Output is correct
3 Correct 5 ms 21084 KB Output is correct
4 Correct 5 ms 21084 KB Output is correct
5 Correct 5 ms 21084 KB Output is correct
6 Correct 5 ms 21084 KB Output is correct
7 Correct 5 ms 21084 KB Output is correct
8 Correct 5 ms 21084 KB Output is correct
9 Correct 6 ms 21156 KB Output is correct
10 Correct 6 ms 21084 KB Output is correct
11 Correct 7 ms 21084 KB Output is correct
12 Correct 6 ms 21084 KB Output is correct
13 Correct 5 ms 21084 KB Output is correct
14 Correct 5 ms 21084 KB Output is correct
15 Correct 5 ms 21084 KB Output is correct
16 Correct 5 ms 21084 KB Output is correct
17 Correct 5 ms 21080 KB Output is correct
18 Correct 5 ms 21080 KB Output is correct
19 Correct 5 ms 21084 KB Output is correct
20 Correct 5 ms 21084 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 21080 KB Output is correct
2 Correct 6 ms 21084 KB Output is correct
3 Correct 5 ms 21084 KB Output is correct
4 Correct 5 ms 21084 KB Output is correct
5 Correct 5 ms 21084 KB Output is correct
6 Correct 5 ms 21084 KB Output is correct
7 Correct 5 ms 21084 KB Output is correct
8 Correct 5 ms 21084 KB Output is correct
9 Correct 6 ms 21156 KB Output is correct
10 Correct 6 ms 21084 KB Output is correct
11 Correct 7 ms 21084 KB Output is correct
12 Correct 6 ms 21084 KB Output is correct
13 Correct 5 ms 21084 KB Output is correct
14 Correct 5 ms 21084 KB Output is correct
15 Correct 5 ms 21084 KB Output is correct
16 Correct 5 ms 21084 KB Output is correct
17 Correct 5 ms 21080 KB Output is correct
18 Correct 5 ms 21080 KB Output is correct
19 Correct 5 ms 21084 KB Output is correct
20 Correct 5 ms 21084 KB Output is correct
21 Correct 7 ms 21084 KB Output is correct
22 Correct 5 ms 21084 KB Output is correct
23 Correct 5 ms 21084 KB Output is correct
24 Correct 7 ms 21244 KB Output is correct
25 Correct 5 ms 21084 KB Output is correct
26 Correct 5 ms 21084 KB Output is correct
27 Correct 5 ms 21080 KB Output is correct
28 Correct 6 ms 21180 KB Output is correct
29 Correct 5 ms 21080 KB Output is correct
30 Correct 5 ms 21080 KB Output is correct
31 Correct 5 ms 21084 KB Output is correct
32 Correct 5 ms 21252 KB Output is correct
33 Correct 7 ms 21084 KB Output is correct
34 Correct 5 ms 21096 KB Output is correct
35 Correct 6 ms 21088 KB Output is correct
36 Correct 5 ms 21080 KB Output is correct
37 Correct 5 ms 21084 KB Output is correct
38 Correct 6 ms 21092 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 54 ms 30752 KB Output is correct
2 Correct 64 ms 31332 KB Output is correct
3 Correct 57 ms 30544 KB Output is correct
4 Correct 54 ms 30736 KB Output is correct
5 Correct 58 ms 31328 KB Output is correct
6 Correct 64 ms 31384 KB Output is correct
7 Correct 28 ms 29088 KB Output is correct
8 Correct 30 ms 29360 KB Output is correct
9 Correct 55 ms 30876 KB Output is correct
10 Correct 62 ms 30800 KB Output is correct
11 Correct 56 ms 30960 KB Output is correct
12 Correct 79 ms 30800 KB Output is correct
13 Correct 55 ms 31832 KB Output is correct
14 Correct 62 ms 31384 KB Output is correct
15 Correct 66 ms 32340 KB Output is correct
16 Correct 93 ms 32564 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 298 ms 50768 KB Output is correct
2 Correct 253 ms 51528 KB Output is correct
3 Correct 336 ms 57988 KB Output is correct
4 Correct 297 ms 53872 KB Output is correct
5 Correct 247 ms 53584 KB Output is correct
6 Correct 419 ms 60240 KB Output is correct
7 Correct 117 ms 52456 KB Output is correct
8 Correct 153 ms 51896 KB Output is correct
9 Correct 362 ms 58760 KB Output is correct
10 Correct 377 ms 58964 KB Output is correct
11 Correct 355 ms 58132 KB Output is correct
12 Correct 379 ms 58452 KB Output is correct
13 Correct 352 ms 58100 KB Output is correct
14 Correct 325 ms 58672 KB Output is correct
15 Correct 337 ms 59032 KB Output is correct
16 Correct 375 ms 58440 KB Output is correct
17 Correct 360 ms 58560 KB Output is correct
18 Correct 392 ms 58284 KB Output is correct
19 Correct 355 ms 58672 KB Output is correct
20 Correct 355 ms 58348 KB Output is correct
21 Correct 359 ms 58832 KB Output is correct
22 Correct 400 ms 58680 KB Output is correct
23 Correct 360 ms 58576 KB Output is correct
24 Correct 377 ms 58540 KB Output is correct
25 Correct 267 ms 56336 KB Output is correct
26 Correct 268 ms 56916 KB Output is correct
27 Correct 290 ms 60756 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 21080 KB Output is correct
2 Correct 6 ms 21084 KB Output is correct
3 Correct 5 ms 21084 KB Output is correct
4 Correct 5 ms 21084 KB Output is correct
5 Correct 5 ms 21084 KB Output is correct
6 Correct 5 ms 21084 KB Output is correct
7 Correct 5 ms 21084 KB Output is correct
8 Correct 5 ms 21084 KB Output is correct
9 Correct 6 ms 21156 KB Output is correct
10 Correct 6 ms 21084 KB Output is correct
11 Correct 7 ms 21084 KB Output is correct
12 Correct 6 ms 21084 KB Output is correct
13 Correct 5 ms 21084 KB Output is correct
14 Correct 5 ms 21084 KB Output is correct
15 Correct 5 ms 21084 KB Output is correct
16 Correct 5 ms 21084 KB Output is correct
17 Correct 5 ms 21080 KB Output is correct
18 Correct 5 ms 21080 KB Output is correct
19 Correct 5 ms 21084 KB Output is correct
20 Correct 5 ms 21084 KB Output is correct
21 Correct 54 ms 30752 KB Output is correct
22 Correct 64 ms 31332 KB Output is correct
23 Correct 57 ms 30544 KB Output is correct
24 Correct 54 ms 30736 KB Output is correct
25 Correct 58 ms 31328 KB Output is correct
26 Correct 64 ms 31384 KB Output is correct
27 Correct 28 ms 29088 KB Output is correct
28 Correct 30 ms 29360 KB Output is correct
29 Correct 55 ms 30876 KB Output is correct
30 Correct 62 ms 30800 KB Output is correct
31 Correct 56 ms 30960 KB Output is correct
32 Correct 79 ms 30800 KB Output is correct
33 Correct 55 ms 31832 KB Output is correct
34 Correct 62 ms 31384 KB Output is correct
35 Correct 66 ms 32340 KB Output is correct
36 Correct 93 ms 32564 KB Output is correct
37 Correct 51 ms 31384 KB Output is correct
38 Correct 48 ms 30348 KB Output is correct
39 Correct 27 ms 28972 KB Output is correct
40 Correct 31 ms 29688 KB Output is correct
41 Correct 67 ms 30792 KB Output is correct
42 Correct 61 ms 31056 KB Output is correct
43 Correct 65 ms 31008 KB Output is correct
44 Correct 67 ms 31624 KB Output is correct
45 Correct 63 ms 31736 KB Output is correct
46 Correct 66 ms 31736 KB Output is correct
47 Correct 39 ms 30572 KB Output is correct
48 Correct 50 ms 31664 KB Output is correct
49 Correct 55 ms 30164 KB Output is correct
50 Correct 54 ms 31156 KB Output is correct
51 Correct 73 ms 31860 KB Output is correct
52 Correct 69 ms 31828 KB Output is correct
53 Correct 58 ms 31836 KB Output is correct
54 Correct 66 ms 33616 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 66 ms 27340 KB Output is correct
2 Correct 64 ms 31056 KB Output is correct
3 Correct 76 ms 28412 KB Output is correct
4 Correct 63 ms 30800 KB Output is correct
5 Correct 59 ms 31828 KB Output is correct
6 Correct 66 ms 32592 KB Output is correct
7 Correct 42 ms 30248 KB Output is correct
8 Correct 33 ms 30020 KB Output is correct
9 Correct 44 ms 31156 KB Output is correct
10 Correct 44 ms 30620 KB Output is correct
11 Correct 63 ms 31968 KB Output is correct
12 Correct 56 ms 32080 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 21080 KB Output is correct
2 Correct 6 ms 21084 KB Output is correct
3 Correct 5 ms 21084 KB Output is correct
4 Correct 5 ms 21084 KB Output is correct
5 Correct 5 ms 21084 KB Output is correct
6 Correct 5 ms 21084 KB Output is correct
7 Correct 5 ms 21084 KB Output is correct
8 Correct 5 ms 21084 KB Output is correct
9 Correct 6 ms 21156 KB Output is correct
10 Correct 6 ms 21084 KB Output is correct
11 Correct 7 ms 21084 KB Output is correct
12 Correct 6 ms 21084 KB Output is correct
13 Correct 5 ms 21084 KB Output is correct
14 Correct 5 ms 21084 KB Output is correct
15 Correct 5 ms 21084 KB Output is correct
16 Correct 5 ms 21084 KB Output is correct
17 Correct 5 ms 21080 KB Output is correct
18 Correct 5 ms 21080 KB Output is correct
19 Correct 5 ms 21084 KB Output is correct
20 Correct 5 ms 21084 KB Output is correct
21 Correct 7 ms 21084 KB Output is correct
22 Correct 5 ms 21084 KB Output is correct
23 Correct 5 ms 21084 KB Output is correct
24 Correct 7 ms 21244 KB Output is correct
25 Correct 5 ms 21084 KB Output is correct
26 Correct 5 ms 21084 KB Output is correct
27 Correct 5 ms 21080 KB Output is correct
28 Correct 6 ms 21180 KB Output is correct
29 Correct 5 ms 21080 KB Output is correct
30 Correct 5 ms 21080 KB Output is correct
31 Correct 5 ms 21084 KB Output is correct
32 Correct 5 ms 21252 KB Output is correct
33 Correct 7 ms 21084 KB Output is correct
34 Correct 5 ms 21096 KB Output is correct
35 Correct 6 ms 21088 KB Output is correct
36 Correct 5 ms 21080 KB Output is correct
37 Correct 5 ms 21084 KB Output is correct
38 Correct 6 ms 21092 KB Output is correct
39 Correct 54 ms 30752 KB Output is correct
40 Correct 64 ms 31332 KB Output is correct
41 Correct 57 ms 30544 KB Output is correct
42 Correct 54 ms 30736 KB Output is correct
43 Correct 58 ms 31328 KB Output is correct
44 Correct 64 ms 31384 KB Output is correct
45 Correct 28 ms 29088 KB Output is correct
46 Correct 30 ms 29360 KB Output is correct
47 Correct 55 ms 30876 KB Output is correct
48 Correct 62 ms 30800 KB Output is correct
49 Correct 56 ms 30960 KB Output is correct
50 Correct 79 ms 30800 KB Output is correct
51 Correct 55 ms 31832 KB Output is correct
52 Correct 62 ms 31384 KB Output is correct
53 Correct 66 ms 32340 KB Output is correct
54 Correct 93 ms 32564 KB Output is correct
55 Correct 51 ms 31384 KB Output is correct
56 Correct 48 ms 30348 KB Output is correct
57 Correct 27 ms 28972 KB Output is correct
58 Correct 31 ms 29688 KB Output is correct
59 Correct 67 ms 30792 KB Output is correct
60 Correct 61 ms 31056 KB Output is correct
61 Correct 65 ms 31008 KB Output is correct
62 Correct 67 ms 31624 KB Output is correct
63 Correct 63 ms 31736 KB Output is correct
64 Correct 66 ms 31736 KB Output is correct
65 Correct 39 ms 30572 KB Output is correct
66 Correct 50 ms 31664 KB Output is correct
67 Correct 55 ms 30164 KB Output is correct
68 Correct 54 ms 31156 KB Output is correct
69 Correct 73 ms 31860 KB Output is correct
70 Correct 69 ms 31828 KB Output is correct
71 Correct 58 ms 31836 KB Output is correct
72 Correct 66 ms 33616 KB Output is correct
73 Correct 66 ms 27340 KB Output is correct
74 Correct 64 ms 31056 KB Output is correct
75 Correct 76 ms 28412 KB Output is correct
76 Correct 63 ms 30800 KB Output is correct
77 Correct 59 ms 31828 KB Output is correct
78 Correct 66 ms 32592 KB Output is correct
79 Correct 42 ms 30248 KB Output is correct
80 Correct 33 ms 30020 KB Output is correct
81 Correct 44 ms 31156 KB Output is correct
82 Correct 44 ms 30620 KB Output is correct
83 Correct 63 ms 31968 KB Output is correct
84 Correct 56 ms 32080 KB Output is correct
85 Correct 57 ms 31572 KB Output is correct
86 Correct 67 ms 32316 KB Output is correct
87 Correct 66 ms 32084 KB Output is correct
88 Correct 78 ms 33080 KB Output is correct
89 Correct 46 ms 30388 KB Output is correct
90 Correct 63 ms 32660 KB Output is correct
91 Correct 52 ms 31324 KB Output is correct
92 Correct 48 ms 31000 KB Output is correct
93 Correct 66 ms 32608 KB Output is correct
94 Correct 72 ms 32344 KB Output is correct
95 Correct 65 ms 32336 KB Output is correct
96 Correct 71 ms 32596 KB Output is correct
97 Correct 64 ms 32560 KB Output is correct
98 Correct 60 ms 31440 KB Output is correct
99 Correct 39 ms 30640 KB Output is correct
100 Correct 56 ms 30884 KB Output is correct
101 Correct 51 ms 32336 KB Output is correct
102 Correct 68 ms 33684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 21080 KB Output is correct
2 Correct 6 ms 21084 KB Output is correct
3 Correct 5 ms 21084 KB Output is correct
4 Correct 5 ms 21084 KB Output is correct
5 Correct 5 ms 21084 KB Output is correct
6 Correct 5 ms 21084 KB Output is correct
7 Correct 5 ms 21084 KB Output is correct
8 Correct 5 ms 21084 KB Output is correct
9 Correct 6 ms 21156 KB Output is correct
10 Correct 6 ms 21084 KB Output is correct
11 Correct 7 ms 21084 KB Output is correct
12 Correct 6 ms 21084 KB Output is correct
13 Correct 5 ms 21084 KB Output is correct
14 Correct 5 ms 21084 KB Output is correct
15 Correct 5 ms 21084 KB Output is correct
16 Correct 5 ms 21084 KB Output is correct
17 Correct 5 ms 21080 KB Output is correct
18 Correct 5 ms 21080 KB Output is correct
19 Correct 5 ms 21084 KB Output is correct
20 Correct 5 ms 21084 KB Output is correct
21 Correct 7 ms 21084 KB Output is correct
22 Correct 5 ms 21084 KB Output is correct
23 Correct 5 ms 21084 KB Output is correct
24 Correct 7 ms 21244 KB Output is correct
25 Correct 5 ms 21084 KB Output is correct
26 Correct 5 ms 21084 KB Output is correct
27 Correct 5 ms 21080 KB Output is correct
28 Correct 6 ms 21180 KB Output is correct
29 Correct 5 ms 21080 KB Output is correct
30 Correct 5 ms 21080 KB Output is correct
31 Correct 5 ms 21084 KB Output is correct
32 Correct 5 ms 21252 KB Output is correct
33 Correct 7 ms 21084 KB Output is correct
34 Correct 5 ms 21096 KB Output is correct
35 Correct 6 ms 21088 KB Output is correct
36 Correct 5 ms 21080 KB Output is correct
37 Correct 5 ms 21084 KB Output is correct
38 Correct 6 ms 21092 KB Output is correct
39 Correct 54 ms 30752 KB Output is correct
40 Correct 64 ms 31332 KB Output is correct
41 Correct 57 ms 30544 KB Output is correct
42 Correct 54 ms 30736 KB Output is correct
43 Correct 58 ms 31328 KB Output is correct
44 Correct 64 ms 31384 KB Output is correct
45 Correct 28 ms 29088 KB Output is correct
46 Correct 30 ms 29360 KB Output is correct
47 Correct 55 ms 30876 KB Output is correct
48 Correct 62 ms 30800 KB Output is correct
49 Correct 56 ms 30960 KB Output is correct
50 Correct 79 ms 30800 KB Output is correct
51 Correct 55 ms 31832 KB Output is correct
52 Correct 62 ms 31384 KB Output is correct
53 Correct 66 ms 32340 KB Output is correct
54 Correct 93 ms 32564 KB Output is correct
55 Correct 298 ms 50768 KB Output is correct
56 Correct 253 ms 51528 KB Output is correct
57 Correct 336 ms 57988 KB Output is correct
58 Correct 297 ms 53872 KB Output is correct
59 Correct 247 ms 53584 KB Output is correct
60 Correct 419 ms 60240 KB Output is correct
61 Correct 117 ms 52456 KB Output is correct
62 Correct 153 ms 51896 KB Output is correct
63 Correct 362 ms 58760 KB Output is correct
64 Correct 377 ms 58964 KB Output is correct
65 Correct 355 ms 58132 KB Output is correct
66 Correct 379 ms 58452 KB Output is correct
67 Correct 352 ms 58100 KB Output is correct
68 Correct 325 ms 58672 KB Output is correct
69 Correct 337 ms 59032 KB Output is correct
70 Correct 375 ms 58440 KB Output is correct
71 Correct 360 ms 58560 KB Output is correct
72 Correct 392 ms 58284 KB Output is correct
73 Correct 355 ms 58672 KB Output is correct
74 Correct 355 ms 58348 KB Output is correct
75 Correct 359 ms 58832 KB Output is correct
76 Correct 400 ms 58680 KB Output is correct
77 Correct 360 ms 58576 KB Output is correct
78 Correct 377 ms 58540 KB Output is correct
79 Correct 267 ms 56336 KB Output is correct
80 Correct 268 ms 56916 KB Output is correct
81 Correct 290 ms 60756 KB Output is correct
82 Correct 51 ms 31384 KB Output is correct
83 Correct 48 ms 30348 KB Output is correct
84 Correct 27 ms 28972 KB Output is correct
85 Correct 31 ms 29688 KB Output is correct
86 Correct 67 ms 30792 KB Output is correct
87 Correct 61 ms 31056 KB Output is correct
88 Correct 65 ms 31008 KB Output is correct
89 Correct 67 ms 31624 KB Output is correct
90 Correct 63 ms 31736 KB Output is correct
91 Correct 66 ms 31736 KB Output is correct
92 Correct 39 ms 30572 KB Output is correct
93 Correct 50 ms 31664 KB Output is correct
94 Correct 55 ms 30164 KB Output is correct
95 Correct 54 ms 31156 KB Output is correct
96 Correct 73 ms 31860 KB Output is correct
97 Correct 69 ms 31828 KB Output is correct
98 Correct 58 ms 31836 KB Output is correct
99 Correct 66 ms 33616 KB Output is correct
100 Correct 66 ms 27340 KB Output is correct
101 Correct 64 ms 31056 KB Output is correct
102 Correct 76 ms 28412 KB Output is correct
103 Correct 63 ms 30800 KB Output is correct
104 Correct 59 ms 31828 KB Output is correct
105 Correct 66 ms 32592 KB Output is correct
106 Correct 42 ms 30248 KB Output is correct
107 Correct 33 ms 30020 KB Output is correct
108 Correct 44 ms 31156 KB Output is correct
109 Correct 44 ms 30620 KB Output is correct
110 Correct 63 ms 31968 KB Output is correct
111 Correct 56 ms 32080 KB Output is correct
112 Correct 57 ms 31572 KB Output is correct
113 Correct 67 ms 32316 KB Output is correct
114 Correct 66 ms 32084 KB Output is correct
115 Correct 78 ms 33080 KB Output is correct
116 Correct 46 ms 30388 KB Output is correct
117 Correct 63 ms 32660 KB Output is correct
118 Correct 52 ms 31324 KB Output is correct
119 Correct 48 ms 31000 KB Output is correct
120 Correct 66 ms 32608 KB Output is correct
121 Correct 72 ms 32344 KB Output is correct
122 Correct 65 ms 32336 KB Output is correct
123 Correct 71 ms 32596 KB Output is correct
124 Correct 64 ms 32560 KB Output is correct
125 Correct 60 ms 31440 KB Output is correct
126 Correct 39 ms 30640 KB Output is correct
127 Correct 56 ms 30884 KB Output is correct
128 Correct 51 ms 32336 KB Output is correct
129 Correct 68 ms 33684 KB Output is correct
130 Correct 387 ms 58116 KB Output is correct
131 Correct 233 ms 51796 KB Output is correct
132 Correct 403 ms 58352 KB Output is correct
133 Correct 385 ms 59836 KB Output is correct
134 Correct 337 ms 57248 KB Output is correct
135 Correct 441 ms 61008 KB Output is correct
136 Correct 369 ms 59884 KB Output is correct
137 Correct 365 ms 59732 KB Output is correct
138 Correct 355 ms 58804 KB Output is correct
139 Correct 407 ms 59488 KB Output is correct
140 Correct 355 ms 58964 KB Output is correct
141 Correct 400 ms 59172 KB Output is correct
142 Correct 366 ms 59328 KB Output is correct
143 Correct 359 ms 58932 KB Output is correct
144 Correct 401 ms 59052 KB Output is correct
145 Correct 352 ms 58624 KB Output is correct
146 Correct 334 ms 58448 KB Output is correct
147 Correct 364 ms 58528 KB Output is correct
148 Correct 366 ms 58508 KB Output is correct
149 Correct 361 ms 58576 KB Output is correct
150 Correct 160 ms 54672 KB Output is correct
151 Correct 283 ms 57328 KB Output is correct
152 Correct 269 ms 57428 KB Output is correct
153 Correct 312 ms 62804 KB Output is correct