답안 #616100

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
616100 2022-07-31T20:36:58 Z sofapuden 분수 공원 (IOI21_parks) C++17
100 / 100
569 ms 70864 KB
#include "parks.h"
#include<bits/stdc++.h>

using namespace std;

vector<int> p;
vector<pair<int,int>> v;
set<pair<int,int>> ben;
map<pair<int,int>,int> M;

vector<int> U, V, A, B;

int u(int x){return p[x] == x ? x : p[x] = u(p[x]);}

void b(int x, int y){
	if(u(x) == u(y))return;
	if(v[x] > v[y])swap(x,y);
	if(v[x].first == v[y].first){
		if((v[x].second+v[x].first)%4 == 2){
			if(ben.count({v[x].second+1,v[x].first-1}))return;
			ben.insert({v[x].second+1,v[x].first-1});
			U.push_back(M[v[x]]);
			V.push_back(M[v[y]]);
			A.push_back(v[x].first-1);
			B.push_back(v[x].second+1);
			p[u(x)] = u(y);
		} else {
			if(ben.count({v[x].second+1,v[x].first+1}))return;
			ben.insert({v[x].second+1,v[x].first+1});
			U.push_back(M[v[x]]);
			V.push_back(M[v[y]]);
			A.push_back(v[x].first+1);
			B.push_back(v[x].second+1);
			p[u(x)] = u(y);
		}
	} else {
		if((v[x].second+v[x].first)%4 == 2){
			if(ben.count({v[x].second+1,v[x].first+1}))return;
			ben.insert({v[x].second+1,v[x].first+1});
			U.push_back(M[v[x]]);
			V.push_back(M[v[y]]);
			A.push_back(v[x].first+1);
			B.push_back(v[x].second+1);
			p[u(x)] = u(y);
		} else {
			if(ben.count({v[x].second-1,v[x].first+1}))return;
			ben.insert({v[x].second-1,v[x].first+1});
			U.push_back(M[v[x]]);
			V.push_back(M[v[y]]);
			A.push_back(v[x].first+1);
			B.push_back(v[x].second-1);
			p[u(x)] = u(y);
		}
	}
}

int construct_roads(vector<int> x, vector<int> y) {	
	int n = x.size();
	p.resize(n);
	iota(p.begin(),p.end(),0);
	for(int i = 0; i < n; ++i){v.emplace_back(x[i],y[i]);M[v.back()]=i;}
	map<pair<int,int>,int> S;
	sort(v.begin(),v.end());
	for(int i = 0; i < n; ++i){
		if(S[{v[i].first-2,v[i].second}])b(i,S[{v[i].first-2,v[i].second}]-1);
		if(S[{v[i].first,v[i].second-2}])b(i,S[{v[i].first,v[i].second-2}]-1);
		S[{v[i].first,v[i].second}] = i+1;
	}
	for(int i = 1; i < n; ++i)if(u(i) != u(i-1))return 0;
	build(U,V,A,B);
	return 1;
}
# 결과 실행 시간 메모리 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 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 296 KB Output is correct
9 Correct 238 ms 34524 KB Output is correct
10 Correct 17 ms 3796 KB Output is correct
11 Correct 110 ms 18724 KB Output is correct
12 Correct 27 ms 5452 KB Output is correct
13 Correct 84 ms 13400 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 3 ms 852 KB Output is correct
16 Correct 230 ms 34560 KB Output is correct
# 결과 실행 시간 메모리 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 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 296 KB Output is correct
9 Correct 238 ms 34524 KB Output is correct
10 Correct 17 ms 3796 KB Output is correct
11 Correct 110 ms 18724 KB Output is correct
12 Correct 27 ms 5452 KB Output is correct
13 Correct 84 ms 13400 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 3 ms 852 KB Output is correct
16 Correct 230 ms 34560 KB Output is correct
17 Correct 0 ms 300 KB Output is correct
18 Correct 0 ms 304 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 523 ms 61684 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 3 ms 596 KB Output is correct
26 Correct 4 ms 980 KB Output is correct
27 Correct 5 ms 1236 KB Output is correct
28 Correct 167 ms 24716 KB Output is correct
29 Correct 317 ms 36952 KB Output is correct
30 Correct 403 ms 49572 KB Output is correct
31 Correct 569 ms 61612 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 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 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 296 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 3 ms 852 KB Output is correct
44 Correct 5 ms 1108 KB Output is correct
45 Correct 237 ms 33084 KB Output is correct
46 Correct 348 ms 48152 KB Output is correct
47 Correct 321 ms 48076 KB Output is correct
# 결과 실행 시간 메모리 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 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 296 KB Output is correct
9 Correct 238 ms 34524 KB Output is correct
10 Correct 17 ms 3796 KB Output is correct
11 Correct 110 ms 18724 KB Output is correct
12 Correct 27 ms 5452 KB Output is correct
13 Correct 84 ms 13400 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 3 ms 852 KB Output is correct
16 Correct 230 ms 34560 KB Output is correct
17 Correct 0 ms 300 KB Output is correct
18 Correct 0 ms 304 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 523 ms 61684 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 3 ms 596 KB Output is correct
26 Correct 4 ms 980 KB Output is correct
27 Correct 5 ms 1236 KB Output is correct
28 Correct 167 ms 24716 KB Output is correct
29 Correct 317 ms 36952 KB Output is correct
30 Correct 403 ms 49572 KB Output is correct
31 Correct 569 ms 61612 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 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 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 296 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 3 ms 852 KB Output is correct
44 Correct 5 ms 1108 KB Output is correct
45 Correct 237 ms 33084 KB Output is correct
46 Correct 348 ms 48152 KB Output is correct
47 Correct 321 ms 48076 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 300 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 522 ms 58980 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 3 ms 724 KB Output is correct
58 Correct 16 ms 2008 KB Output is correct
59 Correct 16 ms 2688 KB Output is correct
60 Correct 219 ms 29420 KB Output is correct
61 Correct 303 ms 40724 KB Output is correct
62 Correct 419 ms 49212 KB Output is correct
63 Correct 505 ms 59164 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 487 ms 67936 KB Output is correct
68 Correct 490 ms 67976 KB Output is correct
69 Correct 485 ms 67012 KB Output is correct
70 Correct 5 ms 1364 KB Output is correct
71 Correct 11 ms 2484 KB Output is correct
72 Correct 200 ms 32300 KB Output is correct
73 Correct 343 ms 48808 KB Output is correct
74 Correct 481 ms 64776 KB Output is correct
75 Correct 485 ms 62680 KB Output is correct
76 Correct 506 ms 67880 KB Output is correct
77 Correct 6 ms 1620 KB Output is correct
78 Correct 12 ms 2644 KB Output is correct
79 Correct 198 ms 31580 KB Output is correct
80 Correct 340 ms 47832 KB Output is correct
81 Correct 449 ms 63344 KB Output is correct
# 결과 실행 시간 메모리 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 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 296 KB Output is correct
9 Correct 238 ms 34524 KB Output is correct
10 Correct 17 ms 3796 KB Output is correct
11 Correct 110 ms 18724 KB Output is correct
12 Correct 27 ms 5452 KB Output is correct
13 Correct 84 ms 13400 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 3 ms 852 KB Output is correct
16 Correct 230 ms 34560 KB Output is correct
17 Correct 1 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 468 ms 63364 KB Output is correct
21 Correct 444 ms 69228 KB Output is correct
22 Correct 455 ms 62384 KB Output is correct
23 Correct 385 ms 58416 KB Output is correct
24 Correct 285 ms 57620 KB Output is correct
25 Correct 446 ms 57700 KB Output is correct
26 Correct 408 ms 57740 KB Output is correct
27 Correct 461 ms 66588 KB Output is correct
28 Correct 455 ms 66568 KB Output is correct
29 Correct 521 ms 66732 KB Output is correct
30 Correct 518 ms 66660 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 26 ms 4948 KB Output is correct
33 Correct 139 ms 29248 KB Output is correct
34 Correct 461 ms 70784 KB Output is correct
35 Correct 16 ms 2936 KB Output is correct
36 Correct 86 ms 13724 KB Output is correct
37 Correct 211 ms 27204 KB Output is correct
38 Correct 198 ms 25896 KB Output is correct
39 Correct 256 ms 35300 KB Output is correct
40 Correct 349 ms 45104 KB Output is correct
41 Correct 468 ms 54524 KB Output is correct
42 Correct 561 ms 64128 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 1 ms 212 KB Output is correct
46 Correct 1 ms 212 KB Output is correct
47 Correct 0 ms 296 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 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 3 ms 836 KB Output is correct
55 Correct 6 ms 1028 KB Output is correct
56 Correct 205 ms 33044 KB Output is correct
57 Correct 342 ms 48092 KB Output is correct
58 Correct 306 ms 48164 KB Output is correct
59 Correct 1 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 0 ms 212 KB Output is correct
62 Correct 478 ms 67944 KB Output is correct
63 Correct 513 ms 67848 KB Output is correct
64 Correct 503 ms 67080 KB Output is correct
65 Correct 5 ms 1364 KB Output is correct
66 Correct 16 ms 2448 KB Output is correct
67 Correct 218 ms 32272 KB Output is correct
68 Correct 343 ms 48760 KB Output is correct
69 Correct 443 ms 64684 KB Output is correct
# 결과 실행 시간 메모리 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 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 296 KB Output is correct
9 Correct 238 ms 34524 KB Output is correct
10 Correct 17 ms 3796 KB Output is correct
11 Correct 110 ms 18724 KB Output is correct
12 Correct 27 ms 5452 KB Output is correct
13 Correct 84 ms 13400 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 3 ms 852 KB Output is correct
16 Correct 230 ms 34560 KB Output is correct
17 Correct 498 ms 68692 KB Output is correct
18 Correct 473 ms 69008 KB Output is correct
19 Correct 428 ms 66132 KB Output is correct
20 Correct 438 ms 57092 KB Output is correct
21 Correct 417 ms 56196 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 63 ms 10268 KB Output is correct
24 Correct 31 ms 5512 KB Output is correct
25 Correct 138 ms 18684 KB Output is correct
26 Correct 229 ms 31312 KB Output is correct
27 Correct 251 ms 31008 KB Output is correct
28 Correct 334 ms 38872 KB Output is correct
29 Correct 375 ms 46972 KB Output is correct
30 Correct 459 ms 53976 KB Output is correct
31 Correct 506 ms 61980 KB Output is correct
32 Correct 489 ms 62648 KB Output is correct
33 Correct 521 ms 67864 KB Output is correct
34 Correct 6 ms 1620 KB Output is correct
35 Correct 15 ms 2748 KB Output is correct
36 Correct 210 ms 31504 KB Output is correct
37 Correct 338 ms 47844 KB Output is correct
38 Correct 501 ms 63336 KB Output is correct
# 결과 실행 시간 메모리 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 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 296 KB Output is correct
8 Correct 1 ms 296 KB Output is correct
9 Correct 238 ms 34524 KB Output is correct
10 Correct 17 ms 3796 KB Output is correct
11 Correct 110 ms 18724 KB Output is correct
12 Correct 27 ms 5452 KB Output is correct
13 Correct 84 ms 13400 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 3 ms 852 KB Output is correct
16 Correct 230 ms 34560 KB Output is correct
17 Correct 0 ms 300 KB Output is correct
18 Correct 0 ms 304 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 523 ms 61684 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 3 ms 596 KB Output is correct
26 Correct 4 ms 980 KB Output is correct
27 Correct 5 ms 1236 KB Output is correct
28 Correct 167 ms 24716 KB Output is correct
29 Correct 317 ms 36952 KB Output is correct
30 Correct 403 ms 49572 KB Output is correct
31 Correct 569 ms 61612 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 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 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 296 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 3 ms 852 KB Output is correct
44 Correct 5 ms 1108 KB Output is correct
45 Correct 237 ms 33084 KB Output is correct
46 Correct 348 ms 48152 KB Output is correct
47 Correct 321 ms 48076 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 300 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 522 ms 58980 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 3 ms 724 KB Output is correct
58 Correct 16 ms 2008 KB Output is correct
59 Correct 16 ms 2688 KB Output is correct
60 Correct 219 ms 29420 KB Output is correct
61 Correct 303 ms 40724 KB Output is correct
62 Correct 419 ms 49212 KB Output is correct
63 Correct 505 ms 59164 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 487 ms 67936 KB Output is correct
68 Correct 490 ms 67976 KB Output is correct
69 Correct 485 ms 67012 KB Output is correct
70 Correct 5 ms 1364 KB Output is correct
71 Correct 11 ms 2484 KB Output is correct
72 Correct 200 ms 32300 KB Output is correct
73 Correct 343 ms 48808 KB Output is correct
74 Correct 481 ms 64776 KB Output is correct
75 Correct 485 ms 62680 KB Output is correct
76 Correct 506 ms 67880 KB Output is correct
77 Correct 6 ms 1620 KB Output is correct
78 Correct 12 ms 2644 KB Output is correct
79 Correct 198 ms 31580 KB Output is correct
80 Correct 340 ms 47832 KB Output is correct
81 Correct 449 ms 63344 KB Output is correct
82 Correct 1 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 468 ms 63364 KB Output is correct
86 Correct 444 ms 69228 KB Output is correct
87 Correct 455 ms 62384 KB Output is correct
88 Correct 385 ms 58416 KB Output is correct
89 Correct 285 ms 57620 KB Output is correct
90 Correct 446 ms 57700 KB Output is correct
91 Correct 408 ms 57740 KB Output is correct
92 Correct 461 ms 66588 KB Output is correct
93 Correct 455 ms 66568 KB Output is correct
94 Correct 521 ms 66732 KB Output is correct
95 Correct 518 ms 66660 KB Output is correct
96 Correct 1 ms 212 KB Output is correct
97 Correct 26 ms 4948 KB Output is correct
98 Correct 139 ms 29248 KB Output is correct
99 Correct 461 ms 70784 KB Output is correct
100 Correct 16 ms 2936 KB Output is correct
101 Correct 86 ms 13724 KB Output is correct
102 Correct 211 ms 27204 KB Output is correct
103 Correct 198 ms 25896 KB Output is correct
104 Correct 256 ms 35300 KB Output is correct
105 Correct 349 ms 45104 KB Output is correct
106 Correct 468 ms 54524 KB Output is correct
107 Correct 561 ms 64128 KB Output is correct
108 Correct 1 ms 212 KB Output is correct
109 Correct 0 ms 212 KB Output is correct
110 Correct 1 ms 212 KB Output is correct
111 Correct 1 ms 212 KB Output is correct
112 Correct 0 ms 296 KB Output is correct
113 Correct 1 ms 212 KB Output is correct
114 Correct 1 ms 212 KB Output is correct
115 Correct 1 ms 212 KB Output is correct
116 Correct 1 ms 212 KB Output is correct
117 Correct 1 ms 212 KB Output is correct
118 Correct 1 ms 212 KB Output is correct
119 Correct 3 ms 836 KB Output is correct
120 Correct 6 ms 1028 KB Output is correct
121 Correct 205 ms 33044 KB Output is correct
122 Correct 342 ms 48092 KB Output is correct
123 Correct 306 ms 48164 KB Output is correct
124 Correct 1 ms 212 KB Output is correct
125 Correct 1 ms 212 KB Output is correct
126 Correct 0 ms 212 KB Output is correct
127 Correct 478 ms 67944 KB Output is correct
128 Correct 513 ms 67848 KB Output is correct
129 Correct 503 ms 67080 KB Output is correct
130 Correct 5 ms 1364 KB Output is correct
131 Correct 16 ms 2448 KB Output is correct
132 Correct 218 ms 32272 KB Output is correct
133 Correct 343 ms 48760 KB Output is correct
134 Correct 443 ms 64684 KB Output is correct
135 Correct 498 ms 68692 KB Output is correct
136 Correct 473 ms 69008 KB Output is correct
137 Correct 428 ms 66132 KB Output is correct
138 Correct 438 ms 57092 KB Output is correct
139 Correct 417 ms 56196 KB Output is correct
140 Correct 1 ms 212 KB Output is correct
141 Correct 63 ms 10268 KB Output is correct
142 Correct 31 ms 5512 KB Output is correct
143 Correct 138 ms 18684 KB Output is correct
144 Correct 229 ms 31312 KB Output is correct
145 Correct 251 ms 31008 KB Output is correct
146 Correct 334 ms 38872 KB Output is correct
147 Correct 375 ms 46972 KB Output is correct
148 Correct 459 ms 53976 KB Output is correct
149 Correct 506 ms 61980 KB Output is correct
150 Correct 489 ms 62648 KB Output is correct
151 Correct 521 ms 67864 KB Output is correct
152 Correct 6 ms 1620 KB Output is correct
153 Correct 15 ms 2748 KB Output is correct
154 Correct 210 ms 31504 KB Output is correct
155 Correct 338 ms 47844 KB Output is correct
156 Correct 501 ms 63336 KB Output is correct
157 Correct 1 ms 252 KB Output is correct
158 Correct 1 ms 212 KB Output is correct
159 Correct 1 ms 212 KB Output is correct
160 Correct 1 ms 212 KB Output is correct
161 Correct 493 ms 54836 KB Output is correct
162 Correct 468 ms 70864 KB Output is correct
163 Correct 531 ms 66444 KB Output is correct
164 Correct 465 ms 66344 KB Output is correct
165 Correct 512 ms 58620 KB Output is correct
166 Correct 513 ms 55100 KB Output is correct
167 Correct 110 ms 13808 KB Output is correct
168 Correct 62 ms 7112 KB Output is correct
169 Correct 156 ms 18928 KB Output is correct
170 Correct 348 ms 35352 KB Output is correct
171 Correct 421 ms 46224 KB Output is correct
172 Correct 249 ms 28160 KB Output is correct
173 Correct 343 ms 33456 KB Output is correct
174 Correct 352 ms 38888 KB Output is correct
175 Correct 396 ms 44640 KB Output is correct
176 Correct 474 ms 50660 KB Output is correct
177 Correct 533 ms 55984 KB Output is correct