Submission #815331

# Submission time Handle Problem Language Result Execution time Memory
815331 2023-08-08T14:12:57 Z I_Love_EliskaM_ Fountain Parks (IOI21_parks) C++17
70 / 100
611 ms 30416 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
#define forn(i,n) for(int i=0;i<n;++i)
#define pb push_back
#define all(x) x.begin(), x.end()
#define pi pair<int,int>
#define f first
#define s second

struct DSU {
	vector<int> p,sz;
	int tot;
	DSU(int n) {
		forn(i,n) p.pb(i), sz.pb(1);
		tot=n;
	}
	int get(int u) {
		return p[u]==u?u:get(p[u]);
	}
	void uni(int u, int v) {
		u=get(u), v=get(v);
		if (sz[u]<sz[v]) swap(u,v);
		sz[u]+=sz[v];
		p[v]=u;
		--tot;
	}
};

int p3(vector<int> x, vector<int> y) {

	int n=x.size();
	vector<int> u,v,a,b;
	map<pi,int> m;
	forn(i,n) m[{x[i],y[i]}]=i;
	DSU dsu(n);

	vector<pi> z1={{0,-2},{0,2}};
	vector<pi> z2={{-2,0},{2,0}};
	forn(i,n) {
		int f=x[i], s=y[i];
		for(auto&x:z1) {
			if (m.count({f+x.f,s+x.s})) {
				if (i<m[{f+x.f,s+x.s}]) {
					if (dsu.get(i)==dsu.get(m[{f+x.f,s+x.s}])) continue;
					dsu.uni(i,m[{f+x.f,s+x.s}]);
					u.pb(i), v.pb(m[{f+x.f,s+x.s}]);
				}
			}
		}
	}
	forn(i,n) {
		int f=x[i], s=y[i];
		for(auto&x:z2) {
			if (m.count({f+x.f,s+x.s})) {
				if (i<m[{f+x.f,s+x.s}]) {
					if (dsu.get(i)==dsu.get(m[{f+x.f,s+x.s}])) continue;
					dsu.uni(i,m[{f+x.f,s+x.s}]);
					u.pb(i), v.pb(m[{f+x.f,s+x.s}]);
				}
			}
		}
	}
	if (u.size()!=n-1) return 0;

	forn(i,n-1) {
		int x1=x[u[i]], y1=y[u[i]];
		int x2=x[v[i]], y2=y[v[i]];
		if (x1==x2) {
			if (x1==2) {
				a.pb(1);
				b.pb(max(y1,y2)-1);
			} else if (x1==6) {
				a.pb(7);
				b.pb(max(y1,y2)-1);
			} else {
				if (max(y1,y2)%4) {
					a.pb(3);
					b.pb(max(y1,y2)-1);
				} else {
					a.pb(5);
					b.pb(max(y1,y2)-1);
				}
			}
		} else {
			if ((max(x1,x2)+y1)%4) {
				a.pb(max(x1,x2)-1);
				b.pb(y1+1);
			} else {
				a.pb(max(x1,x2)-1);
				b.pb(y1-1);
			}
		}
	}
	build(u,v,a,b);
	return 1;
}

int construct_roads(vector<int> x, vector<int> y) {
	int mx=0; for(auto&v:x) mx=max(mx,v);
	if (mx<=6) return p3(x,y);

	int n=x.size();
	vector<int> u,v,a,b;
	map<pi,int> m;
	forn(i,n) m[{x[i],y[i]}]=i;
	DSU dsu(n);

	vector<pi> z={{-2,0},{2,0},{0,-2},{0,2}};
	forn(i,n) {
		int f=x[i], s=y[i];
		for(auto&x:z) {
			if (m.count({f+x.f,s+x.s})) {
				if (i<m[{f+x.f,s+x.s}]) {
					if (dsu.get(i)==dsu.get(m[{f+x.f,s+x.s}])) continue;
					dsu.uni(i,m[{f+x.f,s+x.s}]);
					u.pb(i), v.pb(m[{f+x.f,s+x.s}]);
				}
			}
		}
	}
	if (u.size()!=n-1) return 0;
	
	forn(i,n-1) {
		int x1=x[u[i]], y1=y[u[i]];
		int x2=x[v[i]], y2=y[v[i]];
		if (x1==x2) {
			if ((max(y1,y2)+x1)%4) {
				a.pb(x1+1);
				b.pb(max(y1,y2)-1);
			} else {
				a.pb(x1-1);
				b.pb(max(y1,y2)-1);
			}
		} else {
			if ((max(x1,x2)+y1)%4) {
				a.pb(max(x1,x2)-1);
				b.pb(y1-1);
			} else {
				a.pb(max(x1,x2)-1);
				b.pb(y1+1);
			}
		}
	}
	build(u,v,a,b);
	return 1;
}

Compilation message

parks.cpp: In function 'int p3(std::vector<int>, std::vector<int>)':
parks.cpp:64:14: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   64 |  if (u.size()!=n-1) return 0;
      |      ~~~~~~~~^~~~~
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:122:14: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  122 |  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 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 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 185 ms 14520 KB Output is correct
10 Correct 15 ms 1876 KB Output is correct
11 Correct 69 ms 7884 KB Output is correct
12 Correct 17 ms 2720 KB Output is correct
13 Correct 45 ms 5060 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 2 ms 468 KB Output is correct
16 Correct 159 ms 14524 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 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 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 185 ms 14520 KB Output is correct
10 Correct 15 ms 1876 KB Output is correct
11 Correct 69 ms 7884 KB Output is correct
12 Correct 17 ms 2720 KB Output is correct
13 Correct 45 ms 5060 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 2 ms 468 KB Output is correct
16 Correct 159 ms 14524 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 296 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 611 ms 30296 KB Output is correct
24 Correct 1 ms 296 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 4 ms 564 KB Output is correct
27 Correct 5 ms 724 KB Output is correct
28 Correct 169 ms 12564 KB Output is correct
29 Correct 238 ms 18296 KB Output is correct
30 Correct 456 ms 24296 KB Output is correct
31 Correct 536 ms 30232 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 1 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 296 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 0 ms 292 KB Output is correct
43 Correct 3 ms 468 KB Output is correct
44 Correct 3 ms 596 KB Output is correct
45 Correct 198 ms 15376 KB Output is correct
46 Correct 353 ms 21976 KB Output is correct
47 Correct 270 ms 22032 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 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 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 185 ms 14520 KB Output is correct
10 Correct 15 ms 1876 KB Output is correct
11 Correct 69 ms 7884 KB Output is correct
12 Correct 17 ms 2720 KB Output is correct
13 Correct 45 ms 5060 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 2 ms 468 KB Output is correct
16 Correct 159 ms 14524 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 296 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 611 ms 30296 KB Output is correct
24 Correct 1 ms 296 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 4 ms 564 KB Output is correct
27 Correct 5 ms 724 KB Output is correct
28 Correct 169 ms 12564 KB Output is correct
29 Correct 238 ms 18296 KB Output is correct
30 Correct 456 ms 24296 KB Output is correct
31 Correct 536 ms 30232 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 1 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 296 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 0 ms 292 KB Output is correct
43 Correct 3 ms 468 KB Output is correct
44 Correct 3 ms 596 KB Output is correct
45 Correct 198 ms 15376 KB Output is correct
46 Correct 353 ms 21976 KB Output is correct
47 Correct 270 ms 22032 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 296 KB Output is correct
51 Correct 0 ms 300 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 567 ms 30188 KB Output is correct
56 Correct 1 ms 212 KB Output is correct
57 Correct 3 ms 596 KB Output is correct
58 Correct 9 ms 1288 KB Output is correct
59 Correct 17 ms 1492 KB Output is correct
60 Correct 239 ms 15292 KB Output is correct
61 Correct 329 ms 20104 KB Output is correct
62 Correct 456 ms 25168 KB Output is correct
63 Correct 503 ms 30220 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 447 ms 30212 KB Output is correct
68 Correct 409 ms 30312 KB Output is correct
69 Correct 426 ms 30080 KB Output is correct
70 Correct 5 ms 724 KB Output is correct
71 Correct 9 ms 1236 KB Output is correct
72 Correct 195 ms 15376 KB Output is correct
73 Correct 350 ms 22784 KB Output is correct
74 Correct 460 ms 30272 KB Output is correct
75 Correct 575 ms 30268 KB Output is correct
76 Correct 398 ms 30208 KB Output is correct
77 Correct 6 ms 852 KB Output is correct
78 Correct 11 ms 1340 KB Output is correct
79 Correct 202 ms 15348 KB Output is correct
80 Correct 410 ms 22796 KB Output is correct
81 Correct 443 ms 30240 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 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 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 185 ms 14520 KB Output is correct
10 Correct 15 ms 1876 KB Output is correct
11 Correct 69 ms 7884 KB Output is correct
12 Correct 17 ms 2720 KB Output is correct
13 Correct 45 ms 5060 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 2 ms 468 KB Output is correct
16 Correct 159 ms 14524 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 450 ms 27048 KB Output is correct
21 Correct 501 ms 27048 KB Output is correct
22 Correct 479 ms 27012 KB Output is correct
23 Correct 363 ms 23052 KB Output is correct
24 Correct 277 ms 18228 KB Output is correct
25 Correct 460 ms 20360 KB Output is correct
26 Correct 440 ms 20408 KB Output is correct
27 Correct 471 ms 27532 KB Output is correct
28 Correct 505 ms 27632 KB Output is correct
29 Correct 575 ms 27580 KB Output is correct
30 Correct 602 ms 27548 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 23 ms 2740 KB Output is correct
33 Correct 94 ms 9564 KB Output is correct
34 Correct 419 ms 27516 KB Output is correct
35 Correct 13 ms 1492 KB Output is correct
36 Correct 84 ms 5832 KB Output is correct
37 Correct 177 ms 10664 KB Output is correct
38 Correct 157 ms 11892 KB Output is correct
39 Correct 249 ms 15880 KB Output is correct
40 Correct 329 ms 19572 KB Output is correct
41 Correct 436 ms 23552 KB Output is correct
42 Correct 551 ms 27488 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 1 ms 212 KB Output is correct
49 Correct 0 ms 296 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 0 ms 296 KB Output is correct
54 Correct 2 ms 468 KB Output is correct
55 Correct 3 ms 596 KB Output is correct
56 Correct 180 ms 15476 KB Output is correct
57 Correct 305 ms 22060 KB Output is correct
58 Correct 310 ms 22012 KB Output is correct
59 Correct 0 ms 212 KB Output is correct
60 Correct 0 ms 212 KB Output is correct
61 Correct 1 ms 212 KB Output is correct
62 Correct 417 ms 30268 KB Output is correct
63 Correct 407 ms 30416 KB Output is correct
64 Correct 362 ms 30140 KB Output is correct
65 Correct 5 ms 744 KB Output is correct
66 Correct 12 ms 1180 KB Output is correct
67 Correct 221 ms 15396 KB Output is correct
68 Correct 374 ms 22808 KB Output is correct
69 Correct 504 ms 30204 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 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 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 185 ms 14520 KB Output is correct
10 Correct 15 ms 1876 KB Output is correct
11 Correct 69 ms 7884 KB Output is correct
12 Correct 17 ms 2720 KB Output is correct
13 Correct 45 ms 5060 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 2 ms 468 KB Output is correct
16 Correct 159 ms 14524 KB Output is correct
17 Correct 414 ms 27572 KB Output is correct
18 Correct 449 ms 27576 KB Output is correct
19 Correct 481 ms 27632 KB Output is correct
20 Correct 535 ms 27000 KB Output is correct
21 Correct 447 ms 24248 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 58 ms 5244 KB Output is correct
24 Correct 30 ms 2624 KB Output is correct
25 Correct 129 ms 7900 KB Output is correct
26 Correct 239 ms 12376 KB Output is correct
27 Correct 240 ms 14368 KB Output is correct
28 Correct 294 ms 17764 KB Output is correct
29 Correct 383 ms 20912 KB Output is correct
30 Correct 486 ms 24168 KB Output is correct
31 Correct 564 ms 27552 KB Output is correct
32 Correct 480 ms 29072 KB Output is correct
33 Correct 381 ms 29144 KB Output is correct
34 Correct 6 ms 852 KB Output is correct
35 Correct 14 ms 1328 KB Output is correct
36 Correct 189 ms 15388 KB Output is correct
37 Correct 332 ms 22796 KB Output is correct
38 Correct 501 ms 30284 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 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 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 185 ms 14520 KB Output is correct
10 Correct 15 ms 1876 KB Output is correct
11 Correct 69 ms 7884 KB Output is correct
12 Correct 17 ms 2720 KB Output is correct
13 Correct 45 ms 5060 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 2 ms 468 KB Output is correct
16 Correct 159 ms 14524 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 296 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 611 ms 30296 KB Output is correct
24 Correct 1 ms 296 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 4 ms 564 KB Output is correct
27 Correct 5 ms 724 KB Output is correct
28 Correct 169 ms 12564 KB Output is correct
29 Correct 238 ms 18296 KB Output is correct
30 Correct 456 ms 24296 KB Output is correct
31 Correct 536 ms 30232 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 1 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 296 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 0 ms 292 KB Output is correct
43 Correct 3 ms 468 KB Output is correct
44 Correct 3 ms 596 KB Output is correct
45 Correct 198 ms 15376 KB Output is correct
46 Correct 353 ms 21976 KB Output is correct
47 Correct 270 ms 22032 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 296 KB Output is correct
51 Correct 0 ms 300 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 567 ms 30188 KB Output is correct
56 Correct 1 ms 212 KB Output is correct
57 Correct 3 ms 596 KB Output is correct
58 Correct 9 ms 1288 KB Output is correct
59 Correct 17 ms 1492 KB Output is correct
60 Correct 239 ms 15292 KB Output is correct
61 Correct 329 ms 20104 KB Output is correct
62 Correct 456 ms 25168 KB Output is correct
63 Correct 503 ms 30220 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 447 ms 30212 KB Output is correct
68 Correct 409 ms 30312 KB Output is correct
69 Correct 426 ms 30080 KB Output is correct
70 Correct 5 ms 724 KB Output is correct
71 Correct 9 ms 1236 KB Output is correct
72 Correct 195 ms 15376 KB Output is correct
73 Correct 350 ms 22784 KB Output is correct
74 Correct 460 ms 30272 KB Output is correct
75 Correct 575 ms 30268 KB Output is correct
76 Correct 398 ms 30208 KB Output is correct
77 Correct 6 ms 852 KB Output is correct
78 Correct 11 ms 1340 KB Output is correct
79 Correct 202 ms 15348 KB Output is correct
80 Correct 410 ms 22796 KB Output is correct
81 Correct 443 ms 30240 KB Output is correct
82 Correct 0 ms 212 KB Output is correct
83 Correct 1 ms 212 KB Output is correct
84 Correct 1 ms 212 KB Output is correct
85 Correct 450 ms 27048 KB Output is correct
86 Correct 501 ms 27048 KB Output is correct
87 Correct 479 ms 27012 KB Output is correct
88 Correct 363 ms 23052 KB Output is correct
89 Correct 277 ms 18228 KB Output is correct
90 Correct 460 ms 20360 KB Output is correct
91 Correct 440 ms 20408 KB Output is correct
92 Correct 471 ms 27532 KB Output is correct
93 Correct 505 ms 27632 KB Output is correct
94 Correct 575 ms 27580 KB Output is correct
95 Correct 602 ms 27548 KB Output is correct
96 Correct 1 ms 212 KB Output is correct
97 Correct 23 ms 2740 KB Output is correct
98 Correct 94 ms 9564 KB Output is correct
99 Correct 419 ms 27516 KB Output is correct
100 Correct 13 ms 1492 KB Output is correct
101 Correct 84 ms 5832 KB Output is correct
102 Correct 177 ms 10664 KB Output is correct
103 Correct 157 ms 11892 KB Output is correct
104 Correct 249 ms 15880 KB Output is correct
105 Correct 329 ms 19572 KB Output is correct
106 Correct 436 ms 23552 KB Output is correct
107 Correct 551 ms 27488 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 1 ms 212 KB Output is correct
114 Correct 0 ms 296 KB Output is correct
115 Correct 0 ms 212 KB Output is correct
116 Correct 1 ms 212 KB Output is correct
117 Correct 0 ms 212 KB Output is correct
118 Correct 0 ms 296 KB Output is correct
119 Correct 2 ms 468 KB Output is correct
120 Correct 3 ms 596 KB Output is correct
121 Correct 180 ms 15476 KB Output is correct
122 Correct 305 ms 22060 KB Output is correct
123 Correct 310 ms 22012 KB Output is correct
124 Correct 0 ms 212 KB Output is correct
125 Correct 0 ms 212 KB Output is correct
126 Correct 1 ms 212 KB Output is correct
127 Correct 417 ms 30268 KB Output is correct
128 Correct 407 ms 30416 KB Output is correct
129 Correct 362 ms 30140 KB Output is correct
130 Correct 5 ms 744 KB Output is correct
131 Correct 12 ms 1180 KB Output is correct
132 Correct 221 ms 15396 KB Output is correct
133 Correct 374 ms 22808 KB Output is correct
134 Correct 504 ms 30204 KB Output is correct
135 Correct 414 ms 27572 KB Output is correct
136 Correct 449 ms 27576 KB Output is correct
137 Correct 481 ms 27632 KB Output is correct
138 Correct 535 ms 27000 KB Output is correct
139 Correct 447 ms 24248 KB Output is correct
140 Correct 1 ms 212 KB Output is correct
141 Correct 58 ms 5244 KB Output is correct
142 Correct 30 ms 2624 KB Output is correct
143 Correct 129 ms 7900 KB Output is correct
144 Correct 239 ms 12376 KB Output is correct
145 Correct 240 ms 14368 KB Output is correct
146 Correct 294 ms 17764 KB Output is correct
147 Correct 383 ms 20912 KB Output is correct
148 Correct 486 ms 24168 KB Output is correct
149 Correct 564 ms 27552 KB Output is correct
150 Correct 480 ms 29072 KB Output is correct
151 Correct 381 ms 29144 KB Output is correct
152 Correct 6 ms 852 KB Output is correct
153 Correct 14 ms 1328 KB Output is correct
154 Correct 189 ms 15388 KB Output is correct
155 Correct 332 ms 22796 KB Output is correct
156 Correct 501 ms 30284 KB Output is correct
157 Correct 0 ms 212 KB Output is correct
158 Correct 0 ms 212 KB Output is correct
159 Incorrect 0 ms 212 KB Tree @(199999, 3) appears more than once: for edges on positions 1 and 2
160 Halted 0 ms 0 KB -