Submission #878627

# Submission time Handle Problem Language Result Execution time Memory
878627 2023-11-25T02:42:54 Z thangdz2k7 Food Court (JOI21_foodcourt) C++17
100 / 100
434 ms 65468 KB
#include <bits/stdc++.h>
#define int long long
#define ll pair <long long, long long>
#define ii pair <int, int>
#define F first
#define S second
#define pb push_back

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, int 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, int 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, 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(long long int, long long int, long long int, long long 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(long long int, long long int, long long int, long long int)':
foodcourt.cpp:37:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   37 |     int mid = l + r >> 1;
      |               ~~^~~
foodcourt.cpp: In function 'void update_sumadd(long long int, long long int, long long int, long long 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(long long int, long long int, long long int, long long int)':
foodcourt.cpp:62:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   62 |     int mid = l + r >> 1;
      |               ~~^~~
foodcourt.cpp: In function 'long long int get_pos(long long int, long long int, long long int, long long int)':
foodcourt.cpp:68:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   68 |     int mid = l + r >> 1;
      |               ~~^~~
# Verdict Execution time Memory Grader output
1 Correct 8 ms 23132 KB Output is correct
2 Correct 6 ms 23132 KB Output is correct
3 Correct 5 ms 23128 KB Output is correct
4 Correct 6 ms 23132 KB Output is correct
5 Correct 5 ms 23132 KB Output is correct
6 Correct 6 ms 23132 KB Output is correct
7 Correct 6 ms 23132 KB Output is correct
8 Correct 6 ms 23240 KB Output is correct
9 Correct 8 ms 23132 KB Output is correct
10 Correct 6 ms 23132 KB Output is correct
11 Correct 8 ms 23132 KB Output is correct
12 Correct 6 ms 23132 KB Output is correct
13 Correct 5 ms 23132 KB Output is correct
14 Correct 5 ms 23132 KB Output is correct
15 Correct 5 ms 23132 KB Output is correct
16 Correct 5 ms 23132 KB Output is correct
17 Correct 6 ms 23036 KB Output is correct
18 Correct 6 ms 23248 KB Output is correct
19 Correct 6 ms 23132 KB Output is correct
20 Correct 7 ms 23132 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 23132 KB Output is correct
2 Correct 6 ms 23132 KB Output is correct
3 Correct 5 ms 23128 KB Output is correct
4 Correct 6 ms 23132 KB Output is correct
5 Correct 5 ms 23132 KB Output is correct
6 Correct 6 ms 23132 KB Output is correct
7 Correct 6 ms 23132 KB Output is correct
8 Correct 6 ms 23240 KB Output is correct
9 Correct 8 ms 23132 KB Output is correct
10 Correct 6 ms 23132 KB Output is correct
11 Correct 8 ms 23132 KB Output is correct
12 Correct 6 ms 23132 KB Output is correct
13 Correct 5 ms 23132 KB Output is correct
14 Correct 5 ms 23132 KB Output is correct
15 Correct 5 ms 23132 KB Output is correct
16 Correct 5 ms 23132 KB Output is correct
17 Correct 6 ms 23036 KB Output is correct
18 Correct 6 ms 23248 KB Output is correct
19 Correct 6 ms 23132 KB Output is correct
20 Correct 7 ms 23132 KB Output is correct
21 Correct 6 ms 23132 KB Output is correct
22 Correct 6 ms 23132 KB Output is correct
23 Correct 6 ms 23132 KB Output is correct
24 Correct 6 ms 23132 KB Output is correct
25 Correct 5 ms 23128 KB Output is correct
26 Correct 5 ms 23132 KB Output is correct
27 Correct 6 ms 23140 KB Output is correct
28 Correct 6 ms 23232 KB Output is correct
29 Correct 6 ms 23132 KB Output is correct
30 Correct 6 ms 23056 KB Output is correct
31 Correct 7 ms 23284 KB Output is correct
32 Correct 6 ms 23036 KB Output is correct
33 Correct 7 ms 23048 KB Output is correct
34 Correct 5 ms 23132 KB Output is correct
35 Correct 6 ms 23264 KB Output is correct
36 Correct 6 ms 23132 KB Output is correct
37 Correct 5 ms 23132 KB Output is correct
38 Correct 6 ms 23132 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 55 ms 32604 KB Output is correct
2 Correct 60 ms 34592 KB Output is correct
3 Correct 61 ms 33784 KB Output is correct
4 Correct 56 ms 33880 KB Output is correct
5 Correct 59 ms 34604 KB Output is correct
6 Correct 64 ms 34536 KB Output is correct
7 Correct 28 ms 31652 KB Output is correct
8 Correct 35 ms 32048 KB Output is correct
9 Correct 57 ms 33884 KB Output is correct
10 Correct 57 ms 34132 KB Output is correct
11 Correct 57 ms 34388 KB Output is correct
12 Correct 57 ms 34188 KB Output is correct
13 Correct 57 ms 34800 KB Output is correct
14 Correct 58 ms 34388 KB Output is correct
15 Correct 66 ms 35676 KB Output is correct
16 Correct 69 ms 35676 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 324 ms 52564 KB Output is correct
2 Correct 242 ms 53584 KB Output is correct
3 Correct 331 ms 59988 KB Output is correct
4 Correct 252 ms 55636 KB Output is correct
5 Correct 254 ms 55744 KB Output is correct
6 Correct 394 ms 62600 KB Output is correct
7 Correct 112 ms 55260 KB Output is correct
8 Correct 120 ms 53924 KB Output is correct
9 Correct 364 ms 61456 KB Output is correct
10 Correct 363 ms 61184 KB Output is correct
11 Correct 344 ms 59984 KB Output is correct
12 Correct 334 ms 61012 KB Output is correct
13 Correct 346 ms 60328 KB Output is correct
14 Correct 337 ms 60820 KB Output is correct
15 Correct 355 ms 60852 KB Output is correct
16 Correct 337 ms 60804 KB Output is correct
17 Correct 377 ms 61104 KB Output is correct
18 Correct 341 ms 60352 KB Output is correct
19 Correct 366 ms 61160 KB Output is correct
20 Correct 364 ms 60496 KB Output is correct
21 Correct 360 ms 61036 KB Output is correct
22 Correct 351 ms 60904 KB Output is correct
23 Correct 358 ms 61012 KB Output is correct
24 Correct 353 ms 60756 KB Output is correct
25 Correct 238 ms 59572 KB Output is correct
26 Correct 232 ms 59880 KB Output is correct
27 Correct 303 ms 64184 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 23132 KB Output is correct
2 Correct 6 ms 23132 KB Output is correct
3 Correct 5 ms 23128 KB Output is correct
4 Correct 6 ms 23132 KB Output is correct
5 Correct 5 ms 23132 KB Output is correct
6 Correct 6 ms 23132 KB Output is correct
7 Correct 6 ms 23132 KB Output is correct
8 Correct 6 ms 23240 KB Output is correct
9 Correct 8 ms 23132 KB Output is correct
10 Correct 6 ms 23132 KB Output is correct
11 Correct 8 ms 23132 KB Output is correct
12 Correct 6 ms 23132 KB Output is correct
13 Correct 5 ms 23132 KB Output is correct
14 Correct 5 ms 23132 KB Output is correct
15 Correct 5 ms 23132 KB Output is correct
16 Correct 5 ms 23132 KB Output is correct
17 Correct 6 ms 23036 KB Output is correct
18 Correct 6 ms 23248 KB Output is correct
19 Correct 6 ms 23132 KB Output is correct
20 Correct 7 ms 23132 KB Output is correct
21 Correct 55 ms 32604 KB Output is correct
22 Correct 60 ms 34592 KB Output is correct
23 Correct 61 ms 33784 KB Output is correct
24 Correct 56 ms 33880 KB Output is correct
25 Correct 59 ms 34604 KB Output is correct
26 Correct 64 ms 34536 KB Output is correct
27 Correct 28 ms 31652 KB Output is correct
28 Correct 35 ms 32048 KB Output is correct
29 Correct 57 ms 33884 KB Output is correct
30 Correct 57 ms 34132 KB Output is correct
31 Correct 57 ms 34388 KB Output is correct
32 Correct 57 ms 34188 KB Output is correct
33 Correct 57 ms 34800 KB Output is correct
34 Correct 58 ms 34388 KB Output is correct
35 Correct 66 ms 35676 KB Output is correct
36 Correct 69 ms 35676 KB Output is correct
37 Correct 53 ms 34128 KB Output is correct
38 Correct 52 ms 33208 KB Output is correct
39 Correct 26 ms 31252 KB Output is correct
40 Correct 30 ms 31992 KB Output is correct
41 Correct 64 ms 33708 KB Output is correct
42 Correct 60 ms 33880 KB Output is correct
43 Correct 61 ms 33980 KB Output is correct
44 Correct 58 ms 33876 KB Output is correct
45 Correct 58 ms 33872 KB Output is correct
46 Correct 73 ms 34128 KB Output is correct
47 Correct 37 ms 32724 KB Output is correct
48 Correct 47 ms 33620 KB Output is correct
49 Correct 42 ms 32236 KB Output is correct
50 Correct 52 ms 33116 KB Output is correct
51 Correct 71 ms 34300 KB Output is correct
52 Correct 61 ms 34112 KB Output is correct
53 Correct 54 ms 34132 KB Output is correct
54 Correct 70 ms 35668 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 58 ms 29276 KB Output is correct
2 Correct 65 ms 32852 KB Output is correct
3 Correct 65 ms 30520 KB Output is correct
4 Correct 48 ms 32776 KB Output is correct
5 Correct 56 ms 33876 KB Output is correct
6 Correct 68 ms 34640 KB Output is correct
7 Correct 33 ms 32404 KB Output is correct
8 Correct 33 ms 31796 KB Output is correct
9 Correct 43 ms 33220 KB Output is correct
10 Correct 40 ms 32540 KB Output is correct
11 Correct 54 ms 34040 KB Output is correct
12 Correct 55 ms 33884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 23132 KB Output is correct
2 Correct 6 ms 23132 KB Output is correct
3 Correct 5 ms 23128 KB Output is correct
4 Correct 6 ms 23132 KB Output is correct
5 Correct 5 ms 23132 KB Output is correct
6 Correct 6 ms 23132 KB Output is correct
7 Correct 6 ms 23132 KB Output is correct
8 Correct 6 ms 23240 KB Output is correct
9 Correct 8 ms 23132 KB Output is correct
10 Correct 6 ms 23132 KB Output is correct
11 Correct 8 ms 23132 KB Output is correct
12 Correct 6 ms 23132 KB Output is correct
13 Correct 5 ms 23132 KB Output is correct
14 Correct 5 ms 23132 KB Output is correct
15 Correct 5 ms 23132 KB Output is correct
16 Correct 5 ms 23132 KB Output is correct
17 Correct 6 ms 23036 KB Output is correct
18 Correct 6 ms 23248 KB Output is correct
19 Correct 6 ms 23132 KB Output is correct
20 Correct 7 ms 23132 KB Output is correct
21 Correct 6 ms 23132 KB Output is correct
22 Correct 6 ms 23132 KB Output is correct
23 Correct 6 ms 23132 KB Output is correct
24 Correct 6 ms 23132 KB Output is correct
25 Correct 5 ms 23128 KB Output is correct
26 Correct 5 ms 23132 KB Output is correct
27 Correct 6 ms 23140 KB Output is correct
28 Correct 6 ms 23232 KB Output is correct
29 Correct 6 ms 23132 KB Output is correct
30 Correct 6 ms 23056 KB Output is correct
31 Correct 7 ms 23284 KB Output is correct
32 Correct 6 ms 23036 KB Output is correct
33 Correct 7 ms 23048 KB Output is correct
34 Correct 5 ms 23132 KB Output is correct
35 Correct 6 ms 23264 KB Output is correct
36 Correct 6 ms 23132 KB Output is correct
37 Correct 5 ms 23132 KB Output is correct
38 Correct 6 ms 23132 KB Output is correct
39 Correct 55 ms 32604 KB Output is correct
40 Correct 60 ms 34592 KB Output is correct
41 Correct 61 ms 33784 KB Output is correct
42 Correct 56 ms 33880 KB Output is correct
43 Correct 59 ms 34604 KB Output is correct
44 Correct 64 ms 34536 KB Output is correct
45 Correct 28 ms 31652 KB Output is correct
46 Correct 35 ms 32048 KB Output is correct
47 Correct 57 ms 33884 KB Output is correct
48 Correct 57 ms 34132 KB Output is correct
49 Correct 57 ms 34388 KB Output is correct
50 Correct 57 ms 34188 KB Output is correct
51 Correct 57 ms 34800 KB Output is correct
52 Correct 58 ms 34388 KB Output is correct
53 Correct 66 ms 35676 KB Output is correct
54 Correct 69 ms 35676 KB Output is correct
55 Correct 53 ms 34128 KB Output is correct
56 Correct 52 ms 33208 KB Output is correct
57 Correct 26 ms 31252 KB Output is correct
58 Correct 30 ms 31992 KB Output is correct
59 Correct 64 ms 33708 KB Output is correct
60 Correct 60 ms 33880 KB Output is correct
61 Correct 61 ms 33980 KB Output is correct
62 Correct 58 ms 33876 KB Output is correct
63 Correct 58 ms 33872 KB Output is correct
64 Correct 73 ms 34128 KB Output is correct
65 Correct 37 ms 32724 KB Output is correct
66 Correct 47 ms 33620 KB Output is correct
67 Correct 42 ms 32236 KB Output is correct
68 Correct 52 ms 33116 KB Output is correct
69 Correct 71 ms 34300 KB Output is correct
70 Correct 61 ms 34112 KB Output is correct
71 Correct 54 ms 34132 KB Output is correct
72 Correct 70 ms 35668 KB Output is correct
73 Correct 58 ms 29276 KB Output is correct
74 Correct 65 ms 32852 KB Output is correct
75 Correct 65 ms 30520 KB Output is correct
76 Correct 48 ms 32776 KB Output is correct
77 Correct 56 ms 33876 KB Output is correct
78 Correct 68 ms 34640 KB Output is correct
79 Correct 33 ms 32404 KB Output is correct
80 Correct 33 ms 31796 KB Output is correct
81 Correct 43 ms 33220 KB Output is correct
82 Correct 40 ms 32540 KB Output is correct
83 Correct 54 ms 34040 KB Output is correct
84 Correct 55 ms 33884 KB Output is correct
85 Correct 59 ms 33648 KB Output is correct
86 Correct 63 ms 34256 KB Output is correct
87 Correct 59 ms 34128 KB Output is correct
88 Correct 65 ms 34900 KB Output is correct
89 Correct 42 ms 32284 KB Output is correct
90 Correct 62 ms 34388 KB Output is correct
91 Correct 49 ms 33156 KB Output is correct
92 Correct 47 ms 33104 KB Output is correct
93 Correct 68 ms 34500 KB Output is correct
94 Correct 65 ms 34384 KB Output is correct
95 Correct 71 ms 34372 KB Output is correct
96 Correct 63 ms 34384 KB Output is correct
97 Correct 63 ms 34508 KB Output is correct
98 Correct 51 ms 33528 KB Output is correct
99 Correct 41 ms 32696 KB Output is correct
100 Correct 43 ms 32852 KB Output is correct
101 Correct 58 ms 34268 KB Output is correct
102 Correct 70 ms 35464 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 23132 KB Output is correct
2 Correct 6 ms 23132 KB Output is correct
3 Correct 5 ms 23128 KB Output is correct
4 Correct 6 ms 23132 KB Output is correct
5 Correct 5 ms 23132 KB Output is correct
6 Correct 6 ms 23132 KB Output is correct
7 Correct 6 ms 23132 KB Output is correct
8 Correct 6 ms 23240 KB Output is correct
9 Correct 8 ms 23132 KB Output is correct
10 Correct 6 ms 23132 KB Output is correct
11 Correct 8 ms 23132 KB Output is correct
12 Correct 6 ms 23132 KB Output is correct
13 Correct 5 ms 23132 KB Output is correct
14 Correct 5 ms 23132 KB Output is correct
15 Correct 5 ms 23132 KB Output is correct
16 Correct 5 ms 23132 KB Output is correct
17 Correct 6 ms 23036 KB Output is correct
18 Correct 6 ms 23248 KB Output is correct
19 Correct 6 ms 23132 KB Output is correct
20 Correct 7 ms 23132 KB Output is correct
21 Correct 6 ms 23132 KB Output is correct
22 Correct 6 ms 23132 KB Output is correct
23 Correct 6 ms 23132 KB Output is correct
24 Correct 6 ms 23132 KB Output is correct
25 Correct 5 ms 23128 KB Output is correct
26 Correct 5 ms 23132 KB Output is correct
27 Correct 6 ms 23140 KB Output is correct
28 Correct 6 ms 23232 KB Output is correct
29 Correct 6 ms 23132 KB Output is correct
30 Correct 6 ms 23056 KB Output is correct
31 Correct 7 ms 23284 KB Output is correct
32 Correct 6 ms 23036 KB Output is correct
33 Correct 7 ms 23048 KB Output is correct
34 Correct 5 ms 23132 KB Output is correct
35 Correct 6 ms 23264 KB Output is correct
36 Correct 6 ms 23132 KB Output is correct
37 Correct 5 ms 23132 KB Output is correct
38 Correct 6 ms 23132 KB Output is correct
39 Correct 55 ms 32604 KB Output is correct
40 Correct 60 ms 34592 KB Output is correct
41 Correct 61 ms 33784 KB Output is correct
42 Correct 56 ms 33880 KB Output is correct
43 Correct 59 ms 34604 KB Output is correct
44 Correct 64 ms 34536 KB Output is correct
45 Correct 28 ms 31652 KB Output is correct
46 Correct 35 ms 32048 KB Output is correct
47 Correct 57 ms 33884 KB Output is correct
48 Correct 57 ms 34132 KB Output is correct
49 Correct 57 ms 34388 KB Output is correct
50 Correct 57 ms 34188 KB Output is correct
51 Correct 57 ms 34800 KB Output is correct
52 Correct 58 ms 34388 KB Output is correct
53 Correct 66 ms 35676 KB Output is correct
54 Correct 69 ms 35676 KB Output is correct
55 Correct 324 ms 52564 KB Output is correct
56 Correct 242 ms 53584 KB Output is correct
57 Correct 331 ms 59988 KB Output is correct
58 Correct 252 ms 55636 KB Output is correct
59 Correct 254 ms 55744 KB Output is correct
60 Correct 394 ms 62600 KB Output is correct
61 Correct 112 ms 55260 KB Output is correct
62 Correct 120 ms 53924 KB Output is correct
63 Correct 364 ms 61456 KB Output is correct
64 Correct 363 ms 61184 KB Output is correct
65 Correct 344 ms 59984 KB Output is correct
66 Correct 334 ms 61012 KB Output is correct
67 Correct 346 ms 60328 KB Output is correct
68 Correct 337 ms 60820 KB Output is correct
69 Correct 355 ms 60852 KB Output is correct
70 Correct 337 ms 60804 KB Output is correct
71 Correct 377 ms 61104 KB Output is correct
72 Correct 341 ms 60352 KB Output is correct
73 Correct 366 ms 61160 KB Output is correct
74 Correct 364 ms 60496 KB Output is correct
75 Correct 360 ms 61036 KB Output is correct
76 Correct 351 ms 60904 KB Output is correct
77 Correct 358 ms 61012 KB Output is correct
78 Correct 353 ms 60756 KB Output is correct
79 Correct 238 ms 59572 KB Output is correct
80 Correct 232 ms 59880 KB Output is correct
81 Correct 303 ms 64184 KB Output is correct
82 Correct 53 ms 34128 KB Output is correct
83 Correct 52 ms 33208 KB Output is correct
84 Correct 26 ms 31252 KB Output is correct
85 Correct 30 ms 31992 KB Output is correct
86 Correct 64 ms 33708 KB Output is correct
87 Correct 60 ms 33880 KB Output is correct
88 Correct 61 ms 33980 KB Output is correct
89 Correct 58 ms 33876 KB Output is correct
90 Correct 58 ms 33872 KB Output is correct
91 Correct 73 ms 34128 KB Output is correct
92 Correct 37 ms 32724 KB Output is correct
93 Correct 47 ms 33620 KB Output is correct
94 Correct 42 ms 32236 KB Output is correct
95 Correct 52 ms 33116 KB Output is correct
96 Correct 71 ms 34300 KB Output is correct
97 Correct 61 ms 34112 KB Output is correct
98 Correct 54 ms 34132 KB Output is correct
99 Correct 70 ms 35668 KB Output is correct
100 Correct 58 ms 29276 KB Output is correct
101 Correct 65 ms 32852 KB Output is correct
102 Correct 65 ms 30520 KB Output is correct
103 Correct 48 ms 32776 KB Output is correct
104 Correct 56 ms 33876 KB Output is correct
105 Correct 68 ms 34640 KB Output is correct
106 Correct 33 ms 32404 KB Output is correct
107 Correct 33 ms 31796 KB Output is correct
108 Correct 43 ms 33220 KB Output is correct
109 Correct 40 ms 32540 KB Output is correct
110 Correct 54 ms 34040 KB Output is correct
111 Correct 55 ms 33884 KB Output is correct
112 Correct 59 ms 33648 KB Output is correct
113 Correct 63 ms 34256 KB Output is correct
114 Correct 59 ms 34128 KB Output is correct
115 Correct 65 ms 34900 KB Output is correct
116 Correct 42 ms 32284 KB Output is correct
117 Correct 62 ms 34388 KB Output is correct
118 Correct 49 ms 33156 KB Output is correct
119 Correct 47 ms 33104 KB Output is correct
120 Correct 68 ms 34500 KB Output is correct
121 Correct 65 ms 34384 KB Output is correct
122 Correct 71 ms 34372 KB Output is correct
123 Correct 63 ms 34384 KB Output is correct
124 Correct 63 ms 34508 KB Output is correct
125 Correct 51 ms 33528 KB Output is correct
126 Correct 41 ms 32696 KB Output is correct
127 Correct 43 ms 32852 KB Output is correct
128 Correct 58 ms 34268 KB Output is correct
129 Correct 70 ms 35464 KB Output is correct
130 Correct 350 ms 60496 KB Output is correct
131 Correct 251 ms 54100 KB Output is correct
132 Correct 336 ms 60604 KB Output is correct
133 Correct 356 ms 62292 KB Output is correct
134 Correct 325 ms 59732 KB Output is correct
135 Correct 385 ms 63528 KB Output is correct
136 Correct 376 ms 62292 KB Output is correct
137 Correct 434 ms 62224 KB Output is correct
138 Correct 324 ms 60496 KB Output is correct
139 Correct 359 ms 61904 KB Output is correct
140 Correct 335 ms 60752 KB Output is correct
141 Correct 367 ms 61684 KB Output is correct
142 Correct 382 ms 61524 KB Output is correct
143 Correct 364 ms 62036 KB Output is correct
144 Correct 350 ms 61008 KB Output is correct
145 Correct 364 ms 61156 KB Output is correct
146 Correct 353 ms 61148 KB Output is correct
147 Correct 384 ms 61436 KB Output is correct
148 Correct 390 ms 61524 KB Output is correct
149 Correct 371 ms 61456 KB Output is correct
150 Correct 161 ms 58160 KB Output is correct
151 Correct 244 ms 60424 KB Output is correct
152 Correct 251 ms 60644 KB Output is correct
153 Correct 291 ms 65468 KB Output is correct