답안 #435584

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
435584 2021-06-23T12:51:38 Z grt 분수 공원 (IOI21_parks) C++17
70 / 100
971 ms 124188 KB
#include <bits/stdc++.h>
#include "parks.h"
#define ST first
#define ND second
#define PB push_back

using namespace std;
using ll = long long;
using pi = pair<int,int>;
using vi = vector<int>;

const int nax = 800 * 1000 + 10;
map<pi, int>fontain;
pi road[nax];
int n;
vi V[nax], V2[nax];
map<pi, int>pts;
pi inv[nax];
bool vis[nax];
int match[nax];

bool augument(int u) {
	vis[u] = true;
	for(int v : V[u]) {
		if(match[v] == -1) {
			match[u] = v;
			match[v] = u;
			return true;
		}
	}
	for(int v : V[u]) {
		if(!vis[match[v]] && augument(match[v])) {
			match[u] = v;
			match[v] = u;
			return true;
		}
	}
	return false;
}

void dfs(int x) {
	vis[x] = true;
	for(int nbh : V2[x]) if(!vis[nbh]) {
		dfs(nbh);
	}
}

int construct_roads(vi xx, vi yx) {
	for(int i = 0; i < (int)xx.size(); ++i) {
		fontain[{xx[i], yx[i]}] = i;
	}
	for(auto it : fontain) {
		auto [x, y] = it.ST;
		if(fontain.count({x + 2, y})) {
			road[n] = {it.ND, fontain[{x + 2, y}]};
			pts[{x + 1, y - 1}];
			pts[{x + 1, y + 1}];
			n++;
		}
		if(fontain.count({x, y + 2}) && fontain.count({x + 2, y + 2}) && fontain.count({x+2, y})) {
			continue;
		}
		if(fontain.count({x, y + 2})) {
			road[n] = {it.ND, fontain[{x, y + 2}]};
			pts[{x - 1, y + 1}];
			pts[{x + 1, y + 1}];
			n++;
		}
	}
	int id = 0;
	for(auto &it : pts) {
		inv[id] = it.ST;
		it.ND = id++;
	}
	for(int i = 0; i < n; ++i) {
		V2[road[i].ST].PB(road[i].ND);
		V2[road[i].ND].PB(road[i].ST);
		int x1 = xx[road[i].ST], y1 = yx[road[i].ST];
		int x2 = xx[road[i].ND], y2 = yx[road[i].ND];
		if(x1 == x2) {
			int y = (y1 + y2) / 2;
			for(int x : {x1 - 1, x1 + 1}) {
				int nr = pts[{x, y}];
				V[i].emplace_back(n + nr);
				V[n + nr].emplace_back(i);
			}
		} else if(y1 == y2) {
			int x = (x1 + x2) / 2;
			for(int y : {y1 - 1, y1 + 1}) {
				int nr = pts[{x, y}];
				V[i].emplace_back(n + nr);
				V[n + nr].emplace_back(i);
			}
		}
	}
	dfs(0);
	for(int i = 0; i < (int)xx.size(); ++i) {
		if(!vis[i]) {
			return 0;
		}
	}
	for(int i = 0; i < n + id; ++i) {
		match[i] = -1;
	}
	while(true) {
		bool any = false;
		for(int i = 0; i < n + id; ++i) {
			vis[i] = false;
		}
		for(int i = 0; i < n + id; ++i) {
			if(match[i] == -1 && augument(i)) {
				any = true;
			}
		}
		if(!any) break;
	}
	for(int i = 0; i < n; ++i) {
		if(match[i] == -1) {
			return 0;
		}
	}
	vi u(n), v(n), a(n), b(n);
	for(int i = 0; i < n; ++i) {
		u[i] = road[i].ST;
		v[i] = road[i].ND;
		a[i] = inv[match[i] - n].ST;
		b[i] = inv[match[i] - n].ND;
	}
	build(u,v,a,b);
	return 1;
}

//int main() {
	//ios_base::sync_with_stdio(0);
	//cin.tie(0);
//}
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 37836 KB Output is correct
2 Correct 27 ms 37904 KB Output is correct
3 Correct 27 ms 37856 KB Output is correct
4 Correct 26 ms 37812 KB Output is correct
5 Correct 30 ms 37868 KB Output is correct
6 Correct 27 ms 37828 KB Output is correct
7 Correct 29 ms 37836 KB Output is correct
8 Correct 28 ms 37836 KB Output is correct
9 Correct 408 ms 80776 KB Output is correct
10 Correct 53 ms 42308 KB Output is correct
11 Correct 226 ms 61032 KB Output is correct
12 Correct 67 ms 44564 KB Output is correct
13 Correct 145 ms 53904 KB Output is correct
14 Correct 31 ms 38156 KB Output is correct
15 Correct 34 ms 38604 KB Output is correct
16 Correct 419 ms 80148 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 37836 KB Output is correct
2 Correct 27 ms 37904 KB Output is correct
3 Correct 27 ms 37856 KB Output is correct
4 Correct 26 ms 37812 KB Output is correct
5 Correct 30 ms 37868 KB Output is correct
6 Correct 27 ms 37828 KB Output is correct
7 Correct 29 ms 37836 KB Output is correct
8 Correct 28 ms 37836 KB Output is correct
9 Correct 408 ms 80776 KB Output is correct
10 Correct 53 ms 42308 KB Output is correct
11 Correct 226 ms 61032 KB Output is correct
12 Correct 67 ms 44564 KB Output is correct
13 Correct 145 ms 53904 KB Output is correct
14 Correct 31 ms 38156 KB Output is correct
15 Correct 34 ms 38604 KB Output is correct
16 Correct 419 ms 80148 KB Output is correct
17 Correct 30 ms 37812 KB Output is correct
18 Correct 30 ms 37808 KB Output is correct
19 Correct 28 ms 37872 KB Output is correct
20 Correct 31 ms 37780 KB Output is correct
21 Correct 28 ms 37828 KB Output is correct
22 Correct 28 ms 37860 KB Output is correct
23 Correct 841 ms 107172 KB Output is correct
24 Correct 28 ms 37860 KB Output is correct
25 Correct 33 ms 38196 KB Output is correct
26 Correct 38 ms 38592 KB Output is correct
27 Correct 36 ms 38796 KB Output is correct
28 Correct 290 ms 65560 KB Output is correct
29 Correct 448 ms 79432 KB Output is correct
30 Correct 618 ms 93252 KB Output is correct
31 Correct 783 ms 107096 KB Output is correct
32 Correct 22 ms 37836 KB Output is correct
33 Correct 25 ms 37784 KB Output is correct
34 Correct 26 ms 37872 KB Output is correct
35 Correct 25 ms 37800 KB Output is correct
36 Correct 31 ms 37828 KB Output is correct
37 Correct 30 ms 37784 KB Output is correct
38 Correct 25 ms 37836 KB Output is correct
39 Correct 26 ms 37808 KB Output is correct
40 Correct 28 ms 37844 KB Output is correct
41 Correct 26 ms 37836 KB Output is correct
42 Correct 22 ms 37836 KB Output is correct
43 Correct 25 ms 38384 KB Output is correct
44 Correct 32 ms 38736 KB Output is correct
45 Correct 365 ms 73700 KB Output is correct
46 Correct 593 ms 89968 KB Output is correct
47 Correct 625 ms 89836 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 37836 KB Output is correct
2 Correct 27 ms 37904 KB Output is correct
3 Correct 27 ms 37856 KB Output is correct
4 Correct 26 ms 37812 KB Output is correct
5 Correct 30 ms 37868 KB Output is correct
6 Correct 27 ms 37828 KB Output is correct
7 Correct 29 ms 37836 KB Output is correct
8 Correct 28 ms 37836 KB Output is correct
9 Correct 408 ms 80776 KB Output is correct
10 Correct 53 ms 42308 KB Output is correct
11 Correct 226 ms 61032 KB Output is correct
12 Correct 67 ms 44564 KB Output is correct
13 Correct 145 ms 53904 KB Output is correct
14 Correct 31 ms 38156 KB Output is correct
15 Correct 34 ms 38604 KB Output is correct
16 Correct 419 ms 80148 KB Output is correct
17 Correct 30 ms 37812 KB Output is correct
18 Correct 30 ms 37808 KB Output is correct
19 Correct 28 ms 37872 KB Output is correct
20 Correct 31 ms 37780 KB Output is correct
21 Correct 28 ms 37828 KB Output is correct
22 Correct 28 ms 37860 KB Output is correct
23 Correct 841 ms 107172 KB Output is correct
24 Correct 28 ms 37860 KB Output is correct
25 Correct 33 ms 38196 KB Output is correct
26 Correct 38 ms 38592 KB Output is correct
27 Correct 36 ms 38796 KB Output is correct
28 Correct 290 ms 65560 KB Output is correct
29 Correct 448 ms 79432 KB Output is correct
30 Correct 618 ms 93252 KB Output is correct
31 Correct 783 ms 107096 KB Output is correct
32 Correct 22 ms 37836 KB Output is correct
33 Correct 25 ms 37784 KB Output is correct
34 Correct 26 ms 37872 KB Output is correct
35 Correct 25 ms 37800 KB Output is correct
36 Correct 31 ms 37828 KB Output is correct
37 Correct 30 ms 37784 KB Output is correct
38 Correct 25 ms 37836 KB Output is correct
39 Correct 26 ms 37808 KB Output is correct
40 Correct 28 ms 37844 KB Output is correct
41 Correct 26 ms 37836 KB Output is correct
42 Correct 22 ms 37836 KB Output is correct
43 Correct 25 ms 38384 KB Output is correct
44 Correct 32 ms 38736 KB Output is correct
45 Correct 365 ms 73700 KB Output is correct
46 Correct 593 ms 89968 KB Output is correct
47 Correct 625 ms 89836 KB Output is correct
48 Correct 28 ms 37836 KB Output is correct
49 Correct 30 ms 37784 KB Output is correct
50 Correct 31 ms 37852 KB Output is correct
51 Correct 32 ms 37788 KB Output is correct
52 Correct 29 ms 37760 KB Output is correct
53 Correct 30 ms 37844 KB Output is correct
54 Correct 30 ms 37876 KB Output is correct
55 Correct 788 ms 104468 KB Output is correct
56 Correct 33 ms 37964 KB Output is correct
57 Correct 33 ms 38476 KB Output is correct
58 Correct 39 ms 39744 KB Output is correct
59 Correct 46 ms 40344 KB Output is correct
60 Correct 441 ms 71192 KB Output is correct
61 Correct 529 ms 82836 KB Output is correct
62 Correct 646 ms 97164 KB Output is correct
63 Correct 759 ms 104496 KB Output is correct
64 Correct 29 ms 37836 KB Output is correct
65 Correct 28 ms 37880 KB Output is correct
66 Correct 31 ms 37856 KB Output is correct
67 Correct 842 ms 123084 KB Output is correct
68 Correct 877 ms 123228 KB Output is correct
69 Correct 863 ms 123076 KB Output is correct
70 Correct 36 ms 38980 KB Output is correct
71 Correct 44 ms 40064 KB Output is correct
72 Correct 362 ms 72652 KB Output is correct
73 Correct 595 ms 90460 KB Output is correct
74 Correct 822 ms 107600 KB Output is correct
75 Correct 878 ms 118616 KB Output is correct
76 Correct 813 ms 124188 KB Output is correct
77 Correct 36 ms 39364 KB Output is correct
78 Correct 45 ms 40596 KB Output is correct
79 Correct 373 ms 74820 KB Output is correct
80 Correct 673 ms 93512 KB Output is correct
81 Correct 846 ms 112376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 37836 KB Output is correct
2 Correct 27 ms 37904 KB Output is correct
3 Correct 27 ms 37856 KB Output is correct
4 Correct 26 ms 37812 KB Output is correct
5 Correct 30 ms 37868 KB Output is correct
6 Correct 27 ms 37828 KB Output is correct
7 Correct 29 ms 37836 KB Output is correct
8 Correct 28 ms 37836 KB Output is correct
9 Correct 408 ms 80776 KB Output is correct
10 Correct 53 ms 42308 KB Output is correct
11 Correct 226 ms 61032 KB Output is correct
12 Correct 67 ms 44564 KB Output is correct
13 Correct 145 ms 53904 KB Output is correct
14 Correct 31 ms 38156 KB Output is correct
15 Correct 34 ms 38604 KB Output is correct
16 Correct 419 ms 80148 KB Output is correct
17 Correct 30 ms 37776 KB Output is correct
18 Correct 29 ms 37824 KB Output is correct
19 Correct 27 ms 37836 KB Output is correct
20 Correct 734 ms 115024 KB Output is correct
21 Correct 770 ms 107208 KB Output is correct
22 Correct 804 ms 107216 KB Output is correct
23 Correct 649 ms 110116 KB Output is correct
24 Correct 335 ms 53484 KB Output is correct
25 Correct 735 ms 108416 KB Output is correct
26 Correct 636 ms 108428 KB Output is correct
27 Correct 758 ms 120660 KB Output is correct
28 Correct 832 ms 120536 KB Output is correct
29 Correct 862 ms 120616 KB Output is correct
30 Correct 830 ms 120604 KB Output is correct
31 Correct 27 ms 37836 KB Output is correct
32 Correct 62 ms 43000 KB Output is correct
33 Correct 135 ms 45688 KB Output is correct
34 Correct 777 ms 114928 KB Output is correct
35 Correct 59 ms 40524 KB Output is correct
36 Correct 176 ms 51360 KB Output is correct
37 Correct 315 ms 65008 KB Output is correct
38 Correct 290 ms 64068 KB Output is correct
39 Correct 414 ms 73800 KB Output is correct
40 Correct 605 ms 83652 KB Output is correct
41 Correct 693 ms 93560 KB Output is correct
42 Correct 748 ms 103400 KB Output is correct
43 Correct 22 ms 37836 KB Output is correct
44 Correct 22 ms 37836 KB Output is correct
45 Correct 23 ms 37872 KB Output is correct
46 Correct 23 ms 37836 KB Output is correct
47 Correct 28 ms 37868 KB Output is correct
48 Correct 28 ms 37784 KB Output is correct
49 Correct 31 ms 37836 KB Output is correct
50 Correct 30 ms 37848 KB Output is correct
51 Correct 30 ms 37796 KB Output is correct
52 Correct 27 ms 37888 KB Output is correct
53 Correct 29 ms 37860 KB Output is correct
54 Correct 32 ms 38432 KB Output is correct
55 Correct 33 ms 38732 KB Output is correct
56 Correct 389 ms 73744 KB Output is correct
57 Correct 590 ms 89948 KB Output is correct
58 Correct 535 ms 89780 KB Output is correct
59 Correct 28 ms 37836 KB Output is correct
60 Correct 28 ms 37872 KB Output is correct
61 Correct 27 ms 37796 KB Output is correct
62 Correct 880 ms 123152 KB Output is correct
63 Correct 934 ms 123224 KB Output is correct
64 Correct 833 ms 123144 KB Output is correct
65 Correct 36 ms 38996 KB Output is correct
66 Correct 51 ms 40112 KB Output is correct
67 Correct 445 ms 72656 KB Output is correct
68 Correct 600 ms 90492 KB Output is correct
69 Correct 851 ms 107516 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 37836 KB Output is correct
2 Correct 27 ms 37904 KB Output is correct
3 Correct 27 ms 37856 KB Output is correct
4 Correct 26 ms 37812 KB Output is correct
5 Correct 30 ms 37868 KB Output is correct
6 Correct 27 ms 37828 KB Output is correct
7 Correct 29 ms 37836 KB Output is correct
8 Correct 28 ms 37836 KB Output is correct
9 Correct 408 ms 80776 KB Output is correct
10 Correct 53 ms 42308 KB Output is correct
11 Correct 226 ms 61032 KB Output is correct
12 Correct 67 ms 44564 KB Output is correct
13 Correct 145 ms 53904 KB Output is correct
14 Correct 31 ms 38156 KB Output is correct
15 Correct 34 ms 38604 KB Output is correct
16 Correct 419 ms 80148 KB Output is correct
17 Correct 855 ms 124144 KB Output is correct
18 Correct 761 ms 123840 KB Output is correct
19 Correct 817 ms 103244 KB Output is correct
20 Correct 971 ms 113392 KB Output is correct
21 Correct 690 ms 109772 KB Output is correct
22 Correct 31 ms 37836 KB Output is correct
23 Correct 117 ms 48908 KB Output is correct
24 Correct 75 ms 43768 KB Output is correct
25 Correct 223 ms 58180 KB Output is correct
26 Correct 347 ms 72772 KB Output is correct
27 Correct 386 ms 74620 KB Output is correct
28 Correct 499 ms 84020 KB Output is correct
29 Correct 598 ms 93132 KB Output is correct
30 Correct 758 ms 102408 KB Output is correct
31 Correct 853 ms 111452 KB Output is correct
32 Correct 895 ms 118532 KB Output is correct
33 Correct 801 ms 124164 KB Output is correct
34 Correct 41 ms 39372 KB Output is correct
35 Correct 54 ms 40484 KB Output is correct
36 Correct 371 ms 74752 KB Output is correct
37 Correct 641 ms 93624 KB Output is correct
38 Correct 890 ms 112320 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 37836 KB Output is correct
2 Correct 27 ms 37904 KB Output is correct
3 Correct 27 ms 37856 KB Output is correct
4 Correct 26 ms 37812 KB Output is correct
5 Correct 30 ms 37868 KB Output is correct
6 Correct 27 ms 37828 KB Output is correct
7 Correct 29 ms 37836 KB Output is correct
8 Correct 28 ms 37836 KB Output is correct
9 Correct 408 ms 80776 KB Output is correct
10 Correct 53 ms 42308 KB Output is correct
11 Correct 226 ms 61032 KB Output is correct
12 Correct 67 ms 44564 KB Output is correct
13 Correct 145 ms 53904 KB Output is correct
14 Correct 31 ms 38156 KB Output is correct
15 Correct 34 ms 38604 KB Output is correct
16 Correct 419 ms 80148 KB Output is correct
17 Correct 30 ms 37812 KB Output is correct
18 Correct 30 ms 37808 KB Output is correct
19 Correct 28 ms 37872 KB Output is correct
20 Correct 31 ms 37780 KB Output is correct
21 Correct 28 ms 37828 KB Output is correct
22 Correct 28 ms 37860 KB Output is correct
23 Correct 841 ms 107172 KB Output is correct
24 Correct 28 ms 37860 KB Output is correct
25 Correct 33 ms 38196 KB Output is correct
26 Correct 38 ms 38592 KB Output is correct
27 Correct 36 ms 38796 KB Output is correct
28 Correct 290 ms 65560 KB Output is correct
29 Correct 448 ms 79432 KB Output is correct
30 Correct 618 ms 93252 KB Output is correct
31 Correct 783 ms 107096 KB Output is correct
32 Correct 22 ms 37836 KB Output is correct
33 Correct 25 ms 37784 KB Output is correct
34 Correct 26 ms 37872 KB Output is correct
35 Correct 25 ms 37800 KB Output is correct
36 Correct 31 ms 37828 KB Output is correct
37 Correct 30 ms 37784 KB Output is correct
38 Correct 25 ms 37836 KB Output is correct
39 Correct 26 ms 37808 KB Output is correct
40 Correct 28 ms 37844 KB Output is correct
41 Correct 26 ms 37836 KB Output is correct
42 Correct 22 ms 37836 KB Output is correct
43 Correct 25 ms 38384 KB Output is correct
44 Correct 32 ms 38736 KB Output is correct
45 Correct 365 ms 73700 KB Output is correct
46 Correct 593 ms 89968 KB Output is correct
47 Correct 625 ms 89836 KB Output is correct
48 Correct 28 ms 37836 KB Output is correct
49 Correct 30 ms 37784 KB Output is correct
50 Correct 31 ms 37852 KB Output is correct
51 Correct 32 ms 37788 KB Output is correct
52 Correct 29 ms 37760 KB Output is correct
53 Correct 30 ms 37844 KB Output is correct
54 Correct 30 ms 37876 KB Output is correct
55 Correct 788 ms 104468 KB Output is correct
56 Correct 33 ms 37964 KB Output is correct
57 Correct 33 ms 38476 KB Output is correct
58 Correct 39 ms 39744 KB Output is correct
59 Correct 46 ms 40344 KB Output is correct
60 Correct 441 ms 71192 KB Output is correct
61 Correct 529 ms 82836 KB Output is correct
62 Correct 646 ms 97164 KB Output is correct
63 Correct 759 ms 104496 KB Output is correct
64 Correct 29 ms 37836 KB Output is correct
65 Correct 28 ms 37880 KB Output is correct
66 Correct 31 ms 37856 KB Output is correct
67 Correct 842 ms 123084 KB Output is correct
68 Correct 877 ms 123228 KB Output is correct
69 Correct 863 ms 123076 KB Output is correct
70 Correct 36 ms 38980 KB Output is correct
71 Correct 44 ms 40064 KB Output is correct
72 Correct 362 ms 72652 KB Output is correct
73 Correct 595 ms 90460 KB Output is correct
74 Correct 822 ms 107600 KB Output is correct
75 Correct 878 ms 118616 KB Output is correct
76 Correct 813 ms 124188 KB Output is correct
77 Correct 36 ms 39364 KB Output is correct
78 Correct 45 ms 40596 KB Output is correct
79 Correct 373 ms 74820 KB Output is correct
80 Correct 673 ms 93512 KB Output is correct
81 Correct 846 ms 112376 KB Output is correct
82 Correct 30 ms 37776 KB Output is correct
83 Correct 29 ms 37824 KB Output is correct
84 Correct 27 ms 37836 KB Output is correct
85 Correct 734 ms 115024 KB Output is correct
86 Correct 770 ms 107208 KB Output is correct
87 Correct 804 ms 107216 KB Output is correct
88 Correct 649 ms 110116 KB Output is correct
89 Correct 335 ms 53484 KB Output is correct
90 Correct 735 ms 108416 KB Output is correct
91 Correct 636 ms 108428 KB Output is correct
92 Correct 758 ms 120660 KB Output is correct
93 Correct 832 ms 120536 KB Output is correct
94 Correct 862 ms 120616 KB Output is correct
95 Correct 830 ms 120604 KB Output is correct
96 Correct 27 ms 37836 KB Output is correct
97 Correct 62 ms 43000 KB Output is correct
98 Correct 135 ms 45688 KB Output is correct
99 Correct 777 ms 114928 KB Output is correct
100 Correct 59 ms 40524 KB Output is correct
101 Correct 176 ms 51360 KB Output is correct
102 Correct 315 ms 65008 KB Output is correct
103 Correct 290 ms 64068 KB Output is correct
104 Correct 414 ms 73800 KB Output is correct
105 Correct 605 ms 83652 KB Output is correct
106 Correct 693 ms 93560 KB Output is correct
107 Correct 748 ms 103400 KB Output is correct
108 Correct 22 ms 37836 KB Output is correct
109 Correct 22 ms 37836 KB Output is correct
110 Correct 23 ms 37872 KB Output is correct
111 Correct 23 ms 37836 KB Output is correct
112 Correct 28 ms 37868 KB Output is correct
113 Correct 28 ms 37784 KB Output is correct
114 Correct 31 ms 37836 KB Output is correct
115 Correct 30 ms 37848 KB Output is correct
116 Correct 30 ms 37796 KB Output is correct
117 Correct 27 ms 37888 KB Output is correct
118 Correct 29 ms 37860 KB Output is correct
119 Correct 32 ms 38432 KB Output is correct
120 Correct 33 ms 38732 KB Output is correct
121 Correct 389 ms 73744 KB Output is correct
122 Correct 590 ms 89948 KB Output is correct
123 Correct 535 ms 89780 KB Output is correct
124 Correct 28 ms 37836 KB Output is correct
125 Correct 28 ms 37872 KB Output is correct
126 Correct 27 ms 37796 KB Output is correct
127 Correct 880 ms 123152 KB Output is correct
128 Correct 934 ms 123224 KB Output is correct
129 Correct 833 ms 123144 KB Output is correct
130 Correct 36 ms 38996 KB Output is correct
131 Correct 51 ms 40112 KB Output is correct
132 Correct 445 ms 72656 KB Output is correct
133 Correct 600 ms 90492 KB Output is correct
134 Correct 851 ms 107516 KB Output is correct
135 Correct 855 ms 124144 KB Output is correct
136 Correct 761 ms 123840 KB Output is correct
137 Correct 817 ms 103244 KB Output is correct
138 Correct 971 ms 113392 KB Output is correct
139 Correct 690 ms 109772 KB Output is correct
140 Correct 31 ms 37836 KB Output is correct
141 Correct 117 ms 48908 KB Output is correct
142 Correct 75 ms 43768 KB Output is correct
143 Correct 223 ms 58180 KB Output is correct
144 Correct 347 ms 72772 KB Output is correct
145 Correct 386 ms 74620 KB Output is correct
146 Correct 499 ms 84020 KB Output is correct
147 Correct 598 ms 93132 KB Output is correct
148 Correct 758 ms 102408 KB Output is correct
149 Correct 853 ms 111452 KB Output is correct
150 Correct 895 ms 118532 KB Output is correct
151 Correct 801 ms 124164 KB Output is correct
152 Correct 41 ms 39372 KB Output is correct
153 Correct 54 ms 40484 KB Output is correct
154 Correct 371 ms 74752 KB Output is correct
155 Correct 641 ms 93624 KB Output is correct
156 Correct 890 ms 112320 KB Output is correct
157 Correct 31 ms 37792 KB Output is correct
158 Correct 27 ms 37832 KB Output is correct
159 Correct 31 ms 37780 KB Output is correct
160 Correct 26 ms 37828 KB Output is correct
161 Correct 775 ms 99356 KB Output is correct
162 Correct 824 ms 114964 KB Output is correct
163 Correct 731 ms 109716 KB Output is correct
164 Correct 743 ms 109772 KB Output is correct
165 Correct 830 ms 102796 KB Output is correct
166 Correct 847 ms 100316 KB Output is correct
167 Incorrect 130 ms 50500 KB Solution announced impossible, but it is possible.
168 Halted 0 ms 0 KB -