Submission #914783

# Submission time Handle Problem Language Result Execution time Memory
914783 2024-01-22T16:34:53 Z vjudge1 Radio Towers (IOI22_towers) C++17
100 / 100
978 ms 66336 KB
#include "towers.h"

#include <bits/stdc++.h>
using namespace std;
typedef int ll;
using pl = pair<ll, ll>;
using vl = vector<ll>;
#define F(i, l, r) for (ll i = ll(l); i < ll(r); ++i)
#define FD(i, l, r) for (ll i = ll(l); i > ll(r); --i)
#define A(a) (a).begin(), (a).end()
#define K first
#define V second

template<typename T> struct SparseTable {
    int n,log2=0;
    function<T(T, T)> merge;
    T id ;
    vector<vector<T>> a = {{}};
    SparseTable(const vector<T>& v, function<T(T, T)> _merge, T _id): merge(_merge), id(_id) {
        n = v.size();
        while((1<<log2) <= n) {
            ++log2;
        }
        a.resize(log2);
        a[0] = v;
        for(int i=1,len=1;i<log2;++i,len*=2) {
            a[i].resize(n + 1 - (1<<i));
            for(size_t j=0;j<a[i].size();++j) {
                a[i][j] = merge(a[i-1][j], a[i-1][j + len]);
            }
        }
    }
    SparseTable(){}
    T query(int l, int r) { // [l,r)
        if (r <= l) return id;
        int len = __lg(r-l);
        return merge(a[len][l], a[len][r- (1<<len)]);
    }   
};

SparseTable<ll> spmin;
 

const int MAXN = 100010, INF = 1000000010;

namespace seg {
    struct node{
        vector<pl> vec;
        vector<int> mn, mx;
        node(){};
        node(int value, int pos){
            vec.emplace_back(value, pos);
            mn.push_back(pos);
            mx.push_back(pos);
        }
        node(node& a, node& b){
            vec.resize(a.vec.size() + b.vec.size());
            mn.resize(vec.size());
            mx.resize(vec.size());
            merge(a.vec.begin(), a.vec.end(), b.vec.begin(), b.vec.end(), vec.begin());
            int mi=MAXN, ma=-1;
            FD(i, ll(vec.size())-1, -1) {
                mi=min(mi, vec[i].V);
                ma=max(ma, vec[i].V);
                mn[i]=mi, mx[i]=ma;
            }
        }
    };

    node tr[2*MAXN];

    pair<int, pl> query(int l, int r, int x){
        int ret=0, mn=INF, mx=-1;

        auto handle = [&](node& cur) {
            auto itr = lower_bound(A(cur.vec), pair(x, -1));
            int pos = (int)(itr - cur.vec.begin());
            ret += (int)(cur.vec.end() - itr);
            if(itr!=cur.vec.end()) mn=min(mn, cur.mn[pos]), mx=max(mx, cur.mx[pos]);
        };

        for(l+=MAXN, r+=MAXN; l<r; l>>=1, r>>=1){
            if(l&1) handle(tr[l++]);
            if(r&1) handle(tr[--r]);
        }

        return {ret, {mn, mx}};
    }

    void build(vl res) {
        F(i, 0, res.size()) seg::tr[MAXN+i]=seg::node(res[i], i);
        FD(i, MAXN-1, -1) tr[i]=node(tr[i<<1], tr[i<<1|1]);
    }
}
 
 
int arr[MAXN];
 
void init(int n, vector<int> H) {
    vl maxl(n), maxr(n);
    copy(A(H), arr);

    spmin = SparseTable<ll>(H, [](ll a, ll b) {
        return min(a, b);
    }, INF);

    F(i, 0, n) {
        int x;
        for(x=i-1; x!=-1 && H[x]<H[i]; x=maxl[x]);
        maxl[i]=x;

        if (~x) assert(H[x] > H[i]);
    }

    FD(i, n-1, -1) {
        int x;
        for(x=i+1; x!=n && H[x]<H[i]; x=maxr[x]);
        maxr[i]=x;
    }

    vl res(n);

    F(i, 0, n) {
        int l = maxl[i], r = maxr[i];
        int a = H[i] - spmin.query(l+1, i);
        int b = H[i] - spmin.query(i+1, r);
        res[i] = min(a, b);
    }

    seg::build(res);
}
 
int max_towers(int L, int R, int D) {
  pair<int, pl> ans = seg::query(L, R+1, D);
  if(ans.K == 0) return 1;
  int sa = (spmin.query(L, ans.V.K) > arr[ans.V.K] - D);
  int sb = (spmin.query(ans.V.V+1, R+1) > arr[ans.V.V] - D);
  return max(0, ans.K - sa - sb) + 1;
}
# Verdict Execution time Memory Grader output
1 Correct 341 ms 44940 KB Output is correct
2 Correct 691 ms 65808 KB Output is correct
3 Correct 655 ms 65976 KB Output is correct
4 Correct 716 ms 66336 KB Output is correct
5 Correct 682 ms 65828 KB Output is correct
6 Correct 673 ms 66000 KB Output is correct
7 Correct 673 ms 65824 KB Output is correct
8 Correct 5 ms 14680 KB Output is correct
9 Correct 7 ms 15704 KB Output is correct
10 Correct 8 ms 15704 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 14936 KB Output is correct
2 Correct 8 ms 15704 KB Output is correct
3 Correct 7 ms 15704 KB Output is correct
4 Correct 7 ms 15668 KB Output is correct
5 Correct 8 ms 15704 KB Output is correct
6 Correct 7 ms 15696 KB Output is correct
7 Correct 7 ms 15700 KB Output is correct
8 Correct 7 ms 15448 KB Output is correct
9 Correct 9 ms 15704 KB Output is correct
10 Correct 7 ms 15704 KB Output is correct
11 Correct 7 ms 15544 KB Output is correct
12 Correct 7 ms 14740 KB Output is correct
13 Correct 7 ms 15580 KB Output is correct
14 Correct 7 ms 15704 KB Output is correct
15 Correct 8 ms 15960 KB Output is correct
16 Correct 7 ms 15704 KB Output is correct
17 Correct 8 ms 15676 KB Output is correct
18 Correct 7 ms 15704 KB Output is correct
19 Correct 7 ms 15704 KB Output is correct
20 Correct 7 ms 15464 KB Output is correct
21 Correct 7 ms 15704 KB Output is correct
22 Correct 7 ms 15704 KB Output is correct
23 Correct 7 ms 15704 KB Output is correct
24 Correct 8 ms 15624 KB Output is correct
25 Correct 6 ms 14936 KB Output is correct
26 Correct 8 ms 15704 KB Output is correct
27 Correct 7 ms 15704 KB Output is correct
28 Correct 7 ms 15572 KB Output is correct
29 Correct 7 ms 15704 KB Output is correct
30 Correct 7 ms 15704 KB Output is correct
31 Correct 7 ms 15448 KB Output is correct
32 Correct 6 ms 15704 KB Output is correct
33 Correct 7 ms 15704 KB Output is correct
34 Correct 7 ms 15704 KB Output is correct
35 Correct 7 ms 15704 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 14936 KB Output is correct
2 Correct 8 ms 15704 KB Output is correct
3 Correct 7 ms 15704 KB Output is correct
4 Correct 7 ms 15668 KB Output is correct
5 Correct 8 ms 15704 KB Output is correct
6 Correct 7 ms 15696 KB Output is correct
7 Correct 7 ms 15700 KB Output is correct
8 Correct 7 ms 15448 KB Output is correct
9 Correct 9 ms 15704 KB Output is correct
10 Correct 7 ms 15704 KB Output is correct
11 Correct 7 ms 15544 KB Output is correct
12 Correct 7 ms 14740 KB Output is correct
13 Correct 7 ms 15580 KB Output is correct
14 Correct 7 ms 15704 KB Output is correct
15 Correct 8 ms 15960 KB Output is correct
16 Correct 7 ms 15704 KB Output is correct
17 Correct 8 ms 15676 KB Output is correct
18 Correct 7 ms 15704 KB Output is correct
19 Correct 7 ms 15704 KB Output is correct
20 Correct 7 ms 15464 KB Output is correct
21 Correct 7 ms 15704 KB Output is correct
22 Correct 7 ms 15704 KB Output is correct
23 Correct 7 ms 15704 KB Output is correct
24 Correct 8 ms 15624 KB Output is correct
25 Correct 6 ms 14936 KB Output is correct
26 Correct 8 ms 15704 KB Output is correct
27 Correct 7 ms 15704 KB Output is correct
28 Correct 7 ms 15572 KB Output is correct
29 Correct 7 ms 15704 KB Output is correct
30 Correct 7 ms 15704 KB Output is correct
31 Correct 7 ms 15448 KB Output is correct
32 Correct 6 ms 15704 KB Output is correct
33 Correct 7 ms 15704 KB Output is correct
34 Correct 7 ms 15704 KB Output is correct
35 Correct 7 ms 15704 KB Output is correct
36 Correct 54 ms 47768 KB Output is correct
37 Correct 83 ms 65892 KB Output is correct
38 Correct 81 ms 65812 KB Output is correct
39 Correct 79 ms 65844 KB Output is correct
40 Correct 80 ms 65828 KB Output is correct
41 Correct 82 ms 65816 KB Output is correct
42 Correct 81 ms 65872 KB Output is correct
43 Correct 74 ms 65828 KB Output is correct
44 Correct 73 ms 65828 KB Output is correct
45 Correct 74 ms 65816 KB Output is correct
46 Correct 75 ms 65812 KB Output is correct
47 Correct 82 ms 65860 KB Output is correct
48 Correct 79 ms 65872 KB Output is correct
49 Correct 80 ms 65832 KB Output is correct
50 Correct 75 ms 66020 KB Output is correct
51 Correct 76 ms 65972 KB Output is correct
52 Correct 87 ms 65900 KB Output is correct
53 Correct 80 ms 66048 KB Output is correct
54 Correct 84 ms 65816 KB Output is correct
55 Correct 80 ms 65960 KB Output is correct
56 Correct 75 ms 65944 KB Output is correct
57 Correct 81 ms 64280 KB Output is correct
58 Correct 82 ms 65808 KB Output is correct
59 Correct 81 ms 65872 KB Output is correct
60 Correct 79 ms 65832 KB Output is correct
61 Correct 83 ms 65816 KB Output is correct
62 Correct 83 ms 65876 KB Output is correct
63 Correct 81 ms 65812 KB Output is correct
64 Correct 72 ms 65832 KB Output is correct
65 Correct 75 ms 65808 KB Output is correct
66 Correct 83 ms 66156 KB Output is correct
67 Correct 76 ms 65832 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 624 ms 65392 KB Output is correct
2 Correct 756 ms 65824 KB Output is correct
3 Correct 724 ms 65808 KB Output is correct
4 Correct 705 ms 66024 KB Output is correct
5 Correct 707 ms 65828 KB Output is correct
6 Correct 689 ms 65960 KB Output is correct
7 Correct 693 ms 65952 KB Output is correct
8 Correct 652 ms 65832 KB Output is correct
9 Correct 658 ms 65808 KB Output is correct
10 Correct 671 ms 65812 KB Output is correct
11 Correct 685 ms 65812 KB Output is correct
12 Correct 669 ms 65896 KB Output is correct
13 Correct 676 ms 66080 KB Output is correct
14 Correct 5 ms 14680 KB Output is correct
15 Correct 7 ms 15704 KB Output is correct
16 Correct 8 ms 15448 KB Output is correct
17 Correct 83 ms 65828 KB Output is correct
18 Correct 83 ms 65828 KB Output is correct
19 Correct 81 ms 66080 KB Output is correct
20 Correct 75 ms 65828 KB Output is correct
21 Correct 74 ms 65956 KB Output is correct
22 Correct 82 ms 65816 KB Output is correct
23 Correct 85 ms 65924 KB Output is correct
24 Correct 82 ms 65828 KB Output is correct
25 Correct 75 ms 65828 KB Output is correct
26 Correct 75 ms 65824 KB Output is correct
27 Correct 7 ms 15648 KB Output is correct
28 Correct 7 ms 15704 KB Output is correct
29 Correct 7 ms 15704 KB Output is correct
30 Correct 7 ms 15704 KB Output is correct
31 Correct 8 ms 15960 KB Output is correct
32 Correct 7 ms 15716 KB Output is correct
33 Correct 7 ms 15524 KB Output is correct
34 Correct 7 ms 15704 KB Output is correct
35 Correct 7 ms 15704 KB Output is correct
36 Correct 8 ms 15448 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 202 ms 26580 KB Output is correct
2 Correct 666 ms 65828 KB Output is correct
3 Correct 703 ms 65952 KB Output is correct
4 Correct 681 ms 65832 KB Output is correct
5 Correct 660 ms 65820 KB Output is correct
6 Correct 666 ms 65824 KB Output is correct
7 Correct 687 ms 65892 KB Output is correct
8 Correct 575 ms 65828 KB Output is correct
9 Correct 600 ms 65816 KB Output is correct
10 Correct 583 ms 65832 KB Output is correct
11 Correct 607 ms 66000 KB Output is correct
12 Correct 83 ms 65880 KB Output is correct
13 Correct 83 ms 65828 KB Output is correct
14 Correct 82 ms 65932 KB Output is correct
15 Correct 76 ms 65868 KB Output is correct
16 Correct 78 ms 65832 KB Output is correct
17 Correct 80 ms 64280 KB Output is correct
18 Correct 87 ms 65956 KB Output is correct
19 Correct 82 ms 65928 KB Output is correct
20 Correct 83 ms 65832 KB Output is correct
21 Correct 83 ms 65816 KB Output is correct
22 Correct 83 ms 66072 KB Output is correct
23 Correct 80 ms 65884 KB Output is correct
24 Correct 74 ms 65832 KB Output is correct
25 Correct 74 ms 65872 KB Output is correct
26 Correct 74 ms 66004 KB Output is correct
27 Correct 78 ms 65812 KB Output is correct
28 Correct 8 ms 15708 KB Output is correct
29 Correct 7 ms 15448 KB Output is correct
30 Correct 7 ms 15704 KB Output is correct
31 Correct 7 ms 15960 KB Output is correct
32 Correct 7 ms 15668 KB Output is correct
33 Correct 9 ms 15292 KB Output is correct
34 Correct 7 ms 15704 KB Output is correct
35 Correct 8 ms 15704 KB Output is correct
36 Correct 7 ms 15964 KB Output is correct
37 Correct 7 ms 15704 KB Output is correct
38 Correct 7 ms 15544 KB Output is correct
39 Correct 7 ms 15704 KB Output is correct
40 Correct 7 ms 15716 KB Output is correct
41 Correct 7 ms 15704 KB Output is correct
42 Correct 10 ms 16216 KB Output is correct
43 Correct 7 ms 15672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 14936 KB Output is correct
2 Correct 8 ms 15704 KB Output is correct
3 Correct 7 ms 15704 KB Output is correct
4 Correct 7 ms 15668 KB Output is correct
5 Correct 8 ms 15704 KB Output is correct
6 Correct 7 ms 15696 KB Output is correct
7 Correct 7 ms 15700 KB Output is correct
8 Correct 7 ms 15448 KB Output is correct
9 Correct 9 ms 15704 KB Output is correct
10 Correct 7 ms 15704 KB Output is correct
11 Correct 7 ms 15544 KB Output is correct
12 Correct 7 ms 14740 KB Output is correct
13 Correct 7 ms 15580 KB Output is correct
14 Correct 7 ms 15704 KB Output is correct
15 Correct 8 ms 15960 KB Output is correct
16 Correct 7 ms 15704 KB Output is correct
17 Correct 8 ms 15676 KB Output is correct
18 Correct 7 ms 15704 KB Output is correct
19 Correct 7 ms 15704 KB Output is correct
20 Correct 7 ms 15464 KB Output is correct
21 Correct 7 ms 15704 KB Output is correct
22 Correct 7 ms 15704 KB Output is correct
23 Correct 7 ms 15704 KB Output is correct
24 Correct 8 ms 15624 KB Output is correct
25 Correct 6 ms 14936 KB Output is correct
26 Correct 8 ms 15704 KB Output is correct
27 Correct 7 ms 15704 KB Output is correct
28 Correct 7 ms 15572 KB Output is correct
29 Correct 7 ms 15704 KB Output is correct
30 Correct 7 ms 15704 KB Output is correct
31 Correct 7 ms 15448 KB Output is correct
32 Correct 6 ms 15704 KB Output is correct
33 Correct 7 ms 15704 KB Output is correct
34 Correct 7 ms 15704 KB Output is correct
35 Correct 7 ms 15704 KB Output is correct
36 Correct 54 ms 47768 KB Output is correct
37 Correct 83 ms 65892 KB Output is correct
38 Correct 81 ms 65812 KB Output is correct
39 Correct 79 ms 65844 KB Output is correct
40 Correct 80 ms 65828 KB Output is correct
41 Correct 82 ms 65816 KB Output is correct
42 Correct 81 ms 65872 KB Output is correct
43 Correct 74 ms 65828 KB Output is correct
44 Correct 73 ms 65828 KB Output is correct
45 Correct 74 ms 65816 KB Output is correct
46 Correct 75 ms 65812 KB Output is correct
47 Correct 82 ms 65860 KB Output is correct
48 Correct 79 ms 65872 KB Output is correct
49 Correct 80 ms 65832 KB Output is correct
50 Correct 75 ms 66020 KB Output is correct
51 Correct 76 ms 65972 KB Output is correct
52 Correct 87 ms 65900 KB Output is correct
53 Correct 80 ms 66048 KB Output is correct
54 Correct 84 ms 65816 KB Output is correct
55 Correct 80 ms 65960 KB Output is correct
56 Correct 75 ms 65944 KB Output is correct
57 Correct 81 ms 64280 KB Output is correct
58 Correct 82 ms 65808 KB Output is correct
59 Correct 81 ms 65872 KB Output is correct
60 Correct 79 ms 65832 KB Output is correct
61 Correct 83 ms 65816 KB Output is correct
62 Correct 83 ms 65876 KB Output is correct
63 Correct 81 ms 65812 KB Output is correct
64 Correct 72 ms 65832 KB Output is correct
65 Correct 75 ms 65808 KB Output is correct
66 Correct 83 ms 66156 KB Output is correct
67 Correct 76 ms 65832 KB Output is correct
68 Correct 624 ms 65392 KB Output is correct
69 Correct 756 ms 65824 KB Output is correct
70 Correct 724 ms 65808 KB Output is correct
71 Correct 705 ms 66024 KB Output is correct
72 Correct 707 ms 65828 KB Output is correct
73 Correct 689 ms 65960 KB Output is correct
74 Correct 693 ms 65952 KB Output is correct
75 Correct 652 ms 65832 KB Output is correct
76 Correct 658 ms 65808 KB Output is correct
77 Correct 671 ms 65812 KB Output is correct
78 Correct 685 ms 65812 KB Output is correct
79 Correct 669 ms 65896 KB Output is correct
80 Correct 676 ms 66080 KB Output is correct
81 Correct 5 ms 14680 KB Output is correct
82 Correct 7 ms 15704 KB Output is correct
83 Correct 8 ms 15448 KB Output is correct
84 Correct 83 ms 65828 KB Output is correct
85 Correct 83 ms 65828 KB Output is correct
86 Correct 81 ms 66080 KB Output is correct
87 Correct 75 ms 65828 KB Output is correct
88 Correct 74 ms 65956 KB Output is correct
89 Correct 82 ms 65816 KB Output is correct
90 Correct 85 ms 65924 KB Output is correct
91 Correct 82 ms 65828 KB Output is correct
92 Correct 75 ms 65828 KB Output is correct
93 Correct 75 ms 65824 KB Output is correct
94 Correct 7 ms 15648 KB Output is correct
95 Correct 7 ms 15704 KB Output is correct
96 Correct 7 ms 15704 KB Output is correct
97 Correct 7 ms 15704 KB Output is correct
98 Correct 8 ms 15960 KB Output is correct
99 Correct 7 ms 15716 KB Output is correct
100 Correct 7 ms 15524 KB Output is correct
101 Correct 7 ms 15704 KB Output is correct
102 Correct 7 ms 15704 KB Output is correct
103 Correct 8 ms 15448 KB Output is correct
104 Correct 645 ms 60396 KB Output is correct
105 Correct 810 ms 65812 KB Output is correct
106 Correct 798 ms 65812 KB Output is correct
107 Correct 821 ms 65812 KB Output is correct
108 Correct 801 ms 66032 KB Output is correct
109 Correct 814 ms 65976 KB Output is correct
110 Correct 768 ms 65812 KB Output is correct
111 Correct 682 ms 65984 KB Output is correct
112 Correct 747 ms 65828 KB Output is correct
113 Correct 751 ms 65832 KB Output is correct
114 Correct 777 ms 65872 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 341 ms 44940 KB Output is correct
2 Correct 691 ms 65808 KB Output is correct
3 Correct 655 ms 65976 KB Output is correct
4 Correct 716 ms 66336 KB Output is correct
5 Correct 682 ms 65828 KB Output is correct
6 Correct 673 ms 66000 KB Output is correct
7 Correct 673 ms 65824 KB Output is correct
8 Correct 5 ms 14680 KB Output is correct
9 Correct 7 ms 15704 KB Output is correct
10 Correct 8 ms 15704 KB Output is correct
11 Correct 6 ms 14936 KB Output is correct
12 Correct 8 ms 15704 KB Output is correct
13 Correct 7 ms 15704 KB Output is correct
14 Correct 7 ms 15668 KB Output is correct
15 Correct 8 ms 15704 KB Output is correct
16 Correct 7 ms 15696 KB Output is correct
17 Correct 7 ms 15700 KB Output is correct
18 Correct 7 ms 15448 KB Output is correct
19 Correct 9 ms 15704 KB Output is correct
20 Correct 7 ms 15704 KB Output is correct
21 Correct 7 ms 15544 KB Output is correct
22 Correct 7 ms 14740 KB Output is correct
23 Correct 7 ms 15580 KB Output is correct
24 Correct 7 ms 15704 KB Output is correct
25 Correct 8 ms 15960 KB Output is correct
26 Correct 7 ms 15704 KB Output is correct
27 Correct 8 ms 15676 KB Output is correct
28 Correct 7 ms 15704 KB Output is correct
29 Correct 7 ms 15704 KB Output is correct
30 Correct 7 ms 15464 KB Output is correct
31 Correct 7 ms 15704 KB Output is correct
32 Correct 7 ms 15704 KB Output is correct
33 Correct 7 ms 15704 KB Output is correct
34 Correct 8 ms 15624 KB Output is correct
35 Correct 6 ms 14936 KB Output is correct
36 Correct 8 ms 15704 KB Output is correct
37 Correct 7 ms 15704 KB Output is correct
38 Correct 7 ms 15572 KB Output is correct
39 Correct 7 ms 15704 KB Output is correct
40 Correct 7 ms 15704 KB Output is correct
41 Correct 7 ms 15448 KB Output is correct
42 Correct 6 ms 15704 KB Output is correct
43 Correct 7 ms 15704 KB Output is correct
44 Correct 7 ms 15704 KB Output is correct
45 Correct 7 ms 15704 KB Output is correct
46 Correct 54 ms 47768 KB Output is correct
47 Correct 83 ms 65892 KB Output is correct
48 Correct 81 ms 65812 KB Output is correct
49 Correct 79 ms 65844 KB Output is correct
50 Correct 80 ms 65828 KB Output is correct
51 Correct 82 ms 65816 KB Output is correct
52 Correct 81 ms 65872 KB Output is correct
53 Correct 74 ms 65828 KB Output is correct
54 Correct 73 ms 65828 KB Output is correct
55 Correct 74 ms 65816 KB Output is correct
56 Correct 75 ms 65812 KB Output is correct
57 Correct 82 ms 65860 KB Output is correct
58 Correct 79 ms 65872 KB Output is correct
59 Correct 80 ms 65832 KB Output is correct
60 Correct 75 ms 66020 KB Output is correct
61 Correct 76 ms 65972 KB Output is correct
62 Correct 87 ms 65900 KB Output is correct
63 Correct 80 ms 66048 KB Output is correct
64 Correct 84 ms 65816 KB Output is correct
65 Correct 80 ms 65960 KB Output is correct
66 Correct 75 ms 65944 KB Output is correct
67 Correct 81 ms 64280 KB Output is correct
68 Correct 82 ms 65808 KB Output is correct
69 Correct 81 ms 65872 KB Output is correct
70 Correct 79 ms 65832 KB Output is correct
71 Correct 83 ms 65816 KB Output is correct
72 Correct 83 ms 65876 KB Output is correct
73 Correct 81 ms 65812 KB Output is correct
74 Correct 72 ms 65832 KB Output is correct
75 Correct 75 ms 65808 KB Output is correct
76 Correct 83 ms 66156 KB Output is correct
77 Correct 76 ms 65832 KB Output is correct
78 Correct 624 ms 65392 KB Output is correct
79 Correct 756 ms 65824 KB Output is correct
80 Correct 724 ms 65808 KB Output is correct
81 Correct 705 ms 66024 KB Output is correct
82 Correct 707 ms 65828 KB Output is correct
83 Correct 689 ms 65960 KB Output is correct
84 Correct 693 ms 65952 KB Output is correct
85 Correct 652 ms 65832 KB Output is correct
86 Correct 658 ms 65808 KB Output is correct
87 Correct 671 ms 65812 KB Output is correct
88 Correct 685 ms 65812 KB Output is correct
89 Correct 669 ms 65896 KB Output is correct
90 Correct 676 ms 66080 KB Output is correct
91 Correct 5 ms 14680 KB Output is correct
92 Correct 7 ms 15704 KB Output is correct
93 Correct 8 ms 15448 KB Output is correct
94 Correct 83 ms 65828 KB Output is correct
95 Correct 83 ms 65828 KB Output is correct
96 Correct 81 ms 66080 KB Output is correct
97 Correct 75 ms 65828 KB Output is correct
98 Correct 74 ms 65956 KB Output is correct
99 Correct 82 ms 65816 KB Output is correct
100 Correct 85 ms 65924 KB Output is correct
101 Correct 82 ms 65828 KB Output is correct
102 Correct 75 ms 65828 KB Output is correct
103 Correct 75 ms 65824 KB Output is correct
104 Correct 7 ms 15648 KB Output is correct
105 Correct 7 ms 15704 KB Output is correct
106 Correct 7 ms 15704 KB Output is correct
107 Correct 7 ms 15704 KB Output is correct
108 Correct 8 ms 15960 KB Output is correct
109 Correct 7 ms 15716 KB Output is correct
110 Correct 7 ms 15524 KB Output is correct
111 Correct 7 ms 15704 KB Output is correct
112 Correct 7 ms 15704 KB Output is correct
113 Correct 8 ms 15448 KB Output is correct
114 Correct 202 ms 26580 KB Output is correct
115 Correct 666 ms 65828 KB Output is correct
116 Correct 703 ms 65952 KB Output is correct
117 Correct 681 ms 65832 KB Output is correct
118 Correct 660 ms 65820 KB Output is correct
119 Correct 666 ms 65824 KB Output is correct
120 Correct 687 ms 65892 KB Output is correct
121 Correct 575 ms 65828 KB Output is correct
122 Correct 600 ms 65816 KB Output is correct
123 Correct 583 ms 65832 KB Output is correct
124 Correct 607 ms 66000 KB Output is correct
125 Correct 83 ms 65880 KB Output is correct
126 Correct 83 ms 65828 KB Output is correct
127 Correct 82 ms 65932 KB Output is correct
128 Correct 76 ms 65868 KB Output is correct
129 Correct 78 ms 65832 KB Output is correct
130 Correct 80 ms 64280 KB Output is correct
131 Correct 87 ms 65956 KB Output is correct
132 Correct 82 ms 65928 KB Output is correct
133 Correct 83 ms 65832 KB Output is correct
134 Correct 83 ms 65816 KB Output is correct
135 Correct 83 ms 66072 KB Output is correct
136 Correct 80 ms 65884 KB Output is correct
137 Correct 74 ms 65832 KB Output is correct
138 Correct 74 ms 65872 KB Output is correct
139 Correct 74 ms 66004 KB Output is correct
140 Correct 78 ms 65812 KB Output is correct
141 Correct 8 ms 15708 KB Output is correct
142 Correct 7 ms 15448 KB Output is correct
143 Correct 7 ms 15704 KB Output is correct
144 Correct 7 ms 15960 KB Output is correct
145 Correct 7 ms 15668 KB Output is correct
146 Correct 9 ms 15292 KB Output is correct
147 Correct 7 ms 15704 KB Output is correct
148 Correct 8 ms 15704 KB Output is correct
149 Correct 7 ms 15964 KB Output is correct
150 Correct 7 ms 15704 KB Output is correct
151 Correct 7 ms 15544 KB Output is correct
152 Correct 7 ms 15704 KB Output is correct
153 Correct 7 ms 15716 KB Output is correct
154 Correct 7 ms 15704 KB Output is correct
155 Correct 10 ms 16216 KB Output is correct
156 Correct 7 ms 15672 KB Output is correct
157 Correct 645 ms 60396 KB Output is correct
158 Correct 810 ms 65812 KB Output is correct
159 Correct 798 ms 65812 KB Output is correct
160 Correct 821 ms 65812 KB Output is correct
161 Correct 801 ms 66032 KB Output is correct
162 Correct 814 ms 65976 KB Output is correct
163 Correct 768 ms 65812 KB Output is correct
164 Correct 682 ms 65984 KB Output is correct
165 Correct 747 ms 65828 KB Output is correct
166 Correct 751 ms 65832 KB Output is correct
167 Correct 777 ms 65872 KB Output is correct
168 Correct 5 ms 14680 KB Output is correct
169 Correct 522 ms 32032 KB Output is correct
170 Correct 897 ms 65840 KB Output is correct
171 Correct 978 ms 65976 KB Output is correct
172 Correct 906 ms 65928 KB Output is correct
173 Correct 905 ms 65860 KB Output is correct
174 Correct 876 ms 65816 KB Output is correct
175 Correct 859 ms 65824 KB Output is correct
176 Correct 740 ms 65828 KB Output is correct
177 Correct 673 ms 65824 KB Output is correct
178 Correct 726 ms 65828 KB Output is correct
179 Correct 652 ms 65828 KB Output is correct