Submission #848892

# Submission time Handle Problem Language Result Execution time Memory
848892 2023-09-13T16:33:40 Z Itamar Radio Towers (IOI22_towers) C++17
100 / 100
1632 ms 55100 KB
#include <vector>
#include <cassert>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define vi vector<int>
#include <set>
vi st;
const int siz = 1e5;
int h[siz];
int d;
#define pi pair<int,int>
#pragma warning(disable : 4996)
struct node {
    int l, r, mid, maxi,ans;
    vector<pi> v;
    vi vd;
    node* sl, * sr,*t=NULL;
    node(int li, int ri) {
        l = li, r = ri, mid = (l + r) / 2,v.resize(r-l+2),vd.resize(r-l+2);
        vd[0] = 1e9;
        if (l < r) {
            sl = new node(l, mid);
            sr = new node(mid + 1, r);
            maxi = max(sl->maxi, sr->maxi);
        }
        else {
            maxi = h[l];
            ans = 1;
            v[1] = { l,l };
            vd[1] = 1e9;
        }
    }
    int qm(int a, int b) {
        if (a > b)return 0;
        if (a > r || b < l)return 0;
        if (a <= l && b >= r)return maxi;
        return max(sl->qm(a, b), sr->qm(a, b));
    }
    void calc(node* top) {
        t = top;
        if (l < r) {
            sl->calc(top), sr->calc(top);
            vector<pi> vec;
            for (int i = 1; i <= mid - l + 1; i++)vec.push_back({ sl->vd[i], i });
            for (int i = 1; i <= r-mid; i++)vec.push_back({ sr->vd[i], -i });
            sort(vec.begin(), vec.end());
            reverse(vec.begin(), vec.end());
            int maxi1 = 0, maxi2 = 0;
            for (int i = 0; i < vec.size(); i++) {
                if (vec[i].second>=0)maxi1++;
                else maxi2++;
                int op = min(vec[i].first, t->qm(sl->v[maxi1].second + 1, sr->v[maxi2].first - 1)- max(h[sl->v[maxi1].second],h[sr->v[maxi2].first]));
                if (maxi1 && maxi2 && vd[maxi1 + maxi2] < op) {
                    vd[maxi1 + maxi2] = op;
                    v[maxi1 + maxi2] = { sl->v[maxi1].first,sr->v[maxi2].second };
                }
                if (maxi1 && maxi2 && vd[maxi1 + maxi2 - 1] < vec[i].first) {
                    vd[maxi1 + maxi2 - 1] = vec[i].first;
                    v[i].first = sl->v[maxi1].first;
                    v[i].second = sr->v[maxi2].second;
                    if (sl->v[maxi1].first == sl->v[maxi1].second && h[sl->v[maxi1].first] > h[sr->v[maxi2].first])v[i].first = sr->v[maxi2].first;
                    else if (sr->v[maxi2].first == sr->v[maxi2].second && h[sr->v[maxi2].first] > h[sl->v[maxi1].second])v[i].second = sl->v[maxi1].second;
                }
            }

        }
    }
    void rev() {
        if (l < r) {
            sl->rev();
            sr->rev();
        }
        reverse(vd.begin(), vd.end());
    }
    int query(int a, int b, int &rep, int dq) {
        if (a > r || b < l)return 0;
        if (a <= l && b >= r) {
            int i = lower_bound(vd.begin(), vd.end(), dq) - vd.begin();
            i = r - l + 1 - i;
            if (rep != -1) {
                int l1 = rep, r1 = v[i].first;
                if (t->qm(l1 + 1, r1 - 1) - dq >= max(h[l1], h[r1])) {
                    rep = v[i].second;
                    return i;
                }
                else {
                    if (v[i].first != v[i].second || h[v[i].first] < h[rep]) {
                        rep = v[i].second;
                    }
                    return i - 1;
                }
            }
            else {
                rep = v[i].second;
                return i;
            }
        }
        else {
            return sl->query(a, b, rep,dq) + sr->query(a, b, rep,dq);
        }
    }
};
node* seg;
void init(int N, std::vector<int> H) {
    for (int i = 0; i < N; i++)h[i] = H[i];
    seg = new node(0, N - 1);
    /*set<int> s;
    multiset<pi> d;
    for (int i = 0; i < N; i++)s.insert(i);
    for (int i = 0; i < N; i++)d.insert({ 0,i });
    while (s.size()>1) {
        auto it = d.begin(); pi p = *it;
        if(d.fi)
    }*/
    seg->calc(seg);
    seg->rev();
}
bool f = 0;
int max_towers(int L, int R, int D) {
    int k = -1;
    return seg->query(L, R, k,D);
}
/*
int main() {
    int N, Q;
    assert(2 == scanf("%d %d", &N, &Q));
    std::vector<int> H(N);
    for (int i = 0; i < N; ++i) {
        assert(1 == scanf("%d", &H[i]));
    }
    init(N, H);

    for (int i = 0; i < Q; ++i) {
        int L, R, D;
        assert(3 == scanf("%d %d %d", &L, &R, &D));
        printf("%d\n", max_towers(L, R, D));
    }
    return 0;
}*/

Compilation message

towers.cpp:15: warning: ignoring '#pragma warning ' [-Wunknown-pragmas]
   15 | #pragma warning(disable : 4996)
      | 
towers.cpp: In member function 'void node::calc(node*)':
towers.cpp:52:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   52 |             for (int i = 0; i < vec.size(); i++) {
      |                             ~~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 560 ms 32032 KB Output is correct
2 Correct 1217 ms 54772 KB Output is correct
3 Correct 1180 ms 54592 KB Output is correct
4 Correct 1193 ms 54732 KB Output is correct
5 Correct 1424 ms 54728 KB Output is correct
6 Correct 1214 ms 54728 KB Output is correct
7 Correct 1456 ms 54748 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 3 ms 1368 KB Output is correct
10 Correct 2 ms 1368 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 600 KB Output is correct
2 Correct 3 ms 1368 KB Output is correct
3 Correct 3 ms 1368 KB Output is correct
4 Correct 3 ms 1368 KB Output is correct
5 Correct 3 ms 1368 KB Output is correct
6 Correct 3 ms 1364 KB Output is correct
7 Correct 3 ms 1112 KB Output is correct
8 Correct 2 ms 1368 KB Output is correct
9 Correct 2 ms 1368 KB Output is correct
10 Correct 2 ms 1368 KB Output is correct
11 Correct 3 ms 1368 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 3 ms 1368 KB Output is correct
14 Correct 2 ms 1368 KB Output is correct
15 Correct 3 ms 1344 KB Output is correct
16 Correct 3 ms 1368 KB Output is correct
17 Correct 3 ms 1368 KB Output is correct
18 Correct 3 ms 1368 KB Output is correct
19 Correct 3 ms 1368 KB Output is correct
20 Correct 3 ms 1368 KB Output is correct
21 Correct 3 ms 1368 KB Output is correct
22 Correct 3 ms 1368 KB Output is correct
23 Correct 2 ms 1368 KB Output is correct
24 Correct 2 ms 1368 KB Output is correct
25 Correct 1 ms 600 KB Output is correct
26 Correct 3 ms 1368 KB Output is correct
27 Correct 3 ms 1368 KB Output is correct
28 Correct 3 ms 1368 KB Output is correct
29 Correct 3 ms 1368 KB Output is correct
30 Correct 3 ms 1368 KB Output is correct
31 Correct 4 ms 1368 KB Output is correct
32 Correct 2 ms 1368 KB Output is correct
33 Correct 2 ms 1368 KB Output is correct
34 Correct 2 ms 1368 KB Output is correct
35 Correct 2 ms 1368 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 600 KB Output is correct
2 Correct 3 ms 1368 KB Output is correct
3 Correct 3 ms 1368 KB Output is correct
4 Correct 3 ms 1368 KB Output is correct
5 Correct 3 ms 1368 KB Output is correct
6 Correct 3 ms 1364 KB Output is correct
7 Correct 3 ms 1112 KB Output is correct
8 Correct 2 ms 1368 KB Output is correct
9 Correct 2 ms 1368 KB Output is correct
10 Correct 2 ms 1368 KB Output is correct
11 Correct 3 ms 1368 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 3 ms 1368 KB Output is correct
14 Correct 2 ms 1368 KB Output is correct
15 Correct 3 ms 1344 KB Output is correct
16 Correct 3 ms 1368 KB Output is correct
17 Correct 3 ms 1368 KB Output is correct
18 Correct 3 ms 1368 KB Output is correct
19 Correct 3 ms 1368 KB Output is correct
20 Correct 3 ms 1368 KB Output is correct
21 Correct 3 ms 1368 KB Output is correct
22 Correct 3 ms 1368 KB Output is correct
23 Correct 2 ms 1368 KB Output is correct
24 Correct 2 ms 1368 KB Output is correct
25 Correct 1 ms 600 KB Output is correct
26 Correct 3 ms 1368 KB Output is correct
27 Correct 3 ms 1368 KB Output is correct
28 Correct 3 ms 1368 KB Output is correct
29 Correct 3 ms 1368 KB Output is correct
30 Correct 3 ms 1368 KB Output is correct
31 Correct 4 ms 1368 KB Output is correct
32 Correct 2 ms 1368 KB Output is correct
33 Correct 2 ms 1368 KB Output is correct
34 Correct 2 ms 1368 KB Output is correct
35 Correct 2 ms 1368 KB Output is correct
36 Correct 130 ms 34652 KB Output is correct
37 Correct 210 ms 54772 KB Output is correct
38 Correct 213 ms 54812 KB Output is correct
39 Correct 215 ms 54732 KB Output is correct
40 Correct 203 ms 55028 KB Output is correct
41 Correct 205 ms 54736 KB Output is correct
42 Correct 202 ms 54736 KB Output is correct
43 Correct 183 ms 54700 KB Output is correct
44 Correct 194 ms 54760 KB Output is correct
45 Correct 183 ms 54812 KB Output is correct
46 Correct 204 ms 54764 KB Output is correct
47 Correct 220 ms 54736 KB Output is correct
48 Correct 203 ms 54744 KB Output is correct
49 Correct 204 ms 54728 KB Output is correct
50 Correct 202 ms 54724 KB Output is correct
51 Correct 179 ms 54800 KB Output is correct
52 Correct 214 ms 54732 KB Output is correct
53 Correct 206 ms 54700 KB Output is correct
54 Correct 204 ms 54724 KB Output is correct
55 Correct 195 ms 54772 KB Output is correct
56 Correct 175 ms 54732 KB Output is correct
57 Correct 209 ms 52968 KB Output is correct
58 Correct 219 ms 54732 KB Output is correct
59 Correct 218 ms 54616 KB Output is correct
60 Correct 211 ms 55012 KB Output is correct
61 Correct 208 ms 54716 KB Output is correct
62 Correct 204 ms 54768 KB Output is correct
63 Correct 210 ms 54992 KB Output is correct
64 Correct 177 ms 54712 KB Output is correct
65 Correct 200 ms 54732 KB Output is correct
66 Correct 184 ms 55016 KB Output is correct
67 Correct 188 ms 54684 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1105 ms 54392 KB Output is correct
2 Correct 1437 ms 54632 KB Output is correct
3 Correct 1347 ms 54780 KB Output is correct
4 Correct 1385 ms 54828 KB Output is correct
5 Correct 1444 ms 54844 KB Output is correct
6 Correct 1375 ms 54804 KB Output is correct
7 Correct 1338 ms 54736 KB Output is correct
8 Correct 1203 ms 54716 KB Output is correct
9 Correct 1449 ms 55040 KB Output is correct
10 Correct 1180 ms 54788 KB Output is correct
11 Correct 1392 ms 54732 KB Output is correct
12 Correct 1167 ms 54772 KB Output is correct
13 Correct 1398 ms 54988 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 3 ms 1112 KB Output is correct
16 Correct 2 ms 1112 KB Output is correct
17 Correct 221 ms 54816 KB Output is correct
18 Correct 210 ms 54728 KB Output is correct
19 Correct 206 ms 54712 KB Output is correct
20 Correct 195 ms 54644 KB Output is correct
21 Correct 172 ms 54608 KB Output is correct
22 Correct 214 ms 54728 KB Output is correct
23 Correct 213 ms 54736 KB Output is correct
24 Correct 203 ms 54604 KB Output is correct
25 Correct 194 ms 54732 KB Output is correct
26 Correct 176 ms 54720 KB Output is correct
27 Correct 3 ms 1368 KB Output is correct
28 Correct 3 ms 1368 KB Output is correct
29 Correct 3 ms 1368 KB Output is correct
30 Correct 3 ms 1348 KB Output is correct
31 Correct 2 ms 1368 KB Output is correct
32 Correct 3 ms 1368 KB Output is correct
33 Correct 2 ms 1368 KB Output is correct
34 Correct 3 ms 1620 KB Output is correct
35 Correct 2 ms 1368 KB Output is correct
36 Correct 2 ms 1368 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 206 ms 12768 KB Output is correct
2 Correct 814 ms 54632 KB Output is correct
3 Correct 785 ms 54740 KB Output is correct
4 Correct 760 ms 54700 KB Output is correct
5 Correct 737 ms 54736 KB Output is correct
6 Correct 765 ms 54632 KB Output is correct
7 Correct 789 ms 54772 KB Output is correct
8 Correct 734 ms 54808 KB Output is correct
9 Correct 780 ms 54840 KB Output is correct
10 Correct 706 ms 54776 KB Output is correct
11 Correct 755 ms 54752 KB Output is correct
12 Correct 215 ms 54708 KB Output is correct
13 Correct 201 ms 54744 KB Output is correct
14 Correct 203 ms 54724 KB Output is correct
15 Correct 197 ms 54740 KB Output is correct
16 Correct 181 ms 54780 KB Output is correct
17 Correct 204 ms 52968 KB Output is correct
18 Correct 217 ms 54728 KB Output is correct
19 Correct 209 ms 54840 KB Output is correct
20 Correct 203 ms 54780 KB Output is correct
21 Correct 201 ms 54804 KB Output is correct
22 Correct 201 ms 54636 KB Output is correct
23 Correct 204 ms 54996 KB Output is correct
24 Correct 175 ms 54748 KB Output is correct
25 Correct 192 ms 54752 KB Output is correct
26 Correct 179 ms 55100 KB Output is correct
27 Correct 183 ms 54728 KB Output is correct
28 Correct 3 ms 1368 KB Output is correct
29 Correct 3 ms 1368 KB Output is correct
30 Correct 3 ms 1368 KB Output is correct
31 Correct 3 ms 1368 KB Output is correct
32 Correct 2 ms 1368 KB Output is correct
33 Correct 2 ms 600 KB Output is correct
34 Correct 3 ms 1368 KB Output is correct
35 Correct 3 ms 1368 KB Output is correct
36 Correct 3 ms 1368 KB Output is correct
37 Correct 3 ms 1368 KB Output is correct
38 Correct 3 ms 1368 KB Output is correct
39 Correct 3 ms 1376 KB Output is correct
40 Correct 2 ms 1368 KB Output is correct
41 Correct 3 ms 1368 KB Output is correct
42 Correct 2 ms 1368 KB Output is correct
43 Correct 3 ms 1368 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 600 KB Output is correct
2 Correct 3 ms 1368 KB Output is correct
3 Correct 3 ms 1368 KB Output is correct
4 Correct 3 ms 1368 KB Output is correct
5 Correct 3 ms 1368 KB Output is correct
6 Correct 3 ms 1364 KB Output is correct
7 Correct 3 ms 1112 KB Output is correct
8 Correct 2 ms 1368 KB Output is correct
9 Correct 2 ms 1368 KB Output is correct
10 Correct 2 ms 1368 KB Output is correct
11 Correct 3 ms 1368 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 3 ms 1368 KB Output is correct
14 Correct 2 ms 1368 KB Output is correct
15 Correct 3 ms 1344 KB Output is correct
16 Correct 3 ms 1368 KB Output is correct
17 Correct 3 ms 1368 KB Output is correct
18 Correct 3 ms 1368 KB Output is correct
19 Correct 3 ms 1368 KB Output is correct
20 Correct 3 ms 1368 KB Output is correct
21 Correct 3 ms 1368 KB Output is correct
22 Correct 3 ms 1368 KB Output is correct
23 Correct 2 ms 1368 KB Output is correct
24 Correct 2 ms 1368 KB Output is correct
25 Correct 1 ms 600 KB Output is correct
26 Correct 3 ms 1368 KB Output is correct
27 Correct 3 ms 1368 KB Output is correct
28 Correct 3 ms 1368 KB Output is correct
29 Correct 3 ms 1368 KB Output is correct
30 Correct 3 ms 1368 KB Output is correct
31 Correct 4 ms 1368 KB Output is correct
32 Correct 2 ms 1368 KB Output is correct
33 Correct 2 ms 1368 KB Output is correct
34 Correct 2 ms 1368 KB Output is correct
35 Correct 2 ms 1368 KB Output is correct
36 Correct 130 ms 34652 KB Output is correct
37 Correct 210 ms 54772 KB Output is correct
38 Correct 213 ms 54812 KB Output is correct
39 Correct 215 ms 54732 KB Output is correct
40 Correct 203 ms 55028 KB Output is correct
41 Correct 205 ms 54736 KB Output is correct
42 Correct 202 ms 54736 KB Output is correct
43 Correct 183 ms 54700 KB Output is correct
44 Correct 194 ms 54760 KB Output is correct
45 Correct 183 ms 54812 KB Output is correct
46 Correct 204 ms 54764 KB Output is correct
47 Correct 220 ms 54736 KB Output is correct
48 Correct 203 ms 54744 KB Output is correct
49 Correct 204 ms 54728 KB Output is correct
50 Correct 202 ms 54724 KB Output is correct
51 Correct 179 ms 54800 KB Output is correct
52 Correct 214 ms 54732 KB Output is correct
53 Correct 206 ms 54700 KB Output is correct
54 Correct 204 ms 54724 KB Output is correct
55 Correct 195 ms 54772 KB Output is correct
56 Correct 175 ms 54732 KB Output is correct
57 Correct 209 ms 52968 KB Output is correct
58 Correct 219 ms 54732 KB Output is correct
59 Correct 218 ms 54616 KB Output is correct
60 Correct 211 ms 55012 KB Output is correct
61 Correct 208 ms 54716 KB Output is correct
62 Correct 204 ms 54768 KB Output is correct
63 Correct 210 ms 54992 KB Output is correct
64 Correct 177 ms 54712 KB Output is correct
65 Correct 200 ms 54732 KB Output is correct
66 Correct 184 ms 55016 KB Output is correct
67 Correct 188 ms 54684 KB Output is correct
68 Correct 1105 ms 54392 KB Output is correct
69 Correct 1437 ms 54632 KB Output is correct
70 Correct 1347 ms 54780 KB Output is correct
71 Correct 1385 ms 54828 KB Output is correct
72 Correct 1444 ms 54844 KB Output is correct
73 Correct 1375 ms 54804 KB Output is correct
74 Correct 1338 ms 54736 KB Output is correct
75 Correct 1203 ms 54716 KB Output is correct
76 Correct 1449 ms 55040 KB Output is correct
77 Correct 1180 ms 54788 KB Output is correct
78 Correct 1392 ms 54732 KB Output is correct
79 Correct 1167 ms 54772 KB Output is correct
80 Correct 1398 ms 54988 KB Output is correct
81 Correct 0 ms 344 KB Output is correct
82 Correct 3 ms 1112 KB Output is correct
83 Correct 2 ms 1112 KB Output is correct
84 Correct 221 ms 54816 KB Output is correct
85 Correct 210 ms 54728 KB Output is correct
86 Correct 206 ms 54712 KB Output is correct
87 Correct 195 ms 54644 KB Output is correct
88 Correct 172 ms 54608 KB Output is correct
89 Correct 214 ms 54728 KB Output is correct
90 Correct 213 ms 54736 KB Output is correct
91 Correct 203 ms 54604 KB Output is correct
92 Correct 194 ms 54732 KB Output is correct
93 Correct 176 ms 54720 KB Output is correct
94 Correct 3 ms 1368 KB Output is correct
95 Correct 3 ms 1368 KB Output is correct
96 Correct 3 ms 1368 KB Output is correct
97 Correct 3 ms 1348 KB Output is correct
98 Correct 2 ms 1368 KB Output is correct
99 Correct 3 ms 1368 KB Output is correct
100 Correct 2 ms 1368 KB Output is correct
101 Correct 3 ms 1620 KB Output is correct
102 Correct 2 ms 1368 KB Output is correct
103 Correct 2 ms 1368 KB Output is correct
104 Correct 1201 ms 48676 KB Output is correct
105 Correct 1353 ms 54816 KB Output is correct
106 Correct 1487 ms 54776 KB Output is correct
107 Correct 1468 ms 54824 KB Output is correct
108 Correct 1540 ms 54748 KB Output is correct
109 Correct 1426 ms 54752 KB Output is correct
110 Correct 1387 ms 54728 KB Output is correct
111 Correct 1169 ms 54736 KB Output is correct
112 Correct 1420 ms 54776 KB Output is correct
113 Correct 1153 ms 54748 KB Output is correct
114 Correct 1385 ms 54768 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 560 ms 32032 KB Output is correct
2 Correct 1217 ms 54772 KB Output is correct
3 Correct 1180 ms 54592 KB Output is correct
4 Correct 1193 ms 54732 KB Output is correct
5 Correct 1424 ms 54728 KB Output is correct
6 Correct 1214 ms 54728 KB Output is correct
7 Correct 1456 ms 54748 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 3 ms 1368 KB Output is correct
10 Correct 2 ms 1368 KB Output is correct
11 Correct 1 ms 600 KB Output is correct
12 Correct 3 ms 1368 KB Output is correct
13 Correct 3 ms 1368 KB Output is correct
14 Correct 3 ms 1368 KB Output is correct
15 Correct 3 ms 1368 KB Output is correct
16 Correct 3 ms 1364 KB Output is correct
17 Correct 3 ms 1112 KB Output is correct
18 Correct 2 ms 1368 KB Output is correct
19 Correct 2 ms 1368 KB Output is correct
20 Correct 2 ms 1368 KB Output is correct
21 Correct 3 ms 1368 KB Output is correct
22 Correct 0 ms 340 KB Output is correct
23 Correct 3 ms 1368 KB Output is correct
24 Correct 2 ms 1368 KB Output is correct
25 Correct 3 ms 1344 KB Output is correct
26 Correct 3 ms 1368 KB Output is correct
27 Correct 3 ms 1368 KB Output is correct
28 Correct 3 ms 1368 KB Output is correct
29 Correct 3 ms 1368 KB Output is correct
30 Correct 3 ms 1368 KB Output is correct
31 Correct 3 ms 1368 KB Output is correct
32 Correct 3 ms 1368 KB Output is correct
33 Correct 2 ms 1368 KB Output is correct
34 Correct 2 ms 1368 KB Output is correct
35 Correct 1 ms 600 KB Output is correct
36 Correct 3 ms 1368 KB Output is correct
37 Correct 3 ms 1368 KB Output is correct
38 Correct 3 ms 1368 KB Output is correct
39 Correct 3 ms 1368 KB Output is correct
40 Correct 3 ms 1368 KB Output is correct
41 Correct 4 ms 1368 KB Output is correct
42 Correct 2 ms 1368 KB Output is correct
43 Correct 2 ms 1368 KB Output is correct
44 Correct 2 ms 1368 KB Output is correct
45 Correct 2 ms 1368 KB Output is correct
46 Correct 130 ms 34652 KB Output is correct
47 Correct 210 ms 54772 KB Output is correct
48 Correct 213 ms 54812 KB Output is correct
49 Correct 215 ms 54732 KB Output is correct
50 Correct 203 ms 55028 KB Output is correct
51 Correct 205 ms 54736 KB Output is correct
52 Correct 202 ms 54736 KB Output is correct
53 Correct 183 ms 54700 KB Output is correct
54 Correct 194 ms 54760 KB Output is correct
55 Correct 183 ms 54812 KB Output is correct
56 Correct 204 ms 54764 KB Output is correct
57 Correct 220 ms 54736 KB Output is correct
58 Correct 203 ms 54744 KB Output is correct
59 Correct 204 ms 54728 KB Output is correct
60 Correct 202 ms 54724 KB Output is correct
61 Correct 179 ms 54800 KB Output is correct
62 Correct 214 ms 54732 KB Output is correct
63 Correct 206 ms 54700 KB Output is correct
64 Correct 204 ms 54724 KB Output is correct
65 Correct 195 ms 54772 KB Output is correct
66 Correct 175 ms 54732 KB Output is correct
67 Correct 209 ms 52968 KB Output is correct
68 Correct 219 ms 54732 KB Output is correct
69 Correct 218 ms 54616 KB Output is correct
70 Correct 211 ms 55012 KB Output is correct
71 Correct 208 ms 54716 KB Output is correct
72 Correct 204 ms 54768 KB Output is correct
73 Correct 210 ms 54992 KB Output is correct
74 Correct 177 ms 54712 KB Output is correct
75 Correct 200 ms 54732 KB Output is correct
76 Correct 184 ms 55016 KB Output is correct
77 Correct 188 ms 54684 KB Output is correct
78 Correct 1105 ms 54392 KB Output is correct
79 Correct 1437 ms 54632 KB Output is correct
80 Correct 1347 ms 54780 KB Output is correct
81 Correct 1385 ms 54828 KB Output is correct
82 Correct 1444 ms 54844 KB Output is correct
83 Correct 1375 ms 54804 KB Output is correct
84 Correct 1338 ms 54736 KB Output is correct
85 Correct 1203 ms 54716 KB Output is correct
86 Correct 1449 ms 55040 KB Output is correct
87 Correct 1180 ms 54788 KB Output is correct
88 Correct 1392 ms 54732 KB Output is correct
89 Correct 1167 ms 54772 KB Output is correct
90 Correct 1398 ms 54988 KB Output is correct
91 Correct 0 ms 344 KB Output is correct
92 Correct 3 ms 1112 KB Output is correct
93 Correct 2 ms 1112 KB Output is correct
94 Correct 221 ms 54816 KB Output is correct
95 Correct 210 ms 54728 KB Output is correct
96 Correct 206 ms 54712 KB Output is correct
97 Correct 195 ms 54644 KB Output is correct
98 Correct 172 ms 54608 KB Output is correct
99 Correct 214 ms 54728 KB Output is correct
100 Correct 213 ms 54736 KB Output is correct
101 Correct 203 ms 54604 KB Output is correct
102 Correct 194 ms 54732 KB Output is correct
103 Correct 176 ms 54720 KB Output is correct
104 Correct 3 ms 1368 KB Output is correct
105 Correct 3 ms 1368 KB Output is correct
106 Correct 3 ms 1368 KB Output is correct
107 Correct 3 ms 1348 KB Output is correct
108 Correct 2 ms 1368 KB Output is correct
109 Correct 3 ms 1368 KB Output is correct
110 Correct 2 ms 1368 KB Output is correct
111 Correct 3 ms 1620 KB Output is correct
112 Correct 2 ms 1368 KB Output is correct
113 Correct 2 ms 1368 KB Output is correct
114 Correct 206 ms 12768 KB Output is correct
115 Correct 814 ms 54632 KB Output is correct
116 Correct 785 ms 54740 KB Output is correct
117 Correct 760 ms 54700 KB Output is correct
118 Correct 737 ms 54736 KB Output is correct
119 Correct 765 ms 54632 KB Output is correct
120 Correct 789 ms 54772 KB Output is correct
121 Correct 734 ms 54808 KB Output is correct
122 Correct 780 ms 54840 KB Output is correct
123 Correct 706 ms 54776 KB Output is correct
124 Correct 755 ms 54752 KB Output is correct
125 Correct 215 ms 54708 KB Output is correct
126 Correct 201 ms 54744 KB Output is correct
127 Correct 203 ms 54724 KB Output is correct
128 Correct 197 ms 54740 KB Output is correct
129 Correct 181 ms 54780 KB Output is correct
130 Correct 204 ms 52968 KB Output is correct
131 Correct 217 ms 54728 KB Output is correct
132 Correct 209 ms 54840 KB Output is correct
133 Correct 203 ms 54780 KB Output is correct
134 Correct 201 ms 54804 KB Output is correct
135 Correct 201 ms 54636 KB Output is correct
136 Correct 204 ms 54996 KB Output is correct
137 Correct 175 ms 54748 KB Output is correct
138 Correct 192 ms 54752 KB Output is correct
139 Correct 179 ms 55100 KB Output is correct
140 Correct 183 ms 54728 KB Output is correct
141 Correct 3 ms 1368 KB Output is correct
142 Correct 3 ms 1368 KB Output is correct
143 Correct 3 ms 1368 KB Output is correct
144 Correct 3 ms 1368 KB Output is correct
145 Correct 2 ms 1368 KB Output is correct
146 Correct 2 ms 600 KB Output is correct
147 Correct 3 ms 1368 KB Output is correct
148 Correct 3 ms 1368 KB Output is correct
149 Correct 3 ms 1368 KB Output is correct
150 Correct 3 ms 1368 KB Output is correct
151 Correct 3 ms 1368 KB Output is correct
152 Correct 3 ms 1376 KB Output is correct
153 Correct 2 ms 1368 KB Output is correct
154 Correct 3 ms 1368 KB Output is correct
155 Correct 2 ms 1368 KB Output is correct
156 Correct 3 ms 1368 KB Output is correct
157 Correct 1201 ms 48676 KB Output is correct
158 Correct 1353 ms 54816 KB Output is correct
159 Correct 1487 ms 54776 KB Output is correct
160 Correct 1468 ms 54824 KB Output is correct
161 Correct 1540 ms 54748 KB Output is correct
162 Correct 1426 ms 54752 KB Output is correct
163 Correct 1387 ms 54728 KB Output is correct
164 Correct 1169 ms 54736 KB Output is correct
165 Correct 1420 ms 54776 KB Output is correct
166 Correct 1153 ms 54748 KB Output is correct
167 Correct 1385 ms 54768 KB Output is correct
168 Correct 0 ms 344 KB Output is correct
169 Correct 793 ms 18704 KB Output is correct
170 Correct 1632 ms 55008 KB Output is correct
171 Correct 1589 ms 54736 KB Output is correct
172 Correct 1597 ms 54712 KB Output is correct
173 Correct 1624 ms 54776 KB Output is correct
174 Correct 1605 ms 54800 KB Output is correct
175 Correct 1610 ms 54624 KB Output is correct
176 Correct 1180 ms 54772 KB Output is correct
177 Correct 1393 ms 54616 KB Output is correct
178 Correct 1191 ms 54740 KB Output is correct
179 Correct 1414 ms 54832 KB Output is correct