Submission #1076757

# Submission time Handle Problem Language Result Execution time Memory
1076757 2024-08-26T16:13:32 Z vjudge1 Radio Towers (IOI22_towers) C++17
100 / 100
2526 ms 80976 KB
#include "towers.h"
#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,avx2")


using namespace std;

using vi = vector<int>;
const int INF = 1e9;

int n;
vi H;

vi St, Dr;
vi DeltaSt, DeltaDr;

struct RMQ {
    int n;
    vector<vi> A;
    RMQ(vi V0) : n((int)V0.size()) {
        A.push_back(V0);
        for(int k = 1; (1 << k) <= n; ++k) {
            A.push_back(A.back());
            for(int i = 0; i < n; ++i) {
                if(i + (1 << (k - 1)) < n)
                    A[k][i] = max(A[k][i], A[k - 1][i + (1 << (k - 1))]);
            }
        }
    }

    int query(int l, int r) {
        int d = 31 - __builtin_clz(r - l + 1);
        return max(A[d][l], A[d][r - (1 << d) + 1]);
    }
};

pair<vi, vi> descomp(vi A) {
    RMQ R(A);
    vi Ant(n, -1);
    vi Delta(n, INF); /// cel mai mare delta posibil
    stack<int> S;
    for(int i = 0; i < n; ++i) {
        while(!S.empty() && A[S.top()] > A[i]) {
            S.pop();
        }
        if(!S.empty()) {
            Ant[i] = S.top();
            Delta[i] = R.query(S.top(), i) - A[i];
        }
        S.push(i);
    }
    return make_pair(Ant, Delta);
}

vi S;

const int MN = 100000;

struct AIB2D {
    int n;
    vi V[4 * MN];
    AIB2D() {}
    AIB2D(const vi &V0) : n((int)V0.size()) {
        build(V0, 1, 0, n - 1);
    }

    void build(const vi &V0, int u, int s, int d) {
        for(int i = s; i <= d; ++i)
            V[u].push_back(V0[i]);
        sort(V[u].begin(), V[u].end());
        if(s != d) {
            build(V0, u << 1, s, (s + d) >> 1);
            build(V0, u << 1 | 1, ((s + d) >> 1) + 1, d);
        }
    }
    int query(int l, int r, int D, int u, int s, int d) {
        if(d < l || r < s) return 0;
        if(l <= s && d <= r) {
            int v = lower_bound(V[u].begin(), V[u].end(), D) - V[u].begin();
            return int(V[u].size()) - v;
        }
        return query(l, r, D, u << 1, s, (s + d) >> 1)
            + query(l, r, D, u << 1 | 1, ((s + d) >> 1) + 1, d);
    }
    int query(int l, int r, int D) {
        return query(l, r, D, 1, 0, n - 1);
    }
};

AIB2D ASt, ADr;
AIB2D ATot;


void init(int N0, vi H0) {
    n = N0;
    H = H0;

    tie(St, DeltaSt) = descomp(H);
    reverse(H.begin(), H.end());
    tie(Dr, DeltaDr) = descomp(H);
    reverse(H.begin(), H.end());
    reverse(Dr.begin(), Dr.end());
    reverse(DeltaDr.begin(), DeltaDr.end());
    for(auto &it : Dr) 
        it = n - it - 1;
    S.resize(n);
    for(int i = 0; i < n; ++i)
        S[i] = min(DeltaSt[i], DeltaDr[i]);
    ASt = AIB2D(DeltaSt);
    ADr = AIB2D(DeltaDr);
    ATot = AIB2D(S);
}


int max_towers(int l, int r, int D) {
    int v = ATot.query(l, r, D);
    if(v == 0) {
        ///poate gasim un SolDr >= D si dupa un SolSt >= D
        int st = l, dr = r, mij;
        if(ADr.query(l, r, D) == 0) return 1;
        while(st < dr) {
            mij = (st + dr) / 2;
            if(ADr.query(l, r, D)) dr = mij;
            else st = mij + 1;
        }
        if(ASt.query(st + 1, r, D)) return 2;
        return 1;
    }
    int st, dr, mij;

    int p1;
    st = l, dr = r;
    while(st < dr) {
        mij = (st + dr) / 2;
        if(ATot.query(l, mij, D)) dr = mij;
        else st = mij + 1;
    }
    p1 = st;

    int p2;
    st = l; dr = r;
    while(st < dr) {
        mij = (st + dr + 1) / 2;
        if(ATot.query(mij, r, D)) st = mij;
        else dr = mij - 1;
    }
    p2 = st;

    int found_st = 0, found_dr = 0;
    found_st = !!ADr.query(l, p1 - 1, D);
    found_dr = !!ASt.query(p2 + 1, r, D);
    return v + found_st + found_dr;
}
# Verdict Execution time Memory Grader output
1 Correct 573 ms 60848 KB Output is correct
2 Correct 1366 ms 80668 KB Output is correct
3 Correct 1389 ms 80684 KB Output is correct
4 Correct 1395 ms 80508 KB Output is correct
5 Correct 1178 ms 80684 KB Output is correct
6 Correct 1395 ms 80592 KB Output is correct
7 Correct 1093 ms 80748 KB Output is correct
8 Correct 22 ms 37976 KB Output is correct
9 Correct 22 ms 38372 KB Output is correct
10 Correct 26 ms 38488 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 35 ms 37972 KB Output is correct
2 Correct 36 ms 38480 KB Output is correct
3 Correct 25 ms 38488 KB Output is correct
4 Correct 25 ms 38480 KB Output is correct
5 Correct 27 ms 38488 KB Output is correct
6 Correct 37 ms 38480 KB Output is correct
7 Correct 24 ms 38740 KB Output is correct
8 Correct 24 ms 38488 KB Output is correct
9 Correct 23 ms 38424 KB Output is correct
10 Correct 29 ms 38568 KB Output is correct
11 Correct 23 ms 38488 KB Output is correct
12 Correct 22 ms 37976 KB Output is correct
13 Correct 24 ms 38488 KB Output is correct
14 Correct 23 ms 38408 KB Output is correct
15 Correct 25 ms 38488 KB Output is correct
16 Correct 24 ms 38488 KB Output is correct
17 Correct 25 ms 38488 KB Output is correct
18 Correct 27 ms 38488 KB Output is correct
19 Correct 24 ms 38488 KB Output is correct
20 Correct 25 ms 38488 KB Output is correct
21 Correct 24 ms 38444 KB Output is correct
22 Correct 23 ms 38488 KB Output is correct
23 Correct 23 ms 38488 KB Output is correct
24 Correct 25 ms 38628 KB Output is correct
25 Correct 24 ms 38232 KB Output is correct
26 Correct 26 ms 38460 KB Output is correct
27 Correct 26 ms 38412 KB Output is correct
28 Correct 24 ms 38624 KB Output is correct
29 Correct 23 ms 38488 KB Output is correct
30 Correct 26 ms 38488 KB Output is correct
31 Correct 24 ms 38488 KB Output is correct
32 Correct 23 ms 38480 KB Output is correct
33 Correct 23 ms 38488 KB Output is correct
34 Correct 25 ms 38488 KB Output is correct
35 Correct 24 ms 38504 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 35 ms 37972 KB Output is correct
2 Correct 36 ms 38480 KB Output is correct
3 Correct 25 ms 38488 KB Output is correct
4 Correct 25 ms 38480 KB Output is correct
5 Correct 27 ms 38488 KB Output is correct
6 Correct 37 ms 38480 KB Output is correct
7 Correct 24 ms 38740 KB Output is correct
8 Correct 24 ms 38488 KB Output is correct
9 Correct 23 ms 38424 KB Output is correct
10 Correct 29 ms 38568 KB Output is correct
11 Correct 23 ms 38488 KB Output is correct
12 Correct 22 ms 37976 KB Output is correct
13 Correct 24 ms 38488 KB Output is correct
14 Correct 23 ms 38408 KB Output is correct
15 Correct 25 ms 38488 KB Output is correct
16 Correct 24 ms 38488 KB Output is correct
17 Correct 25 ms 38488 KB Output is correct
18 Correct 27 ms 38488 KB Output is correct
19 Correct 24 ms 38488 KB Output is correct
20 Correct 25 ms 38488 KB Output is correct
21 Correct 24 ms 38444 KB Output is correct
22 Correct 23 ms 38488 KB Output is correct
23 Correct 23 ms 38488 KB Output is correct
24 Correct 25 ms 38628 KB Output is correct
25 Correct 24 ms 38232 KB Output is correct
26 Correct 26 ms 38460 KB Output is correct
27 Correct 26 ms 38412 KB Output is correct
28 Correct 24 ms 38624 KB Output is correct
29 Correct 23 ms 38488 KB Output is correct
30 Correct 26 ms 38488 KB Output is correct
31 Correct 24 ms 38488 KB Output is correct
32 Correct 23 ms 38480 KB Output is correct
33 Correct 23 ms 38488 KB Output is correct
34 Correct 25 ms 38488 KB Output is correct
35 Correct 24 ms 38504 KB Output is correct
36 Correct 134 ms 62080 KB Output is correct
37 Correct 212 ms 80560 KB Output is correct
38 Correct 206 ms 80680 KB Output is correct
39 Correct 207 ms 80684 KB Output is correct
40 Correct 205 ms 80532 KB Output is correct
41 Correct 210 ms 80568 KB Output is correct
42 Correct 205 ms 80564 KB Output is correct
43 Correct 129 ms 80504 KB Output is correct
44 Correct 141 ms 80680 KB Output is correct
45 Correct 138 ms 80560 KB Output is correct
46 Correct 141 ms 80612 KB Output is correct
47 Correct 219 ms 80560 KB Output is correct
48 Correct 214 ms 80684 KB Output is correct
49 Correct 201 ms 80720 KB Output is correct
50 Correct 138 ms 80680 KB Output is correct
51 Correct 149 ms 80664 KB Output is correct
52 Correct 216 ms 80576 KB Output is correct
53 Correct 205 ms 80680 KB Output is correct
54 Correct 210 ms 80684 KB Output is correct
55 Correct 137 ms 80756 KB Output is correct
56 Correct 150 ms 80716 KB Output is correct
57 Correct 206 ms 79628 KB Output is correct
58 Correct 218 ms 80680 KB Output is correct
59 Correct 211 ms 80684 KB Output is correct
60 Correct 219 ms 80680 KB Output is correct
61 Correct 203 ms 80564 KB Output is correct
62 Correct 213 ms 80676 KB Output is correct
63 Correct 218 ms 80684 KB Output is correct
64 Correct 130 ms 80620 KB Output is correct
65 Correct 129 ms 80700 KB Output is correct
66 Correct 145 ms 80680 KB Output is correct
67 Correct 128 ms 80740 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1597 ms 80500 KB Output is correct
2 Correct 2056 ms 80560 KB Output is correct
3 Correct 2136 ms 80680 KB Output is correct
4 Correct 2041 ms 80556 KB Output is correct
5 Correct 2190 ms 80680 KB Output is correct
6 Correct 2052 ms 80680 KB Output is correct
7 Correct 2063 ms 80684 KB Output is correct
8 Correct 1194 ms 80684 KB Output is correct
9 Correct 1126 ms 80612 KB Output is correct
10 Correct 1928 ms 80680 KB Output is correct
11 Correct 1793 ms 80592 KB Output is correct
12 Correct 1199 ms 80728 KB Output is correct
13 Correct 1116 ms 80616 KB Output is correct
14 Correct 26 ms 37976 KB Output is correct
15 Correct 34 ms 38596 KB Output is correct
16 Correct 35 ms 38488 KB Output is correct
17 Correct 222 ms 80684 KB Output is correct
18 Correct 208 ms 80684 KB Output is correct
19 Correct 213 ms 80564 KB Output is correct
20 Correct 173 ms 80612 KB Output is correct
21 Correct 128 ms 80592 KB Output is correct
22 Correct 232 ms 80684 KB Output is correct
23 Correct 237 ms 80684 KB Output is correct
24 Correct 242 ms 80700 KB Output is correct
25 Correct 141 ms 80684 KB Output is correct
26 Correct 152 ms 80684 KB Output is correct
27 Correct 24 ms 38480 KB Output is correct
28 Correct 21 ms 38488 KB Output is correct
29 Correct 38 ms 38488 KB Output is correct
30 Correct 23 ms 38488 KB Output is correct
31 Correct 21 ms 38488 KB Output is correct
32 Correct 37 ms 38468 KB Output is correct
33 Correct 31 ms 38480 KB Output is correct
34 Correct 25 ms 38488 KB Output is correct
35 Correct 24 ms 38488 KB Output is correct
36 Correct 36 ms 38500 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 331 ms 47712 KB Output is correct
2 Correct 1280 ms 80568 KB Output is correct
3 Correct 1238 ms 80508 KB Output is correct
4 Correct 1173 ms 80680 KB Output is correct
5 Correct 1228 ms 80676 KB Output is correct
6 Correct 1212 ms 80680 KB Output is correct
7 Correct 1208 ms 80680 KB Output is correct
8 Correct 1130 ms 80680 KB Output is correct
9 Correct 1062 ms 80684 KB Output is correct
10 Correct 1043 ms 80812 KB Output is correct
11 Correct 1020 ms 80640 KB Output is correct
12 Correct 209 ms 80508 KB Output is correct
13 Correct 201 ms 80684 KB Output is correct
14 Correct 208 ms 80680 KB Output is correct
15 Correct 124 ms 80684 KB Output is correct
16 Correct 147 ms 80684 KB Output is correct
17 Correct 196 ms 79628 KB Output is correct
18 Correct 210 ms 80584 KB Output is correct
19 Correct 200 ms 80680 KB Output is correct
20 Correct 196 ms 80680 KB Output is correct
21 Correct 211 ms 80684 KB Output is correct
22 Correct 202 ms 80684 KB Output is correct
23 Correct 211 ms 80700 KB Output is correct
24 Correct 132 ms 80684 KB Output is correct
25 Correct 137 ms 80736 KB Output is correct
26 Correct 150 ms 80940 KB Output is correct
27 Correct 137 ms 80708 KB Output is correct
28 Correct 24 ms 38556 KB Output is correct
29 Correct 24 ms 38488 KB Output is correct
30 Correct 22 ms 38480 KB Output is correct
31 Correct 21 ms 38488 KB Output is correct
32 Correct 21 ms 38488 KB Output is correct
33 Correct 24 ms 38232 KB Output is correct
34 Correct 23 ms 38528 KB Output is correct
35 Correct 28 ms 38480 KB Output is correct
36 Correct 22 ms 38488 KB Output is correct
37 Correct 26 ms 38488 KB Output is correct
38 Correct 23 ms 38488 KB Output is correct
39 Correct 25 ms 38488 KB Output is correct
40 Correct 23 ms 38488 KB Output is correct
41 Correct 23 ms 38488 KB Output is correct
42 Correct 28 ms 38488 KB Output is correct
43 Correct 32 ms 38484 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 35 ms 37972 KB Output is correct
2 Correct 36 ms 38480 KB Output is correct
3 Correct 25 ms 38488 KB Output is correct
4 Correct 25 ms 38480 KB Output is correct
5 Correct 27 ms 38488 KB Output is correct
6 Correct 37 ms 38480 KB Output is correct
7 Correct 24 ms 38740 KB Output is correct
8 Correct 24 ms 38488 KB Output is correct
9 Correct 23 ms 38424 KB Output is correct
10 Correct 29 ms 38568 KB Output is correct
11 Correct 23 ms 38488 KB Output is correct
12 Correct 22 ms 37976 KB Output is correct
13 Correct 24 ms 38488 KB Output is correct
14 Correct 23 ms 38408 KB Output is correct
15 Correct 25 ms 38488 KB Output is correct
16 Correct 24 ms 38488 KB Output is correct
17 Correct 25 ms 38488 KB Output is correct
18 Correct 27 ms 38488 KB Output is correct
19 Correct 24 ms 38488 KB Output is correct
20 Correct 25 ms 38488 KB Output is correct
21 Correct 24 ms 38444 KB Output is correct
22 Correct 23 ms 38488 KB Output is correct
23 Correct 23 ms 38488 KB Output is correct
24 Correct 25 ms 38628 KB Output is correct
25 Correct 24 ms 38232 KB Output is correct
26 Correct 26 ms 38460 KB Output is correct
27 Correct 26 ms 38412 KB Output is correct
28 Correct 24 ms 38624 KB Output is correct
29 Correct 23 ms 38488 KB Output is correct
30 Correct 26 ms 38488 KB Output is correct
31 Correct 24 ms 38488 KB Output is correct
32 Correct 23 ms 38480 KB Output is correct
33 Correct 23 ms 38488 KB Output is correct
34 Correct 25 ms 38488 KB Output is correct
35 Correct 24 ms 38504 KB Output is correct
36 Correct 134 ms 62080 KB Output is correct
37 Correct 212 ms 80560 KB Output is correct
38 Correct 206 ms 80680 KB Output is correct
39 Correct 207 ms 80684 KB Output is correct
40 Correct 205 ms 80532 KB Output is correct
41 Correct 210 ms 80568 KB Output is correct
42 Correct 205 ms 80564 KB Output is correct
43 Correct 129 ms 80504 KB Output is correct
44 Correct 141 ms 80680 KB Output is correct
45 Correct 138 ms 80560 KB Output is correct
46 Correct 141 ms 80612 KB Output is correct
47 Correct 219 ms 80560 KB Output is correct
48 Correct 214 ms 80684 KB Output is correct
49 Correct 201 ms 80720 KB Output is correct
50 Correct 138 ms 80680 KB Output is correct
51 Correct 149 ms 80664 KB Output is correct
52 Correct 216 ms 80576 KB Output is correct
53 Correct 205 ms 80680 KB Output is correct
54 Correct 210 ms 80684 KB Output is correct
55 Correct 137 ms 80756 KB Output is correct
56 Correct 150 ms 80716 KB Output is correct
57 Correct 206 ms 79628 KB Output is correct
58 Correct 218 ms 80680 KB Output is correct
59 Correct 211 ms 80684 KB Output is correct
60 Correct 219 ms 80680 KB Output is correct
61 Correct 203 ms 80564 KB Output is correct
62 Correct 213 ms 80676 KB Output is correct
63 Correct 218 ms 80684 KB Output is correct
64 Correct 130 ms 80620 KB Output is correct
65 Correct 129 ms 80700 KB Output is correct
66 Correct 145 ms 80680 KB Output is correct
67 Correct 128 ms 80740 KB Output is correct
68 Correct 1597 ms 80500 KB Output is correct
69 Correct 2056 ms 80560 KB Output is correct
70 Correct 2136 ms 80680 KB Output is correct
71 Correct 2041 ms 80556 KB Output is correct
72 Correct 2190 ms 80680 KB Output is correct
73 Correct 2052 ms 80680 KB Output is correct
74 Correct 2063 ms 80684 KB Output is correct
75 Correct 1194 ms 80684 KB Output is correct
76 Correct 1126 ms 80612 KB Output is correct
77 Correct 1928 ms 80680 KB Output is correct
78 Correct 1793 ms 80592 KB Output is correct
79 Correct 1199 ms 80728 KB Output is correct
80 Correct 1116 ms 80616 KB Output is correct
81 Correct 26 ms 37976 KB Output is correct
82 Correct 34 ms 38596 KB Output is correct
83 Correct 35 ms 38488 KB Output is correct
84 Correct 222 ms 80684 KB Output is correct
85 Correct 208 ms 80684 KB Output is correct
86 Correct 213 ms 80564 KB Output is correct
87 Correct 173 ms 80612 KB Output is correct
88 Correct 128 ms 80592 KB Output is correct
89 Correct 232 ms 80684 KB Output is correct
90 Correct 237 ms 80684 KB Output is correct
91 Correct 242 ms 80700 KB Output is correct
92 Correct 141 ms 80684 KB Output is correct
93 Correct 152 ms 80684 KB Output is correct
94 Correct 24 ms 38480 KB Output is correct
95 Correct 21 ms 38488 KB Output is correct
96 Correct 38 ms 38488 KB Output is correct
97 Correct 23 ms 38488 KB Output is correct
98 Correct 21 ms 38488 KB Output is correct
99 Correct 37 ms 38468 KB Output is correct
100 Correct 31 ms 38480 KB Output is correct
101 Correct 25 ms 38488 KB Output is correct
102 Correct 24 ms 38488 KB Output is correct
103 Correct 36 ms 38500 KB Output is correct
104 Correct 1739 ms 77676 KB Output is correct
105 Correct 2141 ms 80564 KB Output is correct
106 Correct 2047 ms 80680 KB Output is correct
107 Correct 2103 ms 80640 KB Output is correct
108 Correct 2027 ms 80676 KB Output is correct
109 Correct 2095 ms 80564 KB Output is correct
110 Correct 1973 ms 80892 KB Output is correct
111 Correct 1153 ms 80680 KB Output is correct
112 Correct 960 ms 80680 KB Output is correct
113 Correct 1345 ms 80976 KB Output is correct
114 Correct 1584 ms 80680 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 573 ms 60848 KB Output is correct
2 Correct 1366 ms 80668 KB Output is correct
3 Correct 1389 ms 80684 KB Output is correct
4 Correct 1395 ms 80508 KB Output is correct
5 Correct 1178 ms 80684 KB Output is correct
6 Correct 1395 ms 80592 KB Output is correct
7 Correct 1093 ms 80748 KB Output is correct
8 Correct 22 ms 37976 KB Output is correct
9 Correct 22 ms 38372 KB Output is correct
10 Correct 26 ms 38488 KB Output is correct
11 Correct 35 ms 37972 KB Output is correct
12 Correct 36 ms 38480 KB Output is correct
13 Correct 25 ms 38488 KB Output is correct
14 Correct 25 ms 38480 KB Output is correct
15 Correct 27 ms 38488 KB Output is correct
16 Correct 37 ms 38480 KB Output is correct
17 Correct 24 ms 38740 KB Output is correct
18 Correct 24 ms 38488 KB Output is correct
19 Correct 23 ms 38424 KB Output is correct
20 Correct 29 ms 38568 KB Output is correct
21 Correct 23 ms 38488 KB Output is correct
22 Correct 22 ms 37976 KB Output is correct
23 Correct 24 ms 38488 KB Output is correct
24 Correct 23 ms 38408 KB Output is correct
25 Correct 25 ms 38488 KB Output is correct
26 Correct 24 ms 38488 KB Output is correct
27 Correct 25 ms 38488 KB Output is correct
28 Correct 27 ms 38488 KB Output is correct
29 Correct 24 ms 38488 KB Output is correct
30 Correct 25 ms 38488 KB Output is correct
31 Correct 24 ms 38444 KB Output is correct
32 Correct 23 ms 38488 KB Output is correct
33 Correct 23 ms 38488 KB Output is correct
34 Correct 25 ms 38628 KB Output is correct
35 Correct 24 ms 38232 KB Output is correct
36 Correct 26 ms 38460 KB Output is correct
37 Correct 26 ms 38412 KB Output is correct
38 Correct 24 ms 38624 KB Output is correct
39 Correct 23 ms 38488 KB Output is correct
40 Correct 26 ms 38488 KB Output is correct
41 Correct 24 ms 38488 KB Output is correct
42 Correct 23 ms 38480 KB Output is correct
43 Correct 23 ms 38488 KB Output is correct
44 Correct 25 ms 38488 KB Output is correct
45 Correct 24 ms 38504 KB Output is correct
46 Correct 134 ms 62080 KB Output is correct
47 Correct 212 ms 80560 KB Output is correct
48 Correct 206 ms 80680 KB Output is correct
49 Correct 207 ms 80684 KB Output is correct
50 Correct 205 ms 80532 KB Output is correct
51 Correct 210 ms 80568 KB Output is correct
52 Correct 205 ms 80564 KB Output is correct
53 Correct 129 ms 80504 KB Output is correct
54 Correct 141 ms 80680 KB Output is correct
55 Correct 138 ms 80560 KB Output is correct
56 Correct 141 ms 80612 KB Output is correct
57 Correct 219 ms 80560 KB Output is correct
58 Correct 214 ms 80684 KB Output is correct
59 Correct 201 ms 80720 KB Output is correct
60 Correct 138 ms 80680 KB Output is correct
61 Correct 149 ms 80664 KB Output is correct
62 Correct 216 ms 80576 KB Output is correct
63 Correct 205 ms 80680 KB Output is correct
64 Correct 210 ms 80684 KB Output is correct
65 Correct 137 ms 80756 KB Output is correct
66 Correct 150 ms 80716 KB Output is correct
67 Correct 206 ms 79628 KB Output is correct
68 Correct 218 ms 80680 KB Output is correct
69 Correct 211 ms 80684 KB Output is correct
70 Correct 219 ms 80680 KB Output is correct
71 Correct 203 ms 80564 KB Output is correct
72 Correct 213 ms 80676 KB Output is correct
73 Correct 218 ms 80684 KB Output is correct
74 Correct 130 ms 80620 KB Output is correct
75 Correct 129 ms 80700 KB Output is correct
76 Correct 145 ms 80680 KB Output is correct
77 Correct 128 ms 80740 KB Output is correct
78 Correct 1597 ms 80500 KB Output is correct
79 Correct 2056 ms 80560 KB Output is correct
80 Correct 2136 ms 80680 KB Output is correct
81 Correct 2041 ms 80556 KB Output is correct
82 Correct 2190 ms 80680 KB Output is correct
83 Correct 2052 ms 80680 KB Output is correct
84 Correct 2063 ms 80684 KB Output is correct
85 Correct 1194 ms 80684 KB Output is correct
86 Correct 1126 ms 80612 KB Output is correct
87 Correct 1928 ms 80680 KB Output is correct
88 Correct 1793 ms 80592 KB Output is correct
89 Correct 1199 ms 80728 KB Output is correct
90 Correct 1116 ms 80616 KB Output is correct
91 Correct 26 ms 37976 KB Output is correct
92 Correct 34 ms 38596 KB Output is correct
93 Correct 35 ms 38488 KB Output is correct
94 Correct 222 ms 80684 KB Output is correct
95 Correct 208 ms 80684 KB Output is correct
96 Correct 213 ms 80564 KB Output is correct
97 Correct 173 ms 80612 KB Output is correct
98 Correct 128 ms 80592 KB Output is correct
99 Correct 232 ms 80684 KB Output is correct
100 Correct 237 ms 80684 KB Output is correct
101 Correct 242 ms 80700 KB Output is correct
102 Correct 141 ms 80684 KB Output is correct
103 Correct 152 ms 80684 KB Output is correct
104 Correct 24 ms 38480 KB Output is correct
105 Correct 21 ms 38488 KB Output is correct
106 Correct 38 ms 38488 KB Output is correct
107 Correct 23 ms 38488 KB Output is correct
108 Correct 21 ms 38488 KB Output is correct
109 Correct 37 ms 38468 KB Output is correct
110 Correct 31 ms 38480 KB Output is correct
111 Correct 25 ms 38488 KB Output is correct
112 Correct 24 ms 38488 KB Output is correct
113 Correct 36 ms 38500 KB Output is correct
114 Correct 331 ms 47712 KB Output is correct
115 Correct 1280 ms 80568 KB Output is correct
116 Correct 1238 ms 80508 KB Output is correct
117 Correct 1173 ms 80680 KB Output is correct
118 Correct 1228 ms 80676 KB Output is correct
119 Correct 1212 ms 80680 KB Output is correct
120 Correct 1208 ms 80680 KB Output is correct
121 Correct 1130 ms 80680 KB Output is correct
122 Correct 1062 ms 80684 KB Output is correct
123 Correct 1043 ms 80812 KB Output is correct
124 Correct 1020 ms 80640 KB Output is correct
125 Correct 209 ms 80508 KB Output is correct
126 Correct 201 ms 80684 KB Output is correct
127 Correct 208 ms 80680 KB Output is correct
128 Correct 124 ms 80684 KB Output is correct
129 Correct 147 ms 80684 KB Output is correct
130 Correct 196 ms 79628 KB Output is correct
131 Correct 210 ms 80584 KB Output is correct
132 Correct 200 ms 80680 KB Output is correct
133 Correct 196 ms 80680 KB Output is correct
134 Correct 211 ms 80684 KB Output is correct
135 Correct 202 ms 80684 KB Output is correct
136 Correct 211 ms 80700 KB Output is correct
137 Correct 132 ms 80684 KB Output is correct
138 Correct 137 ms 80736 KB Output is correct
139 Correct 150 ms 80940 KB Output is correct
140 Correct 137 ms 80708 KB Output is correct
141 Correct 24 ms 38556 KB Output is correct
142 Correct 24 ms 38488 KB Output is correct
143 Correct 22 ms 38480 KB Output is correct
144 Correct 21 ms 38488 KB Output is correct
145 Correct 21 ms 38488 KB Output is correct
146 Correct 24 ms 38232 KB Output is correct
147 Correct 23 ms 38528 KB Output is correct
148 Correct 28 ms 38480 KB Output is correct
149 Correct 22 ms 38488 KB Output is correct
150 Correct 26 ms 38488 KB Output is correct
151 Correct 23 ms 38488 KB Output is correct
152 Correct 25 ms 38488 KB Output is correct
153 Correct 23 ms 38488 KB Output is correct
154 Correct 23 ms 38488 KB Output is correct
155 Correct 28 ms 38488 KB Output is correct
156 Correct 32 ms 38484 KB Output is correct
157 Correct 1739 ms 77676 KB Output is correct
158 Correct 2141 ms 80564 KB Output is correct
159 Correct 2047 ms 80680 KB Output is correct
160 Correct 2103 ms 80640 KB Output is correct
161 Correct 2027 ms 80676 KB Output is correct
162 Correct 2095 ms 80564 KB Output is correct
163 Correct 1973 ms 80892 KB Output is correct
164 Correct 1153 ms 80680 KB Output is correct
165 Correct 960 ms 80680 KB Output is correct
166 Correct 1345 ms 80976 KB Output is correct
167 Correct 1584 ms 80680 KB Output is correct
168 Correct 27 ms 37976 KB Output is correct
169 Correct 1228 ms 54204 KB Output is correct
170 Correct 2305 ms 80564 KB Output is correct
171 Correct 2211 ms 80676 KB Output is correct
172 Correct 2526 ms 80556 KB Output is correct
173 Correct 2380 ms 80532 KB Output is correct
174 Correct 2308 ms 80660 KB Output is correct
175 Correct 2261 ms 80680 KB Output is correct
176 Correct 1140 ms 80684 KB Output is correct
177 Correct 1014 ms 80680 KB Output is correct
178 Correct 1445 ms 80936 KB Output is correct
179 Correct 1401 ms 80684 KB Output is correct