Submission #823751

# Submission time Handle Problem Language Result Execution time Memory
823751 2023-08-13T04:38:42 Z becaido Fountain Parks (IOI21_parks) C++17
100 / 100
478 ms 40188 KB
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include <bits/stdc++.h>
#include "parks.h"
using namespace std;

#define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
#define pb emplace_back
#define F first
#define S second

const int SIZE = 2e5 + 5;

int to[SIZE], h[SIZE];
int dsu(int x) {
    return x == to[x] ? x : (to[x] = dsu(to[x]));
}
void merge(int a, int b) {
    a = dsu(a), b = dsu(b);
    if (a == b) return;
    if (h[a] < h[b]) swap(a, b);
    to[b] = a;
    h[a] += (h[a] == h[b]);
}

int construct_roads(vector<int> x, vector<int> y) {
    int n = x.size();
    map<pair<int, int>, int> mp;
    FOR (i, 0, n - 1) mp[{x[i], y[i]}] = i;
    vector<pair<int, int>> e;
    FOR (i, 0, n - 1) {
        if (mp.count({x[i] + 2, y[i]})) {
            int j = mp[{x[i] + 2, y[i]}];
            e.pb(i, j);
        }
        if (mp.count({x[i], y[i] + 2})) {
            int j = mp[{x[i], y[i] + 2}];
            e.pb(i, j);
        }
    }
    sort(e.begin(), e.end(), [&](auto l, auto r) {
        return make_tuple(x[l.F], x[l.S], y[l.F], y[l.S]) < make_tuple(x[r.F], x[r.S], y[r.F], y[r.S]);
    });
    vector<int> u, v, mx, my;
    set<pair<int, int>> s;
    iota(to, to + n, 0);
    for (auto [a, b] : e) if (dsu(a) != dsu(b)) {
        if (x[a] == x[b]) {
            int cx = x[a] + ((x[a] + y[a]) % 4 ? 1 : -1);
            int cy = (y[a] + y[b]) / 2;
            if (!s.count({cx, cy})) {
                s.emplace(cx, cy);
                merge(a, b);
                u.pb(a), v.pb(b);
                mx.pb(cx), my.pb(cy);
            }
        } else {
            int cx = (x[a] + x[b]) / 2;
            int cy = y[a] + ((x[a] + y[a]) % 4 ? -1 : 1);
            if (!s.count({cx, cy})) {
                s.emplace(cx, cy);
                merge(a, b);
                u.pb(a), v.pb(b);
                mx.pb(cx), my.pb(cy);
            }
        }
    }
    if (u.size() != n - 1) return 0;
    build(u, v, mx, my);
    return 1;
}

Compilation message

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:68:18: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   68 |     if (u.size() != n - 1) return 0;
      |         ~~~~~~~~~^~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 133 ms 19248 KB Output is correct
10 Correct 9 ms 2356 KB Output is correct
11 Correct 54 ms 10404 KB Output is correct
12 Correct 14 ms 3304 KB Output is correct
13 Correct 36 ms 7152 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 150 ms 19200 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 133 ms 19248 KB Output is correct
10 Correct 9 ms 2356 KB Output is correct
11 Correct 54 ms 10404 KB Output is correct
12 Correct 14 ms 3304 KB Output is correct
13 Correct 36 ms 7152 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 150 ms 19200 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 411 ms 38484 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 3 ms 724 KB Output is correct
27 Correct 4 ms 852 KB Output is correct
28 Correct 120 ms 15488 KB Output is correct
29 Correct 196 ms 22988 KB Output is correct
30 Correct 312 ms 30960 KB Output is correct
31 Correct 384 ms 38504 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 212 KB Output is correct
36 Correct 0 ms 212 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 596 KB Output is correct
44 Correct 3 ms 712 KB Output is correct
45 Correct 154 ms 19812 KB Output is correct
46 Correct 232 ms 29084 KB Output is correct
47 Correct 235 ms 29140 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 133 ms 19248 KB Output is correct
10 Correct 9 ms 2356 KB Output is correct
11 Correct 54 ms 10404 KB Output is correct
12 Correct 14 ms 3304 KB Output is correct
13 Correct 36 ms 7152 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 150 ms 19200 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 411 ms 38484 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 3 ms 724 KB Output is correct
27 Correct 4 ms 852 KB Output is correct
28 Correct 120 ms 15488 KB Output is correct
29 Correct 196 ms 22988 KB Output is correct
30 Correct 312 ms 30960 KB Output is correct
31 Correct 384 ms 38504 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 212 KB Output is correct
36 Correct 0 ms 212 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 596 KB Output is correct
44 Correct 3 ms 712 KB Output is correct
45 Correct 154 ms 19812 KB Output is correct
46 Correct 232 ms 29084 KB Output is correct
47 Correct 235 ms 29140 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 470 ms 38408 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 2 ms 596 KB Output is correct
58 Correct 8 ms 1492 KB Output is correct
59 Correct 10 ms 1868 KB Output is correct
60 Correct 168 ms 19340 KB Output is correct
61 Correct 257 ms 27184 KB Output is correct
62 Correct 318 ms 32020 KB Output is correct
63 Correct 393 ms 38616 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 0 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 347 ms 38424 KB Output is correct
68 Correct 333 ms 38400 KB Output is correct
69 Correct 325 ms 38308 KB Output is correct
70 Correct 4 ms 852 KB Output is correct
71 Correct 7 ms 1564 KB Output is correct
72 Correct 146 ms 19580 KB Output is correct
73 Correct 243 ms 29900 KB Output is correct
74 Correct 399 ms 39236 KB Output is correct
75 Correct 356 ms 38500 KB Output is correct
76 Correct 318 ms 38532 KB Output is correct
77 Correct 4 ms 1108 KB Output is correct
78 Correct 10 ms 1876 KB Output is correct
79 Correct 148 ms 19628 KB Output is correct
80 Correct 250 ms 29896 KB Output is correct
81 Correct 425 ms 39256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 133 ms 19248 KB Output is correct
10 Correct 9 ms 2356 KB Output is correct
11 Correct 54 ms 10404 KB Output is correct
12 Correct 14 ms 3304 KB Output is correct
13 Correct 36 ms 7152 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 150 ms 19200 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 351 ms 39312 KB Output is correct
21 Correct 341 ms 39172 KB Output is correct
22 Correct 368 ms 39120 KB Output is correct
23 Correct 263 ms 33252 KB Output is correct
24 Correct 198 ms 16804 KB Output is correct
25 Correct 318 ms 31656 KB Output is correct
26 Correct 291 ms 31696 KB Output is correct
27 Correct 355 ms 38504 KB Output is correct
28 Correct 382 ms 39072 KB Output is correct
29 Correct 381 ms 38416 KB Output is correct
30 Correct 384 ms 39040 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 19 ms 3332 KB Output is correct
33 Correct 69 ms 8488 KB Output is correct
34 Correct 407 ms 39348 KB Output is correct
35 Correct 10 ms 1876 KB Output is correct
36 Correct 61 ms 8140 KB Output is correct
37 Correct 144 ms 16000 KB Output is correct
38 Correct 125 ms 16364 KB Output is correct
39 Correct 183 ms 22116 KB Output is correct
40 Correct 259 ms 28988 KB Output is correct
41 Correct 311 ms 34292 KB Output is correct
42 Correct 410 ms 40188 KB Output is correct
43 Correct 0 ms 212 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 0 ms 212 KB Output is correct
46 Correct 0 ms 212 KB Output is correct
47 Correct 0 ms 212 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 0 ms 212 KB Output is correct
54 Correct 2 ms 596 KB Output is correct
55 Correct 3 ms 724 KB Output is correct
56 Correct 152 ms 19636 KB Output is correct
57 Correct 223 ms 29172 KB Output is correct
58 Correct 242 ms 29080 KB Output is correct
59 Correct 1 ms 212 KB Output is correct
60 Correct 0 ms 212 KB Output is correct
61 Correct 0 ms 212 KB Output is correct
62 Correct 313 ms 38452 KB Output is correct
63 Correct 323 ms 38416 KB Output is correct
64 Correct 358 ms 38348 KB Output is correct
65 Correct 4 ms 852 KB Output is correct
66 Correct 7 ms 1516 KB Output is correct
67 Correct 149 ms 19524 KB Output is correct
68 Correct 254 ms 29832 KB Output is correct
69 Correct 337 ms 39168 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 133 ms 19248 KB Output is correct
10 Correct 9 ms 2356 KB Output is correct
11 Correct 54 ms 10404 KB Output is correct
12 Correct 14 ms 3304 KB Output is correct
13 Correct 36 ms 7152 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 150 ms 19200 KB Output is correct
17 Correct 358 ms 38896 KB Output is correct
18 Correct 338 ms 38936 KB Output is correct
19 Correct 384 ms 39092 KB Output is correct
20 Correct 378 ms 37664 KB Output is correct
21 Correct 330 ms 33808 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 52 ms 6580 KB Output is correct
24 Correct 22 ms 3528 KB Output is correct
25 Correct 90 ms 11864 KB Output is correct
26 Correct 185 ms 19212 KB Output is correct
27 Correct 175 ms 20112 KB Output is correct
28 Correct 223 ms 25116 KB Output is correct
29 Correct 288 ms 30800 KB Output is correct
30 Correct 371 ms 35064 KB Output is correct
31 Correct 382 ms 40120 KB Output is correct
32 Correct 401 ms 38424 KB Output is correct
33 Correct 334 ms 38540 KB Output is correct
34 Correct 5 ms 1108 KB Output is correct
35 Correct 8 ms 1704 KB Output is correct
36 Correct 148 ms 19596 KB Output is correct
37 Correct 266 ms 29824 KB Output is correct
38 Correct 357 ms 39200 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 133 ms 19248 KB Output is correct
10 Correct 9 ms 2356 KB Output is correct
11 Correct 54 ms 10404 KB Output is correct
12 Correct 14 ms 3304 KB Output is correct
13 Correct 36 ms 7152 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 150 ms 19200 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 411 ms 38484 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 3 ms 724 KB Output is correct
27 Correct 4 ms 852 KB Output is correct
28 Correct 120 ms 15488 KB Output is correct
29 Correct 196 ms 22988 KB Output is correct
30 Correct 312 ms 30960 KB Output is correct
31 Correct 384 ms 38504 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 212 KB Output is correct
36 Correct 0 ms 212 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 596 KB Output is correct
44 Correct 3 ms 712 KB Output is correct
45 Correct 154 ms 19812 KB Output is correct
46 Correct 232 ms 29084 KB Output is correct
47 Correct 235 ms 29140 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 470 ms 38408 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 2 ms 596 KB Output is correct
58 Correct 8 ms 1492 KB Output is correct
59 Correct 10 ms 1868 KB Output is correct
60 Correct 168 ms 19340 KB Output is correct
61 Correct 257 ms 27184 KB Output is correct
62 Correct 318 ms 32020 KB Output is correct
63 Correct 393 ms 38616 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 0 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 347 ms 38424 KB Output is correct
68 Correct 333 ms 38400 KB Output is correct
69 Correct 325 ms 38308 KB Output is correct
70 Correct 4 ms 852 KB Output is correct
71 Correct 7 ms 1564 KB Output is correct
72 Correct 146 ms 19580 KB Output is correct
73 Correct 243 ms 29900 KB Output is correct
74 Correct 399 ms 39236 KB Output is correct
75 Correct 356 ms 38500 KB Output is correct
76 Correct 318 ms 38532 KB Output is correct
77 Correct 4 ms 1108 KB Output is correct
78 Correct 10 ms 1876 KB Output is correct
79 Correct 148 ms 19628 KB Output is correct
80 Correct 250 ms 29896 KB Output is correct
81 Correct 425 ms 39256 KB Output is correct
82 Correct 0 ms 212 KB Output is correct
83 Correct 1 ms 212 KB Output is correct
84 Correct 0 ms 212 KB Output is correct
85 Correct 351 ms 39312 KB Output is correct
86 Correct 341 ms 39172 KB Output is correct
87 Correct 368 ms 39120 KB Output is correct
88 Correct 263 ms 33252 KB Output is correct
89 Correct 198 ms 16804 KB Output is correct
90 Correct 318 ms 31656 KB Output is correct
91 Correct 291 ms 31696 KB Output is correct
92 Correct 355 ms 38504 KB Output is correct
93 Correct 382 ms 39072 KB Output is correct
94 Correct 381 ms 38416 KB Output is correct
95 Correct 384 ms 39040 KB Output is correct
96 Correct 1 ms 212 KB Output is correct
97 Correct 19 ms 3332 KB Output is correct
98 Correct 69 ms 8488 KB Output is correct
99 Correct 407 ms 39348 KB Output is correct
100 Correct 10 ms 1876 KB Output is correct
101 Correct 61 ms 8140 KB Output is correct
102 Correct 144 ms 16000 KB Output is correct
103 Correct 125 ms 16364 KB Output is correct
104 Correct 183 ms 22116 KB Output is correct
105 Correct 259 ms 28988 KB Output is correct
106 Correct 311 ms 34292 KB Output is correct
107 Correct 410 ms 40188 KB Output is correct
108 Correct 0 ms 212 KB Output is correct
109 Correct 0 ms 212 KB Output is correct
110 Correct 0 ms 212 KB Output is correct
111 Correct 0 ms 212 KB Output is correct
112 Correct 0 ms 212 KB Output is correct
113 Correct 0 ms 212 KB Output is correct
114 Correct 0 ms 212 KB Output is correct
115 Correct 0 ms 212 KB Output is correct
116 Correct 0 ms 212 KB Output is correct
117 Correct 0 ms 212 KB Output is correct
118 Correct 0 ms 212 KB Output is correct
119 Correct 2 ms 596 KB Output is correct
120 Correct 3 ms 724 KB Output is correct
121 Correct 152 ms 19636 KB Output is correct
122 Correct 223 ms 29172 KB Output is correct
123 Correct 242 ms 29080 KB Output is correct
124 Correct 1 ms 212 KB Output is correct
125 Correct 0 ms 212 KB Output is correct
126 Correct 0 ms 212 KB Output is correct
127 Correct 313 ms 38452 KB Output is correct
128 Correct 323 ms 38416 KB Output is correct
129 Correct 358 ms 38348 KB Output is correct
130 Correct 4 ms 852 KB Output is correct
131 Correct 7 ms 1516 KB Output is correct
132 Correct 149 ms 19524 KB Output is correct
133 Correct 254 ms 29832 KB Output is correct
134 Correct 337 ms 39168 KB Output is correct
135 Correct 358 ms 38896 KB Output is correct
136 Correct 338 ms 38936 KB Output is correct
137 Correct 384 ms 39092 KB Output is correct
138 Correct 378 ms 37664 KB Output is correct
139 Correct 330 ms 33808 KB Output is correct
140 Correct 0 ms 212 KB Output is correct
141 Correct 52 ms 6580 KB Output is correct
142 Correct 22 ms 3528 KB Output is correct
143 Correct 90 ms 11864 KB Output is correct
144 Correct 185 ms 19212 KB Output is correct
145 Correct 175 ms 20112 KB Output is correct
146 Correct 223 ms 25116 KB Output is correct
147 Correct 288 ms 30800 KB Output is correct
148 Correct 371 ms 35064 KB Output is correct
149 Correct 382 ms 40120 KB Output is correct
150 Correct 401 ms 38424 KB Output is correct
151 Correct 334 ms 38540 KB Output is correct
152 Correct 5 ms 1108 KB Output is correct
153 Correct 8 ms 1704 KB Output is correct
154 Correct 148 ms 19596 KB Output is correct
155 Correct 266 ms 29824 KB Output is correct
156 Correct 357 ms 39200 KB Output is correct
157 Correct 0 ms 212 KB Output is correct
158 Correct 0 ms 212 KB Output is correct
159 Correct 1 ms 212 KB Output is correct
160 Correct 0 ms 212 KB Output is correct
161 Correct 478 ms 38884 KB Output is correct
162 Correct 321 ms 39284 KB Output is correct
163 Correct 377 ms 39292 KB Output is correct
164 Correct 358 ms 39236 KB Output is correct
165 Correct 439 ms 39176 KB Output is correct
166 Correct 412 ms 38732 KB Output is correct
167 Correct 73 ms 9504 KB Output is correct
168 Correct 39 ms 5192 KB Output is correct
169 Correct 119 ms 13560 KB Output is correct
170 Correct 274 ms 25536 KB Output is correct
171 Correct 378 ms 33308 KB Output is correct
172 Correct 187 ms 20096 KB Output is correct
173 Correct 222 ms 23876 KB Output is correct
174 Correct 271 ms 28880 KB Output is correct
175 Correct 329 ms 31992 KB Output is correct
176 Correct 372 ms 36120 KB Output is correct
177 Correct 451 ms 39932 KB Output is correct