Submission #628115

# Submission time Handle Problem Language Result Execution time Memory
628115 2022-08-13T05:28:17 Z MilosMilutinovic Fountain Parks (IOI21_parks) C++17
100 / 100
441 ms 32568 KB
#include "parks.h"
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i ++)
#define rep1(i, n) for(int i = 1; i <= (int)(n); i ++)
#define MP make_pair

using namespace std;
typedef long long LL;
typedef pair<int, int> PII;

int n, x[200005], y[200005];
PII ord[200005];
int rt[200005];
int root(int x)
{
	return rt[x] == x ? x : rt[x] = root(rt[x]);
}
map<PII, int> idx;
vector<int> u, v, a, b;
void add(int i, int j)
{
	u.push_back(i);
	v.push_back(j);
	assert(root(i) != root(j));
	rt[root(i)] = root(j);
	if(x[i] == x[j]) {
		if((x[i] + y[i]) % 4 == 2) a.push_back(x[i] - 1);
		else a.push_back(x[i] + 1);
		b.push_back((y[i] + y[j]) / 2);
	} else {
		a.push_back((x[i] + x[j]) / 2);
		if((x[i] + y[i]) % 4 == 2) b.push_back(y[i] + 1);
		else b.push_back(y[i] - 1);
	}
}
int construct_roads(vector<int> X, vector<int> Y)
{
	n = (int) X.size();
	rep(i, n) {
		x[i] = X[i];
		y[i] = Y[i];
		rt[i] = i;
		idx[{x[i], y[i]}] = i;
	}

    rep(i, n) ord[i] = MP(x[i] + y[i], i);
	sort(ord, ord + n);
	reverse(ord, ord + n);
	rep(id, n) {
		int i = ord[id].second;
		int id0 = (idx.count(MP(x[i] + 2, y[i])) ? idx[MP(x[i] + 2, y[i])] : -1);
		int id1 = (idx.count(MP(x[i], y[i] + 2)) ? idx[MP(x[i], y[i] + 2)] : -1);
		if(id0 == -1 && id1 == -1) continue;
		if(id0 != -1 && id1 == -1) add(i, id0);
		if(id0 == -1 && id1 != -1) add(i, id1);
		if(id0 != -1 && id1 != -1) {
			if(root(id0) != root(id1)) {
				add(i, id0); add(i, id1);
			} else {
				if(ord[id].first % 4 == 2) add(i, id1);
				else add(i, id0);
			}
		}
	}

	if((int) u.size() != n - 1) return 0;

	build(u, v, a, b);
	return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 1 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 117 ms 14900 KB Output is correct
10 Correct 13 ms 2004 KB Output is correct
11 Correct 58 ms 8156 KB Output is correct
12 Correct 15 ms 2724 KB Output is correct
13 Correct 30 ms 5532 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 120 ms 14900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 117 ms 14900 KB Output is correct
10 Correct 13 ms 2004 KB Output is correct
11 Correct 58 ms 8156 KB Output is correct
12 Correct 15 ms 2724 KB Output is correct
13 Correct 30 ms 5532 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 120 ms 14900 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 293 ms 29344 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 2 ms 596 KB Output is correct
27 Correct 3 ms 724 KB Output is correct
28 Correct 129 ms 11972 KB Output is correct
29 Correct 152 ms 17828 KB Output is correct
30 Correct 227 ms 25000 KB Output is correct
31 Correct 297 ms 31072 KB Output is correct
32 Correct 1 ms 256 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 308 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 308 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 2 ms 724 KB Output is correct
45 Correct 120 ms 15808 KB Output is correct
46 Correct 183 ms 22680 KB Output is correct
47 Correct 204 ms 22700 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 117 ms 14900 KB Output is correct
10 Correct 13 ms 2004 KB Output is correct
11 Correct 58 ms 8156 KB Output is correct
12 Correct 15 ms 2724 KB Output is correct
13 Correct 30 ms 5532 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 120 ms 14900 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 293 ms 29344 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 2 ms 596 KB Output is correct
27 Correct 3 ms 724 KB Output is correct
28 Correct 129 ms 11972 KB Output is correct
29 Correct 152 ms 17828 KB Output is correct
30 Correct 227 ms 25000 KB Output is correct
31 Correct 297 ms 31072 KB Output is correct
32 Correct 1 ms 256 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 308 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 308 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 2 ms 724 KB Output is correct
45 Correct 120 ms 15808 KB Output is correct
46 Correct 183 ms 22680 KB Output is correct
47 Correct 204 ms 22700 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 1 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 313 ms 31020 KB Output is correct
56 Correct 1 ms 212 KB Output is correct
57 Correct 3 ms 596 KB Output is correct
58 Correct 7 ms 1364 KB Output is correct
59 Correct 8 ms 1628 KB Output is correct
60 Correct 128 ms 15640 KB Output is correct
61 Correct 205 ms 21180 KB Output is correct
62 Correct 235 ms 25700 KB Output is correct
63 Correct 293 ms 31144 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 1 ms 304 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 299 ms 30972 KB Output is correct
68 Correct 284 ms 31044 KB Output is correct
69 Correct 289 ms 30952 KB Output is correct
70 Correct 3 ms 724 KB Output is correct
71 Correct 7 ms 1332 KB Output is correct
72 Correct 122 ms 15744 KB Output is correct
73 Correct 209 ms 23408 KB Output is correct
74 Correct 291 ms 31024 KB Output is correct
75 Correct 319 ms 31012 KB Output is correct
76 Correct 307 ms 31076 KB Output is correct
77 Correct 4 ms 980 KB Output is correct
78 Correct 8 ms 1480 KB Output is correct
79 Correct 151 ms 15644 KB Output is correct
80 Correct 204 ms 23376 KB Output is correct
81 Correct 302 ms 31044 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 117 ms 14900 KB Output is correct
10 Correct 13 ms 2004 KB Output is correct
11 Correct 58 ms 8156 KB Output is correct
12 Correct 15 ms 2724 KB Output is correct
13 Correct 30 ms 5532 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 120 ms 14900 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 402 ms 29808 KB Output is correct
21 Correct 281 ms 29624 KB Output is correct
22 Correct 441 ms 31984 KB Output is correct
23 Correct 248 ms 26788 KB Output is correct
24 Correct 283 ms 21712 KB Output is correct
25 Correct 311 ms 24636 KB Output is correct
26 Correct 305 ms 24704 KB Output is correct
27 Correct 387 ms 31036 KB Output is correct
28 Correct 354 ms 31024 KB Output is correct
29 Correct 380 ms 31056 KB Output is correct
30 Correct 378 ms 31100 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 19 ms 2840 KB Output is correct
33 Correct 86 ms 11368 KB Output is correct
34 Correct 301 ms 32316 KB Output is correct
35 Correct 12 ms 1656 KB Output is correct
36 Correct 59 ms 6648 KB Output is correct
37 Correct 119 ms 12948 KB Output is correct
38 Correct 117 ms 13336 KB Output is correct
39 Correct 185 ms 17900 KB Output is correct
40 Correct 288 ms 22824 KB Output is correct
41 Correct 327 ms 27616 KB Output is correct
42 Correct 388 ms 32428 KB Output is correct
43 Correct 0 ms 212 KB Output is correct
44 Correct 1 ms 212 KB Output is correct
45 Correct 0 ms 212 KB Output is correct
46 Correct 1 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 1 ms 340 KB Output is correct
52 Correct 0 ms 308 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 2 ms 584 KB Output is correct
55 Correct 3 ms 768 KB Output is correct
56 Correct 126 ms 15752 KB Output is correct
57 Correct 198 ms 22564 KB Output is correct
58 Correct 191 ms 22620 KB Output is correct
59 Correct 0 ms 212 KB Output is correct
60 Correct 1 ms 308 KB Output is correct
61 Correct 0 ms 212 KB Output is correct
62 Correct 280 ms 31072 KB Output is correct
63 Correct 295 ms 31004 KB Output is correct
64 Correct 302 ms 31000 KB Output is correct
65 Correct 3 ms 852 KB Output is correct
66 Correct 6 ms 1332 KB Output is correct
67 Correct 135 ms 15776 KB Output is correct
68 Correct 205 ms 23368 KB Output is correct
69 Correct 333 ms 31052 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 117 ms 14900 KB Output is correct
10 Correct 13 ms 2004 KB Output is correct
11 Correct 58 ms 8156 KB Output is correct
12 Correct 15 ms 2724 KB Output is correct
13 Correct 30 ms 5532 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 120 ms 14900 KB Output is correct
17 Correct 310 ms 29600 KB Output is correct
18 Correct 324 ms 31720 KB Output is correct
19 Correct 366 ms 31872 KB Output is correct
20 Correct 402 ms 30288 KB Output is correct
21 Correct 338 ms 27284 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 47 ms 5936 KB Output is correct
24 Correct 19 ms 3148 KB Output is correct
25 Correct 84 ms 9424 KB Output is correct
26 Correct 158 ms 15548 KB Output is correct
27 Correct 172 ms 16408 KB Output is correct
28 Correct 229 ms 20612 KB Output is correct
29 Correct 289 ms 24672 KB Output is correct
30 Correct 346 ms 28044 KB Output is correct
31 Correct 407 ms 32568 KB Output is correct
32 Correct 309 ms 30988 KB Output is correct
33 Correct 292 ms 31076 KB Output is correct
34 Correct 4 ms 980 KB Output is correct
35 Correct 9 ms 1476 KB Output is correct
36 Correct 126 ms 15652 KB Output is correct
37 Correct 208 ms 23364 KB Output is correct
38 Correct 287 ms 31064 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 117 ms 14900 KB Output is correct
10 Correct 13 ms 2004 KB Output is correct
11 Correct 58 ms 8156 KB Output is correct
12 Correct 15 ms 2724 KB Output is correct
13 Correct 30 ms 5532 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 120 ms 14900 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 293 ms 29344 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 2 ms 596 KB Output is correct
27 Correct 3 ms 724 KB Output is correct
28 Correct 129 ms 11972 KB Output is correct
29 Correct 152 ms 17828 KB Output is correct
30 Correct 227 ms 25000 KB Output is correct
31 Correct 297 ms 31072 KB Output is correct
32 Correct 1 ms 256 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 308 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 308 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 2 ms 724 KB Output is correct
45 Correct 120 ms 15808 KB Output is correct
46 Correct 183 ms 22680 KB Output is correct
47 Correct 204 ms 22700 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 1 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 313 ms 31020 KB Output is correct
56 Correct 1 ms 212 KB Output is correct
57 Correct 3 ms 596 KB Output is correct
58 Correct 7 ms 1364 KB Output is correct
59 Correct 8 ms 1628 KB Output is correct
60 Correct 128 ms 15640 KB Output is correct
61 Correct 205 ms 21180 KB Output is correct
62 Correct 235 ms 25700 KB Output is correct
63 Correct 293 ms 31144 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 1 ms 304 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 299 ms 30972 KB Output is correct
68 Correct 284 ms 31044 KB Output is correct
69 Correct 289 ms 30952 KB Output is correct
70 Correct 3 ms 724 KB Output is correct
71 Correct 7 ms 1332 KB Output is correct
72 Correct 122 ms 15744 KB Output is correct
73 Correct 209 ms 23408 KB Output is correct
74 Correct 291 ms 31024 KB Output is correct
75 Correct 319 ms 31012 KB Output is correct
76 Correct 307 ms 31076 KB Output is correct
77 Correct 4 ms 980 KB Output is correct
78 Correct 8 ms 1480 KB Output is correct
79 Correct 151 ms 15644 KB Output is correct
80 Correct 204 ms 23376 KB Output is correct
81 Correct 302 ms 31044 KB Output is correct
82 Correct 0 ms 212 KB Output is correct
83 Correct 0 ms 212 KB Output is correct
84 Correct 0 ms 212 KB Output is correct
85 Correct 402 ms 29808 KB Output is correct
86 Correct 281 ms 29624 KB Output is correct
87 Correct 441 ms 31984 KB Output is correct
88 Correct 248 ms 26788 KB Output is correct
89 Correct 283 ms 21712 KB Output is correct
90 Correct 311 ms 24636 KB Output is correct
91 Correct 305 ms 24704 KB Output is correct
92 Correct 387 ms 31036 KB Output is correct
93 Correct 354 ms 31024 KB Output is correct
94 Correct 380 ms 31056 KB Output is correct
95 Correct 378 ms 31100 KB Output is correct
96 Correct 1 ms 212 KB Output is correct
97 Correct 19 ms 2840 KB Output is correct
98 Correct 86 ms 11368 KB Output is correct
99 Correct 301 ms 32316 KB Output is correct
100 Correct 12 ms 1656 KB Output is correct
101 Correct 59 ms 6648 KB Output is correct
102 Correct 119 ms 12948 KB Output is correct
103 Correct 117 ms 13336 KB Output is correct
104 Correct 185 ms 17900 KB Output is correct
105 Correct 288 ms 22824 KB Output is correct
106 Correct 327 ms 27616 KB Output is correct
107 Correct 388 ms 32428 KB Output is correct
108 Correct 0 ms 212 KB Output is correct
109 Correct 1 ms 212 KB Output is correct
110 Correct 0 ms 212 KB Output is correct
111 Correct 1 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 1 ms 340 KB Output is correct
117 Correct 0 ms 308 KB Output is correct
118 Correct 1 ms 212 KB Output is correct
119 Correct 2 ms 584 KB Output is correct
120 Correct 3 ms 768 KB Output is correct
121 Correct 126 ms 15752 KB Output is correct
122 Correct 198 ms 22564 KB Output is correct
123 Correct 191 ms 22620 KB Output is correct
124 Correct 0 ms 212 KB Output is correct
125 Correct 1 ms 308 KB Output is correct
126 Correct 0 ms 212 KB Output is correct
127 Correct 280 ms 31072 KB Output is correct
128 Correct 295 ms 31004 KB Output is correct
129 Correct 302 ms 31000 KB Output is correct
130 Correct 3 ms 852 KB Output is correct
131 Correct 6 ms 1332 KB Output is correct
132 Correct 135 ms 15776 KB Output is correct
133 Correct 205 ms 23368 KB Output is correct
134 Correct 333 ms 31052 KB Output is correct
135 Correct 310 ms 29600 KB Output is correct
136 Correct 324 ms 31720 KB Output is correct
137 Correct 366 ms 31872 KB Output is correct
138 Correct 402 ms 30288 KB Output is correct
139 Correct 338 ms 27284 KB Output is correct
140 Correct 0 ms 212 KB Output is correct
141 Correct 47 ms 5936 KB Output is correct
142 Correct 19 ms 3148 KB Output is correct
143 Correct 84 ms 9424 KB Output is correct
144 Correct 158 ms 15548 KB Output is correct
145 Correct 172 ms 16408 KB Output is correct
146 Correct 229 ms 20612 KB Output is correct
147 Correct 289 ms 24672 KB Output is correct
148 Correct 346 ms 28044 KB Output is correct
149 Correct 407 ms 32568 KB Output is correct
150 Correct 309 ms 30988 KB Output is correct
151 Correct 292 ms 31076 KB Output is correct
152 Correct 4 ms 980 KB Output is correct
153 Correct 9 ms 1476 KB Output is correct
154 Correct 126 ms 15652 KB Output is correct
155 Correct 208 ms 23364 KB Output is correct
156 Correct 287 ms 31064 KB Output is correct
157 Correct 1 ms 308 KB Output is correct
158 Correct 0 ms 212 KB Output is correct
159 Correct 1 ms 212 KB Output is correct
160 Correct 1 ms 308 KB Output is correct
161 Correct 382 ms 31356 KB Output is correct
162 Correct 279 ms 32396 KB Output is correct
163 Correct 293 ms 32240 KB Output is correct
164 Correct 282 ms 32156 KB Output is correct
165 Correct 301 ms 31908 KB Output is correct
166 Correct 323 ms 31416 KB Output is correct
167 Correct 66 ms 7724 KB Output is correct
168 Correct 36 ms 4324 KB Output is correct
169 Correct 92 ms 10592 KB Output is correct
170 Correct 197 ms 19488 KB Output is correct
171 Correct 286 ms 25600 KB Output is correct
172 Correct 167 ms 16264 KB Output is correct
173 Correct 216 ms 19588 KB Output is correct
174 Correct 255 ms 22700 KB Output is correct
175 Correct 294 ms 25828 KB Output is correct
176 Correct 360 ms 29184 KB Output is correct
177 Correct 424 ms 32492 KB Output is correct