Submission #1044722

# Submission time Handle Problem Language Result Execution time Memory
1044722 2024-08-05T12:48:49 Z s_tree Fountain Parks (IOI21_parks) C++17
100 / 100
586 ms 54356 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
struct dsu {
	vector<int> e;
	int cc=0;
	dsu(int n) {
		cc=n;
		e=vector<int>(n+1, -1);
	}
	int get(int x) {return e[x]<0?x:e[x]=get(e[x]);}
	bool unite(int a, int b) {
		a=get(a),b=get(b);
		if(a==b)return false;
		if(-e[a] > -e[b]) {
			swap(a, b);
		}
		e[b]+=e[a];
		e[a]=b;
		cc--;
//		cout << a << " " << b << endl;
		return true;
	}
};
int construct_roads(std::vector<int> x, std::vector<int> y) {
	int n = x.size();
	map<pair<int,int>, int> mp;
	set<pair<int,int>> ben;
	for(int i = 0;i<n;i++) {
		mp[{x[i], y[i]}] = i;
	}
	vector<pair<int,int>> blB, whB;
	dsu d(n);
	for(int i = 0;i<n;i++) {
		ben.insert({x[i]+1, y[i]+1});
		ben.insert({x[i]-1, y[i]+1});
		ben.insert({x[i]+1, y[i]-1});
		ben.insert({x[i]-1, y[i]-1});
		if(mp.find(pair{x[i]+2, y[i]})!=mp.end()) {
			d.unite(mp[{x[i]+2, y[i]}], i);
		}
		if(mp.find(pair{x[i], y[i]+2})!=mp.end()) {
			d.unite(mp[{x[i], y[i]+2}], i);
		}
	}
	if(d.cc!=1)return 0;
	dsu d2(n+1);
	vector<int> a, b, c,D ;
	for(auto [xx, yy]:ben) {
		if((xx+yy)%4 == 0) {
			pair<int,int> A = {xx+1, yy+1};
			pair<int,int> B = {xx+1, yy-1};
			if(mp.find(A)!=mp.end() and mp.find(B)!=mp.end() and d2.unite(mp[A], mp[B])) {
				a.push_back(mp[A]);
				b.push_back(mp[B]);
				c.push_back(xx);
				D.push_back(yy);
				continue;
			}
			A.first-=2, B.first-=2;
			if(mp.find(A)!=mp.end() and mp.find(B)!=mp.end() and d2.unite(mp[A], mp[B])) {
				a.push_back(mp[A]);
				b.push_back(mp[B]);
				c.push_back(xx);
				D.push_back(yy);
				continue;
			}
		}
		else {
			pair<int,int> A = {xx+1, yy+1};
			pair<int,int> B = {xx-1, yy+1};
			if(mp.find(A)!=mp.end() and mp.find(B)!=mp.end() and d2.unite(mp[A], mp[B])) {
				a.push_back(mp[A]);
				b.push_back(mp[B]);
				c.push_back(xx);
				D.push_back(yy);
				continue;
			}
			A.second-=2, B.second-=2;
			if(mp.find(A)!=mp.end() and mp.find(B)!=mp.end() and d2.unite(mp[A], mp[B])) {
				a.push_back(mp[A]);
				b.push_back(mp[B]);
				c.push_back(xx);
				D.push_back(yy);
				continue;
			}
		}
	}
	build(a, b, c, D);
	return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 197 ms 23056 KB Output is correct
10 Correct 13 ms 2908 KB Output is correct
11 Correct 84 ms 12776 KB Output is correct
12 Correct 19 ms 3932 KB Output is correct
13 Correct 36 ms 8016 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 203 ms 23268 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 197 ms 23056 KB Output is correct
10 Correct 13 ms 2908 KB Output is correct
11 Correct 84 ms 12776 KB Output is correct
12 Correct 19 ms 3932 KB Output is correct
13 Correct 36 ms 8016 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 203 ms 23268 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 534 ms 42320 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 2 ms 556 KB Output is correct
26 Correct 3 ms 860 KB Output is correct
27 Correct 4 ms 860 KB Output is correct
28 Correct 156 ms 17256 KB Output is correct
29 Correct 267 ms 25548 KB Output is correct
30 Correct 387 ms 34020 KB Output is correct
31 Correct 506 ms 42168 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 2 ms 604 KB Output is correct
44 Correct 3 ms 860 KB Output is correct
45 Correct 230 ms 23992 KB Output is correct
46 Correct 376 ms 34184 KB Output is correct
47 Correct 404 ms 34216 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 197 ms 23056 KB Output is correct
10 Correct 13 ms 2908 KB Output is correct
11 Correct 84 ms 12776 KB Output is correct
12 Correct 19 ms 3932 KB Output is correct
13 Correct 36 ms 8016 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 203 ms 23268 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 534 ms 42320 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 2 ms 556 KB Output is correct
26 Correct 3 ms 860 KB Output is correct
27 Correct 4 ms 860 KB Output is correct
28 Correct 156 ms 17256 KB Output is correct
29 Correct 267 ms 25548 KB Output is correct
30 Correct 387 ms 34020 KB Output is correct
31 Correct 506 ms 42168 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 2 ms 604 KB Output is correct
44 Correct 3 ms 860 KB Output is correct
45 Correct 230 ms 23992 KB Output is correct
46 Correct 376 ms 34184 KB Output is correct
47 Correct 404 ms 34216 KB Output is correct
48 Correct 0 ms 344 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 546 ms 41132 KB Output is correct
56 Correct 0 ms 344 KB Output is correct
57 Correct 2 ms 604 KB Output is correct
58 Correct 8 ms 1604 KB Output is correct
59 Correct 12 ms 1880 KB Output is correct
60 Correct 233 ms 20880 KB Output is correct
61 Correct 302 ms 27816 KB Output is correct
62 Correct 424 ms 34320 KB Output is correct
63 Correct 556 ms 41380 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 517 ms 47624 KB Output is correct
68 Correct 507 ms 47532 KB Output is correct
69 Correct 506 ms 47272 KB Output is correct
70 Correct 5 ms 1116 KB Output is correct
71 Correct 11 ms 1628 KB Output is correct
72 Correct 242 ms 23440 KB Output is correct
73 Correct 420 ms 35084 KB Output is correct
74 Correct 586 ms 46508 KB Output is correct
75 Correct 583 ms 43804 KB Output is correct
76 Correct 518 ms 47528 KB Output is correct
77 Correct 6 ms 1116 KB Output is correct
78 Correct 9 ms 1916 KB Output is correct
79 Correct 239 ms 22928 KB Output is correct
80 Correct 379 ms 34216 KB Output is correct
81 Correct 562 ms 45224 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 197 ms 23056 KB Output is correct
10 Correct 13 ms 2908 KB Output is correct
11 Correct 84 ms 12776 KB Output is correct
12 Correct 19 ms 3932 KB Output is correct
13 Correct 36 ms 8016 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 203 ms 23268 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 524 ms 45892 KB Output is correct
21 Correct 542 ms 45936 KB Output is correct
22 Correct 546 ms 45996 KB Output is correct
23 Correct 429 ms 39060 KB Output is correct
24 Correct 436 ms 54356 KB Output is correct
25 Correct 452 ms 35456 KB Output is correct
26 Correct 386 ms 35544 KB Output is correct
27 Correct 532 ms 45984 KB Output is correct
28 Correct 544 ms 45992 KB Output is correct
29 Correct 576 ms 45992 KB Output is correct
30 Correct 568 ms 45996 KB Output is correct
31 Correct 1 ms 344 KB Output is correct
32 Correct 26 ms 3712 KB Output is correct
33 Correct 145 ms 22612 KB Output is correct
34 Correct 497 ms 45888 KB Output is correct
35 Correct 11 ms 2028 KB Output is correct
36 Correct 70 ms 8272 KB Output is correct
37 Correct 165 ms 16468 KB Output is correct
38 Correct 174 ms 17364 KB Output is correct
39 Correct 260 ms 23736 KB Output is correct
40 Correct 364 ms 30072 KB Output is correct
41 Correct 468 ms 36524 KB Output is correct
42 Correct 554 ms 42844 KB Output is correct
43 Correct 0 ms 344 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 2 ms 604 KB Output is correct
55 Correct 2 ms 860 KB Output is correct
56 Correct 224 ms 23348 KB Output is correct
57 Correct 374 ms 33448 KB Output is correct
58 Correct 359 ms 33452 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 491 ms 45848 KB Output is correct
63 Correct 529 ms 45800 KB Output is correct
64 Correct 518 ms 45776 KB Output is correct
65 Correct 4 ms 1116 KB Output is correct
66 Correct 8 ms 1628 KB Output is correct
67 Correct 238 ms 22820 KB Output is correct
68 Correct 369 ms 33872 KB Output is correct
69 Correct 551 ms 44960 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 197 ms 23056 KB Output is correct
10 Correct 13 ms 2908 KB Output is correct
11 Correct 84 ms 12776 KB Output is correct
12 Correct 19 ms 3932 KB Output is correct
13 Correct 36 ms 8016 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 203 ms 23268 KB Output is correct
17 Correct 532 ms 45840 KB Output is correct
18 Correct 516 ms 45964 KB Output is correct
19 Correct 529 ms 45988 KB Output is correct
20 Correct 524 ms 38824 KB Output is correct
21 Correct 468 ms 38500 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 61 ms 7392 KB Output is correct
24 Correct 25 ms 3416 KB Output is correct
25 Correct 104 ms 11092 KB Output is correct
26 Correct 226 ms 19024 KB Output is correct
27 Correct 227 ms 20668 KB Output is correct
28 Correct 317 ms 25916 KB Output is correct
29 Correct 376 ms 30912 KB Output is correct
30 Correct 456 ms 36008 KB Output is correct
31 Correct 551 ms 41124 KB Output is correct
32 Correct 522 ms 42152 KB Output is correct
33 Correct 503 ms 45960 KB Output is correct
34 Correct 6 ms 1112 KB Output is correct
35 Correct 10 ms 1884 KB Output is correct
36 Correct 224 ms 21948 KB Output is correct
37 Correct 385 ms 33008 KB Output is correct
38 Correct 567 ms 43592 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 197 ms 23056 KB Output is correct
10 Correct 13 ms 2908 KB Output is correct
11 Correct 84 ms 12776 KB Output is correct
12 Correct 19 ms 3932 KB Output is correct
13 Correct 36 ms 8016 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 203 ms 23268 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 534 ms 42320 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 2 ms 556 KB Output is correct
26 Correct 3 ms 860 KB Output is correct
27 Correct 4 ms 860 KB Output is correct
28 Correct 156 ms 17256 KB Output is correct
29 Correct 267 ms 25548 KB Output is correct
30 Correct 387 ms 34020 KB Output is correct
31 Correct 506 ms 42168 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 2 ms 604 KB Output is correct
44 Correct 3 ms 860 KB Output is correct
45 Correct 230 ms 23992 KB Output is correct
46 Correct 376 ms 34184 KB Output is correct
47 Correct 404 ms 34216 KB Output is correct
48 Correct 0 ms 344 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 546 ms 41132 KB Output is correct
56 Correct 0 ms 344 KB Output is correct
57 Correct 2 ms 604 KB Output is correct
58 Correct 8 ms 1604 KB Output is correct
59 Correct 12 ms 1880 KB Output is correct
60 Correct 233 ms 20880 KB Output is correct
61 Correct 302 ms 27816 KB Output is correct
62 Correct 424 ms 34320 KB Output is correct
63 Correct 556 ms 41380 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 517 ms 47624 KB Output is correct
68 Correct 507 ms 47532 KB Output is correct
69 Correct 506 ms 47272 KB Output is correct
70 Correct 5 ms 1116 KB Output is correct
71 Correct 11 ms 1628 KB Output is correct
72 Correct 242 ms 23440 KB Output is correct
73 Correct 420 ms 35084 KB Output is correct
74 Correct 586 ms 46508 KB Output is correct
75 Correct 583 ms 43804 KB Output is correct
76 Correct 518 ms 47528 KB Output is correct
77 Correct 6 ms 1116 KB Output is correct
78 Correct 9 ms 1916 KB Output is correct
79 Correct 239 ms 22928 KB Output is correct
80 Correct 379 ms 34216 KB Output is correct
81 Correct 562 ms 45224 KB Output is correct
82 Correct 1 ms 348 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 ms 348 KB Output is correct
85 Correct 524 ms 45892 KB Output is correct
86 Correct 542 ms 45936 KB Output is correct
87 Correct 546 ms 45996 KB Output is correct
88 Correct 429 ms 39060 KB Output is correct
89 Correct 436 ms 54356 KB Output is correct
90 Correct 452 ms 35456 KB Output is correct
91 Correct 386 ms 35544 KB Output is correct
92 Correct 532 ms 45984 KB Output is correct
93 Correct 544 ms 45992 KB Output is correct
94 Correct 576 ms 45992 KB Output is correct
95 Correct 568 ms 45996 KB Output is correct
96 Correct 1 ms 344 KB Output is correct
97 Correct 26 ms 3712 KB Output is correct
98 Correct 145 ms 22612 KB Output is correct
99 Correct 497 ms 45888 KB Output is correct
100 Correct 11 ms 2028 KB Output is correct
101 Correct 70 ms 8272 KB Output is correct
102 Correct 165 ms 16468 KB Output is correct
103 Correct 174 ms 17364 KB Output is correct
104 Correct 260 ms 23736 KB Output is correct
105 Correct 364 ms 30072 KB Output is correct
106 Correct 468 ms 36524 KB Output is correct
107 Correct 554 ms 42844 KB Output is correct
108 Correct 0 ms 344 KB Output is correct
109 Correct 1 ms 348 KB Output is correct
110 Correct 0 ms 348 KB Output is correct
111 Correct 0 ms 348 KB Output is correct
112 Correct 0 ms 348 KB Output is correct
113 Correct 0 ms 348 KB Output is correct
114 Correct 0 ms 348 KB Output is correct
115 Correct 0 ms 348 KB Output is correct
116 Correct 0 ms 348 KB Output is correct
117 Correct 0 ms 348 KB Output is correct
118 Correct 0 ms 348 KB Output is correct
119 Correct 2 ms 604 KB Output is correct
120 Correct 2 ms 860 KB Output is correct
121 Correct 224 ms 23348 KB Output is correct
122 Correct 374 ms 33448 KB Output is correct
123 Correct 359 ms 33452 KB Output is correct
124 Correct 0 ms 348 KB Output is correct
125 Correct 0 ms 348 KB Output is correct
126 Correct 0 ms 348 KB Output is correct
127 Correct 491 ms 45848 KB Output is correct
128 Correct 529 ms 45800 KB Output is correct
129 Correct 518 ms 45776 KB Output is correct
130 Correct 4 ms 1116 KB Output is correct
131 Correct 8 ms 1628 KB Output is correct
132 Correct 238 ms 22820 KB Output is correct
133 Correct 369 ms 33872 KB Output is correct
134 Correct 551 ms 44960 KB Output is correct
135 Correct 532 ms 45840 KB Output is correct
136 Correct 516 ms 45964 KB Output is correct
137 Correct 529 ms 45988 KB Output is correct
138 Correct 524 ms 38824 KB Output is correct
139 Correct 468 ms 38500 KB Output is correct
140 Correct 0 ms 348 KB Output is correct
141 Correct 61 ms 7392 KB Output is correct
142 Correct 25 ms 3416 KB Output is correct
143 Correct 104 ms 11092 KB Output is correct
144 Correct 226 ms 19024 KB Output is correct
145 Correct 227 ms 20668 KB Output is correct
146 Correct 317 ms 25916 KB Output is correct
147 Correct 376 ms 30912 KB Output is correct
148 Correct 456 ms 36008 KB Output is correct
149 Correct 551 ms 41124 KB Output is correct
150 Correct 522 ms 42152 KB Output is correct
151 Correct 503 ms 45960 KB Output is correct
152 Correct 6 ms 1112 KB Output is correct
153 Correct 10 ms 1884 KB Output is correct
154 Correct 224 ms 21948 KB Output is correct
155 Correct 385 ms 33008 KB Output is correct
156 Correct 567 ms 43592 KB Output is correct
157 Correct 0 ms 344 KB Output is correct
158 Correct 0 ms 348 KB Output is correct
159 Correct 0 ms 348 KB Output is correct
160 Correct 0 ms 348 KB Output is correct
161 Correct 534 ms 38500 KB Output is correct
162 Correct 505 ms 48492 KB Output is correct
163 Correct 483 ms 45224 KB Output is correct
164 Correct 496 ms 45192 KB Output is correct
165 Correct 509 ms 40872 KB Output is correct
166 Correct 489 ms 39080 KB Output is correct
167 Correct 88 ms 9936 KB Output is correct
168 Correct 41 ms 4680 KB Output is correct
169 Correct 134 ms 11856 KB Output is correct
170 Correct 287 ms 21844 KB Output is correct
171 Correct 396 ms 29416 KB Output is correct
172 Correct 204 ms 19904 KB Output is correct
173 Correct 254 ms 23744 KB Output is correct
174 Correct 322 ms 27564 KB Output is correct
175 Correct 361 ms 31204 KB Output is correct
176 Correct 415 ms 35240 KB Output is correct
177 Correct 501 ms 39076 KB Output is correct