Submission #1117934

# Submission time Handle Problem Language Result Execution time Memory
1117934 2024-11-24T10:31:30 Z Zero_OP Food Court (JOI21_foodcourt) C++14
100 / 100
411 ms 56020 KB
#include <bits/stdc++.h>

using namespace std;

#define dbg(x) "[" #x " = " << (x) << "]"

struct fenwick_tree{
    vector<long long> bit;
    fenwick_tree(int n) : bit(n + 1, 0) {}

    void update(int i, long long v){
        for(; i < (int)bit.size(); i += i & (-i)) bit[i] += v;
    }

    long long query(int i){
        long long sum = 0;
        for(; i > 0; i -= i & (-i)) sum += bit[i];
        return sum;
    }

    long long query(int l, int r){
        return query(r) - query(l - 1);
    }

    int find_last(long long target){
        int i = 0;
        for(int b = 17; b >= 0; --b){
            if(i + (1 << b) < (int)bit.size() && target - bit[i + (1 << b)] > 0){
                i += (1 << b);
                target -= bit[i];
            }
        }
        return i + 1;
    }
};

struct min_prefix_segment_tree{ //finding minimum prefix with maximum position
    vector<long long> lazy;
    vector<pair<long long, int>> st;

    min_prefix_segment_tree(int n ): st(n << 2), lazy(n << 2) {}

    void build(int id, int l, int r){
        if(l == r) st[id] = {0, -l};
        else{
            int mid = l + r >> 1;
            build(id << 1, l, mid);
            build(id << 1 | 1, mid + 1, r);
            st[id] = min(st[id << 1], st[id << 1 | 1]);
        }
    }

    void apply(int id, long long v){
        st[id].first += v;
        lazy[id] += v;
    }

    void lazy_down(int id){
        if(lazy[id] != 0){
            apply(id << 1, lazy[id]);
            apply(id << 1 | 1, lazy[id]);
            lazy[id] = 0;
        }
    }

    void update(int id, int l, int r, int u, int v, long long val){
        if(u <= l && r <= v) apply(id, val);
        else{
            int mid = l + r >> 1;
            lazy_down(id);
            if(u <= mid) update(id << 1, l, mid, u, v, val);
            if(mid < v) update(id << 1 | 1, mid + 1, r, u, v, val);
            st[id] = min(st[id << 1], st[id << 1 | 1]);
        }
    }

    pair<long long, int> query(int id, int l, int r, int u, int v){
        if(u <= l && r <= v) return st[id];
        int mid = l + r >> 1;
        lazy_down(id);
        if(u > mid) return query(id << 1 | 1, mid + 1, r, u, v);
        if(mid >= v) return query(id << 1, l, mid, u, v);
        return min(query(id << 1, l, mid, u, v), query(id << 1 | 1, mid + 1, r, u, v));
    }
};

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

#ifdef LOCAL
    freopen("task.inp", "r", stdin);
    freopen("task.out", "w", stdout);
#endif // LOCAL

    int N, M, Q;
    cin >> N >> M >> Q;

    struct info_update{
        int type, c, k, id;
    };

    struct info_query{
        long long b; int id;
    };

    vector<vector<info_update>> updates(N);
    vector<vector<info_query>> queries(N);
    vector<int> color(Q + 1);

    for(int i = 1; i <= Q; ++i){
        int t;
        cin >> t;
        if(t == 1){
            int l, r, c, k;
            cin >> l >> r >> c >> k;
            --l;
            updates[l].push_back({+1, c, k, i});
            if(r < N) updates[r].push_back({-1, c, k, i});
            color[i] = c;
        } else if(t == 2){
            int l, r, k;
            cin >> l >> r >> k;
            --l;
            updates[l].push_back({+2, -1, k, i});
            if(r < N) updates[r].push_back({-2, -1, k, i});
        } else if(t == 3){
            int a; long long b;
            cin >> a >> b;
            --a;
            queries[a].push_back({b, i});
        }
    }

    min_prefix_segment_tree tr(Q + 1);
    fenwick_tree ft(Q), f(Q), g(Q);

    tr.build(1, 0, Q);

    //ft : 1 and 2
    //f  : only 1
    //g  : only 2

    vector<int> answer(Q + 1, -1);

    for(int i = 0; i < N; ++i){
        for(auto [type, c, k, id] : updates[i]){
            if(abs(type) == 1){
                if(type < 0) tr.update(1, 0, Q, id, Q, -k), f.update(id, -k);
                if(type > 0) tr.update(1, 0, Q, id, Q, +k), f.update(id, +k);
            } else if(abs(type) == 2){
                if(type < 0) tr.update(1, 0, Q, id, Q, +k), g.update(id, -k);
                if(type > 0) tr.update(1, 0, Q, id, Q, -k), g.update(id, +k);
            } else assert(false);
        }

        for(auto [b, id] : queries[i]){
            long long minPrefix; int from;
            tie(minPrefix, from) = tr.query(1, 0, Q, 0, id);
            from = -from;

            long long f_sum = f.query(id);
            long long g_sum = g.query(id);
            long long prefixSum = f_sum - g_sum;
            long long cur = prefixSum - minPrefix;

            if(cur < b){
                answer[id] = 0;
            } else{
                long long loss = (g_sum - g.query(from)) + f.query(from) + b;
                answer[id] = color[f.find_last(loss)];
            }
        }
    }

    for(int i = 1; i <= Q; ++i){
        if(answer[i] != -1) cout << answer[i] << '\n';
    }

    return 0;
}

Compilation message

foodcourt.cpp: In constructor 'min_prefix_segment_tree::min_prefix_segment_tree(int)':
foodcourt.cpp:39:34: warning: 'min_prefix_segment_tree::st' will be initialized after [-Wreorder]
   39 |     vector<pair<long long, int>> st;
      |                                  ^~
foodcourt.cpp:38:23: warning:   'std::vector<long long int> min_prefix_segment_tree::lazy' [-Wreorder]
   38 |     vector<long long> lazy;
      |                       ^~~~
foodcourt.cpp:41:5: warning:   when initialized here [-Wreorder]
   41 |     min_prefix_segment_tree(int n ): st(n << 2), lazy(n << 2) {}
      |     ^~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp: In member function 'void min_prefix_segment_tree::build(int, int, int)':
foodcourt.cpp:46:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   46 |             int mid = l + r >> 1;
      |                       ~~^~~
foodcourt.cpp: In member function 'void min_prefix_segment_tree::update(int, int, int, int, int, long long int)':
foodcourt.cpp:69:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   69 |             int mid = l + r >> 1;
      |                       ~~^~~
foodcourt.cpp: In member function 'std::pair<long long int, int> min_prefix_segment_tree::query(int, int, int, int, int)':
foodcourt.cpp:79:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   79 |         int mid = l + r >> 1;
      |                   ~~^~~
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:147:18: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  147 |         for(auto [type, c, k, id] : updates[i]){
      |                  ^
foodcourt.cpp:157:18: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  157 |         for(auto [b, id] : queries[i]){
      |                  ^
# Verdict Execution time Memory Grader output
1 Correct 2 ms 592 KB Output is correct
2 Correct 4 ms 848 KB Output is correct
3 Correct 2 ms 592 KB Output is correct
4 Correct 4 ms 848 KB Output is correct
5 Correct 2 ms 592 KB Output is correct
6 Correct 2 ms 592 KB Output is correct
7 Correct 2 ms 848 KB Output is correct
8 Correct 2 ms 848 KB Output is correct
9 Correct 3 ms 848 KB Output is correct
10 Correct 2 ms 848 KB Output is correct
11 Correct 2 ms 848 KB Output is correct
12 Correct 3 ms 848 KB Output is correct
13 Correct 2 ms 592 KB Output is correct
14 Correct 2 ms 848 KB Output is correct
15 Correct 2 ms 592 KB Output is correct
16 Correct 2 ms 848 KB Output is correct
17 Correct 2 ms 592 KB Output is correct
18 Correct 2 ms 848 KB Output is correct
19 Correct 2 ms 756 KB Output is correct
20 Correct 3 ms 1020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 592 KB Output is correct
2 Correct 4 ms 848 KB Output is correct
3 Correct 2 ms 592 KB Output is correct
4 Correct 4 ms 848 KB Output is correct
5 Correct 2 ms 592 KB Output is correct
6 Correct 2 ms 592 KB Output is correct
7 Correct 2 ms 848 KB Output is correct
8 Correct 2 ms 848 KB Output is correct
9 Correct 3 ms 848 KB Output is correct
10 Correct 2 ms 848 KB Output is correct
11 Correct 2 ms 848 KB Output is correct
12 Correct 3 ms 848 KB Output is correct
13 Correct 2 ms 592 KB Output is correct
14 Correct 2 ms 848 KB Output is correct
15 Correct 2 ms 592 KB Output is correct
16 Correct 2 ms 848 KB Output is correct
17 Correct 2 ms 592 KB Output is correct
18 Correct 2 ms 848 KB Output is correct
19 Correct 2 ms 756 KB Output is correct
20 Correct 3 ms 1020 KB Output is correct
21 Correct 2 ms 848 KB Output is correct
22 Correct 2 ms 848 KB Output is correct
23 Correct 2 ms 592 KB Output is correct
24 Correct 2 ms 848 KB Output is correct
25 Correct 2 ms 592 KB Output is correct
26 Correct 2 ms 592 KB Output is correct
27 Correct 2 ms 848 KB Output is correct
28 Correct 3 ms 848 KB Output is correct
29 Correct 3 ms 848 KB Output is correct
30 Correct 3 ms 896 KB Output is correct
31 Correct 3 ms 848 KB Output is correct
32 Correct 2 ms 848 KB Output is correct
33 Correct 2 ms 592 KB Output is correct
34 Correct 2 ms 848 KB Output is correct
35 Correct 2 ms 848 KB Output is correct
36 Correct 2 ms 848 KB Output is correct
37 Correct 2 ms 592 KB Output is correct
38 Correct 2 ms 860 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 63 ms 14420 KB Output is correct
2 Correct 82 ms 14420 KB Output is correct
3 Correct 70 ms 14540 KB Output is correct
4 Correct 69 ms 14536 KB Output is correct
5 Correct 61 ms 14532 KB Output is correct
6 Correct 76 ms 14552 KB Output is correct
7 Correct 27 ms 8900 KB Output is correct
8 Correct 35 ms 9388 KB Output is correct
9 Correct 62 ms 14620 KB Output is correct
10 Correct 80 ms 14440 KB Output is correct
11 Correct 73 ms 14628 KB Output is correct
12 Correct 58 ms 14564 KB Output is correct
13 Correct 61 ms 12400 KB Output is correct
14 Correct 67 ms 14536 KB Output is correct
15 Correct 70 ms 13644 KB Output is correct
16 Correct 58 ms 14748 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 301 ms 49992 KB Output is correct
2 Correct 245 ms 40776 KB Output is correct
3 Correct 365 ms 54736 KB Output is correct
4 Correct 225 ms 43080 KB Output is correct
5 Correct 283 ms 40908 KB Output is correct
6 Correct 354 ms 54900 KB Output is correct
7 Correct 143 ms 38272 KB Output is correct
8 Correct 141 ms 38376 KB Output is correct
9 Correct 345 ms 54000 KB Output is correct
10 Correct 310 ms 53832 KB Output is correct
11 Correct 320 ms 54868 KB Output is correct
12 Correct 364 ms 54856 KB Output is correct
13 Correct 368 ms 54948 KB Output is correct
14 Correct 335 ms 55008 KB Output is correct
15 Correct 337 ms 55044 KB Output is correct
16 Correct 318 ms 54960 KB Output is correct
17 Correct 339 ms 55056 KB Output is correct
18 Correct 351 ms 54852 KB Output is correct
19 Correct 380 ms 54856 KB Output is correct
20 Correct 361 ms 54968 KB Output is correct
21 Correct 350 ms 54856 KB Output is correct
22 Correct 347 ms 54864 KB Output is correct
23 Correct 358 ms 54840 KB Output is correct
24 Correct 411 ms 54948 KB Output is correct
25 Correct 286 ms 51528 KB Output is correct
26 Correct 253 ms 55112 KB Output is correct
27 Correct 264 ms 55720 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 592 KB Output is correct
2 Correct 4 ms 848 KB Output is correct
3 Correct 2 ms 592 KB Output is correct
4 Correct 4 ms 848 KB Output is correct
5 Correct 2 ms 592 KB Output is correct
6 Correct 2 ms 592 KB Output is correct
7 Correct 2 ms 848 KB Output is correct
8 Correct 2 ms 848 KB Output is correct
9 Correct 3 ms 848 KB Output is correct
10 Correct 2 ms 848 KB Output is correct
11 Correct 2 ms 848 KB Output is correct
12 Correct 3 ms 848 KB Output is correct
13 Correct 2 ms 592 KB Output is correct
14 Correct 2 ms 848 KB Output is correct
15 Correct 2 ms 592 KB Output is correct
16 Correct 2 ms 848 KB Output is correct
17 Correct 2 ms 592 KB Output is correct
18 Correct 2 ms 848 KB Output is correct
19 Correct 2 ms 756 KB Output is correct
20 Correct 3 ms 1020 KB Output is correct
21 Correct 63 ms 14420 KB Output is correct
22 Correct 82 ms 14420 KB Output is correct
23 Correct 70 ms 14540 KB Output is correct
24 Correct 69 ms 14536 KB Output is correct
25 Correct 61 ms 14532 KB Output is correct
26 Correct 76 ms 14552 KB Output is correct
27 Correct 27 ms 8900 KB Output is correct
28 Correct 35 ms 9388 KB Output is correct
29 Correct 62 ms 14620 KB Output is correct
30 Correct 80 ms 14440 KB Output is correct
31 Correct 73 ms 14628 KB Output is correct
32 Correct 58 ms 14564 KB Output is correct
33 Correct 61 ms 12400 KB Output is correct
34 Correct 67 ms 14536 KB Output is correct
35 Correct 70 ms 13644 KB Output is correct
36 Correct 58 ms 14748 KB Output is correct
37 Correct 56 ms 13128 KB Output is correct
38 Correct 55 ms 12104 KB Output is correct
39 Correct 22 ms 8020 KB Output is correct
40 Correct 30 ms 9236 KB Output is correct
41 Correct 56 ms 14624 KB Output is correct
42 Correct 63 ms 14664 KB Output is correct
43 Correct 60 ms 14664 KB Output is correct
44 Correct 69 ms 14664 KB Output is correct
45 Correct 64 ms 14664 KB Output is correct
46 Correct 63 ms 14664 KB Output is correct
47 Correct 36 ms 12868 KB Output is correct
48 Correct 56 ms 14608 KB Output is correct
49 Correct 42 ms 10356 KB Output is correct
50 Correct 57 ms 12880 KB Output is correct
51 Correct 67 ms 14672 KB Output is correct
52 Correct 76 ms 14756 KB Output is correct
53 Correct 45 ms 11948 KB Output is correct
54 Correct 58 ms 14664 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 62 ms 13128 KB Output is correct
2 Correct 55 ms 13792 KB Output is correct
3 Correct 55 ms 14416 KB Output is correct
4 Correct 37 ms 11080 KB Output is correct
5 Correct 49 ms 12872 KB Output is correct
6 Correct 55 ms 14416 KB Output is correct
7 Correct 27 ms 8644 KB Output is correct
8 Correct 27 ms 8264 KB Output is correct
9 Correct 42 ms 13248 KB Output is correct
10 Correct 37 ms 10576 KB Output is correct
11 Correct 52 ms 13996 KB Output is correct
12 Correct 58 ms 13904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 592 KB Output is correct
2 Correct 4 ms 848 KB Output is correct
3 Correct 2 ms 592 KB Output is correct
4 Correct 4 ms 848 KB Output is correct
5 Correct 2 ms 592 KB Output is correct
6 Correct 2 ms 592 KB Output is correct
7 Correct 2 ms 848 KB Output is correct
8 Correct 2 ms 848 KB Output is correct
9 Correct 3 ms 848 KB Output is correct
10 Correct 2 ms 848 KB Output is correct
11 Correct 2 ms 848 KB Output is correct
12 Correct 3 ms 848 KB Output is correct
13 Correct 2 ms 592 KB Output is correct
14 Correct 2 ms 848 KB Output is correct
15 Correct 2 ms 592 KB Output is correct
16 Correct 2 ms 848 KB Output is correct
17 Correct 2 ms 592 KB Output is correct
18 Correct 2 ms 848 KB Output is correct
19 Correct 2 ms 756 KB Output is correct
20 Correct 3 ms 1020 KB Output is correct
21 Correct 2 ms 848 KB Output is correct
22 Correct 2 ms 848 KB Output is correct
23 Correct 2 ms 592 KB Output is correct
24 Correct 2 ms 848 KB Output is correct
25 Correct 2 ms 592 KB Output is correct
26 Correct 2 ms 592 KB Output is correct
27 Correct 2 ms 848 KB Output is correct
28 Correct 3 ms 848 KB Output is correct
29 Correct 3 ms 848 KB Output is correct
30 Correct 3 ms 896 KB Output is correct
31 Correct 3 ms 848 KB Output is correct
32 Correct 2 ms 848 KB Output is correct
33 Correct 2 ms 592 KB Output is correct
34 Correct 2 ms 848 KB Output is correct
35 Correct 2 ms 848 KB Output is correct
36 Correct 2 ms 848 KB Output is correct
37 Correct 2 ms 592 KB Output is correct
38 Correct 2 ms 860 KB Output is correct
39 Correct 63 ms 14420 KB Output is correct
40 Correct 82 ms 14420 KB Output is correct
41 Correct 70 ms 14540 KB Output is correct
42 Correct 69 ms 14536 KB Output is correct
43 Correct 61 ms 14532 KB Output is correct
44 Correct 76 ms 14552 KB Output is correct
45 Correct 27 ms 8900 KB Output is correct
46 Correct 35 ms 9388 KB Output is correct
47 Correct 62 ms 14620 KB Output is correct
48 Correct 80 ms 14440 KB Output is correct
49 Correct 73 ms 14628 KB Output is correct
50 Correct 58 ms 14564 KB Output is correct
51 Correct 61 ms 12400 KB Output is correct
52 Correct 67 ms 14536 KB Output is correct
53 Correct 70 ms 13644 KB Output is correct
54 Correct 58 ms 14748 KB Output is correct
55 Correct 56 ms 13128 KB Output is correct
56 Correct 55 ms 12104 KB Output is correct
57 Correct 22 ms 8020 KB Output is correct
58 Correct 30 ms 9236 KB Output is correct
59 Correct 56 ms 14624 KB Output is correct
60 Correct 63 ms 14664 KB Output is correct
61 Correct 60 ms 14664 KB Output is correct
62 Correct 69 ms 14664 KB Output is correct
63 Correct 64 ms 14664 KB Output is correct
64 Correct 63 ms 14664 KB Output is correct
65 Correct 36 ms 12868 KB Output is correct
66 Correct 56 ms 14608 KB Output is correct
67 Correct 42 ms 10356 KB Output is correct
68 Correct 57 ms 12880 KB Output is correct
69 Correct 67 ms 14672 KB Output is correct
70 Correct 76 ms 14756 KB Output is correct
71 Correct 45 ms 11948 KB Output is correct
72 Correct 58 ms 14664 KB Output is correct
73 Correct 62 ms 13128 KB Output is correct
74 Correct 55 ms 13792 KB Output is correct
75 Correct 55 ms 14416 KB Output is correct
76 Correct 37 ms 11080 KB Output is correct
77 Correct 49 ms 12872 KB Output is correct
78 Correct 55 ms 14416 KB Output is correct
79 Correct 27 ms 8644 KB Output is correct
80 Correct 27 ms 8264 KB Output is correct
81 Correct 42 ms 13248 KB Output is correct
82 Correct 37 ms 10576 KB Output is correct
83 Correct 52 ms 13996 KB Output is correct
84 Correct 58 ms 13904 KB Output is correct
85 Correct 67 ms 12872 KB Output is correct
86 Correct 64 ms 14408 KB Output is correct
87 Correct 61 ms 13048 KB Output is correct
88 Correct 62 ms 14664 KB Output is correct
89 Correct 42 ms 10364 KB Output is correct
90 Correct 66 ms 14528 KB Output is correct
91 Correct 49 ms 11592 KB Output is correct
92 Correct 49 ms 11092 KB Output is correct
93 Correct 66 ms 14664 KB Output is correct
94 Correct 64 ms 14664 KB Output is correct
95 Correct 61 ms 14152 KB Output is correct
96 Correct 66 ms 14664 KB Output is correct
97 Correct 62 ms 14664 KB Output is correct
98 Correct 55 ms 12112 KB Output is correct
99 Correct 44 ms 12864 KB Output is correct
100 Correct 45 ms 12232 KB Output is correct
101 Correct 52 ms 14664 KB Output is correct
102 Correct 61 ms 14688 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 592 KB Output is correct
2 Correct 4 ms 848 KB Output is correct
3 Correct 2 ms 592 KB Output is correct
4 Correct 4 ms 848 KB Output is correct
5 Correct 2 ms 592 KB Output is correct
6 Correct 2 ms 592 KB Output is correct
7 Correct 2 ms 848 KB Output is correct
8 Correct 2 ms 848 KB Output is correct
9 Correct 3 ms 848 KB Output is correct
10 Correct 2 ms 848 KB Output is correct
11 Correct 2 ms 848 KB Output is correct
12 Correct 3 ms 848 KB Output is correct
13 Correct 2 ms 592 KB Output is correct
14 Correct 2 ms 848 KB Output is correct
15 Correct 2 ms 592 KB Output is correct
16 Correct 2 ms 848 KB Output is correct
17 Correct 2 ms 592 KB Output is correct
18 Correct 2 ms 848 KB Output is correct
19 Correct 2 ms 756 KB Output is correct
20 Correct 3 ms 1020 KB Output is correct
21 Correct 2 ms 848 KB Output is correct
22 Correct 2 ms 848 KB Output is correct
23 Correct 2 ms 592 KB Output is correct
24 Correct 2 ms 848 KB Output is correct
25 Correct 2 ms 592 KB Output is correct
26 Correct 2 ms 592 KB Output is correct
27 Correct 2 ms 848 KB Output is correct
28 Correct 3 ms 848 KB Output is correct
29 Correct 3 ms 848 KB Output is correct
30 Correct 3 ms 896 KB Output is correct
31 Correct 3 ms 848 KB Output is correct
32 Correct 2 ms 848 KB Output is correct
33 Correct 2 ms 592 KB Output is correct
34 Correct 2 ms 848 KB Output is correct
35 Correct 2 ms 848 KB Output is correct
36 Correct 2 ms 848 KB Output is correct
37 Correct 2 ms 592 KB Output is correct
38 Correct 2 ms 860 KB Output is correct
39 Correct 63 ms 14420 KB Output is correct
40 Correct 82 ms 14420 KB Output is correct
41 Correct 70 ms 14540 KB Output is correct
42 Correct 69 ms 14536 KB Output is correct
43 Correct 61 ms 14532 KB Output is correct
44 Correct 76 ms 14552 KB Output is correct
45 Correct 27 ms 8900 KB Output is correct
46 Correct 35 ms 9388 KB Output is correct
47 Correct 62 ms 14620 KB Output is correct
48 Correct 80 ms 14440 KB Output is correct
49 Correct 73 ms 14628 KB Output is correct
50 Correct 58 ms 14564 KB Output is correct
51 Correct 61 ms 12400 KB Output is correct
52 Correct 67 ms 14536 KB Output is correct
53 Correct 70 ms 13644 KB Output is correct
54 Correct 58 ms 14748 KB Output is correct
55 Correct 301 ms 49992 KB Output is correct
56 Correct 245 ms 40776 KB Output is correct
57 Correct 365 ms 54736 KB Output is correct
58 Correct 225 ms 43080 KB Output is correct
59 Correct 283 ms 40908 KB Output is correct
60 Correct 354 ms 54900 KB Output is correct
61 Correct 143 ms 38272 KB Output is correct
62 Correct 141 ms 38376 KB Output is correct
63 Correct 345 ms 54000 KB Output is correct
64 Correct 310 ms 53832 KB Output is correct
65 Correct 320 ms 54868 KB Output is correct
66 Correct 364 ms 54856 KB Output is correct
67 Correct 368 ms 54948 KB Output is correct
68 Correct 335 ms 55008 KB Output is correct
69 Correct 337 ms 55044 KB Output is correct
70 Correct 318 ms 54960 KB Output is correct
71 Correct 339 ms 55056 KB Output is correct
72 Correct 351 ms 54852 KB Output is correct
73 Correct 380 ms 54856 KB Output is correct
74 Correct 361 ms 54968 KB Output is correct
75 Correct 350 ms 54856 KB Output is correct
76 Correct 347 ms 54864 KB Output is correct
77 Correct 358 ms 54840 KB Output is correct
78 Correct 411 ms 54948 KB Output is correct
79 Correct 286 ms 51528 KB Output is correct
80 Correct 253 ms 55112 KB Output is correct
81 Correct 264 ms 55720 KB Output is correct
82 Correct 56 ms 13128 KB Output is correct
83 Correct 55 ms 12104 KB Output is correct
84 Correct 22 ms 8020 KB Output is correct
85 Correct 30 ms 9236 KB Output is correct
86 Correct 56 ms 14624 KB Output is correct
87 Correct 63 ms 14664 KB Output is correct
88 Correct 60 ms 14664 KB Output is correct
89 Correct 69 ms 14664 KB Output is correct
90 Correct 64 ms 14664 KB Output is correct
91 Correct 63 ms 14664 KB Output is correct
92 Correct 36 ms 12868 KB Output is correct
93 Correct 56 ms 14608 KB Output is correct
94 Correct 42 ms 10356 KB Output is correct
95 Correct 57 ms 12880 KB Output is correct
96 Correct 67 ms 14672 KB Output is correct
97 Correct 76 ms 14756 KB Output is correct
98 Correct 45 ms 11948 KB Output is correct
99 Correct 58 ms 14664 KB Output is correct
100 Correct 62 ms 13128 KB Output is correct
101 Correct 55 ms 13792 KB Output is correct
102 Correct 55 ms 14416 KB Output is correct
103 Correct 37 ms 11080 KB Output is correct
104 Correct 49 ms 12872 KB Output is correct
105 Correct 55 ms 14416 KB Output is correct
106 Correct 27 ms 8644 KB Output is correct
107 Correct 27 ms 8264 KB Output is correct
108 Correct 42 ms 13248 KB Output is correct
109 Correct 37 ms 10576 KB Output is correct
110 Correct 52 ms 13996 KB Output is correct
111 Correct 58 ms 13904 KB Output is correct
112 Correct 67 ms 12872 KB Output is correct
113 Correct 64 ms 14408 KB Output is correct
114 Correct 61 ms 13048 KB Output is correct
115 Correct 62 ms 14664 KB Output is correct
116 Correct 42 ms 10364 KB Output is correct
117 Correct 66 ms 14528 KB Output is correct
118 Correct 49 ms 11592 KB Output is correct
119 Correct 49 ms 11092 KB Output is correct
120 Correct 66 ms 14664 KB Output is correct
121 Correct 64 ms 14664 KB Output is correct
122 Correct 61 ms 14152 KB Output is correct
123 Correct 66 ms 14664 KB Output is correct
124 Correct 62 ms 14664 KB Output is correct
125 Correct 55 ms 12112 KB Output is correct
126 Correct 44 ms 12864 KB Output is correct
127 Correct 45 ms 12232 KB Output is correct
128 Correct 52 ms 14664 KB Output is correct
129 Correct 61 ms 14688 KB Output is correct
130 Correct 348 ms 54540 KB Output is correct
131 Correct 239 ms 40228 KB Output is correct
132 Correct 339 ms 54860 KB Output is correct
133 Correct 337 ms 52808 KB Output is correct
134 Correct 306 ms 48240 KB Output is correct
135 Correct 383 ms 55112 KB Output is correct
136 Correct 302 ms 54344 KB Output is correct
137 Correct 327 ms 54352 KB Output is correct
138 Correct 359 ms 55112 KB Output is correct
139 Correct 309 ms 55064 KB Output is correct
140 Correct 293 ms 55116 KB Output is correct
141 Correct 355 ms 55200 KB Output is correct
142 Correct 364 ms 55052 KB Output is correct
143 Correct 350 ms 55112 KB Output is correct
144 Correct 335 ms 55112 KB Output is correct
145 Correct 324 ms 55112 KB Output is correct
146 Correct 319 ms 55112 KB Output is correct
147 Correct 325 ms 55120 KB Output is correct
148 Correct 318 ms 55384 KB Output is correct
149 Correct 314 ms 55072 KB Output is correct
150 Correct 155 ms 50288 KB Output is correct
151 Correct 243 ms 55368 KB Output is correct
152 Correct 267 ms 55368 KB Output is correct
153 Correct 291 ms 56020 KB Output is correct