답안 #1053225

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1053225 2024-08-11T09:52:26 Z tolbi 분수 공원 (IOI21_parks) C++17
70 / 100
1027 ms 115524 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
//void build(std::vector<int> u, std::vector<int> v, std::vector<int> a, std::vector<int> b);
struct DSU{
	vector<int> par;
	int tot;
	DSU(int n):tot(n){
		par.resize(n);
		iota(par.begin(), par.end(), 0);
	}
	int find(int node){
		if (par[node]==node) return node;
		return par[node]=find(par[node]);
	}
	bool merge(int a, int b){
		a=find(a);
		b=find(b);
		if (a!=b) tot--;
		else return false;
		par[a]=b;
		return true;
	}
};
int construct_roads(vector<int> x, vector<int> y) {
	int n = x.size();


	//subtasks 4..5
	DSU dsu(n);
	map<pair<int,int>,int> mp;
	for (int i = 0; i < n; ++i)
	{
		mp[{x[i],y[i]}]=i;
	}
	vector<int> u;
	vector<int> v;
	vector<int> xa(n-1,-1);
	vector<int> ya(n-1,-1);
	vector<set<pair<int,int>>> arr;
	map<pair<int,int>,set<int>> qu;
	for (int i = 0; i < n; ++i)
	{
		if (mp.count({x[i],y[i]-2})){
			if (dsu.merge(mp[{x[i],y[i]-2}],i)){
				u.push_back(mp[{x[i],y[i]-2}]);
				v.push_back(i);
				arr.push_back(set<pair<int,int>>());
				arr.back().insert({x[i]-1,y[i]-1});
				arr.back().insert({x[i]+1,y[i]-1});
				qu[{x[i]-1,y[i]-1}].insert((int)u.size()-1);
				qu[{x[i]+1,y[i]-1}].insert((int)u.size()-1);
			}
		}
	}
	for (int i = 0; i < n; ++i)
	{
		if (mp.count({x[i]-2,y[i]})){
			if (dsu.merge(mp[{x[i]-2,y[i]}],i)){
				u.push_back(mp[{x[i]-2,y[i]}]);
				v.push_back(i);
				arr.push_back(set<pair<int,int>>());
				arr.back().insert({x[i]-1,y[i]-1});
				arr.back().insert({x[i]-1,y[i]+1});
				qu[{x[i]-1,y[i]-1}].insert((int)u.size()-1);
				qu[{x[i]-1,y[i]+1}].insert((int)u.size()-1);
			}
		}
	}
	if (dsu.tot!=1) return 0;
	vector<pair<int,int>> iki;
	queue<pair<int,int>> que;
	int kal = n-1;
	for (auto it : qu){
		if (it.second.size()==1) que.push(it.first);
		else iki.push_back(it.first);
	}
	set<pair<int,int>> lmao;
	while (kal>0){
		while (que.size() && (qu[que.front()].size()<1 || lmao.find(que.front())!=lmao.end())) que.pop();
		if (!que.size()){
			while (iki.size() && qu[iki.back()].size()<2) iki.pop_back();
			if (iki.size()){
				while (qu[iki.back()].size()>1){	
					int it = *qu[iki.back()].begin();
					arr[it].erase(iki.back());
					qu[iki.back()].erase(it);
				}
				que.push(iki.back());
				iki.pop_back();
			}
			else return 0;
		}
		if (!que.size()) return 0;
		pair<int,int> pr = que.front();
		que.pop();
		int it = *qu[pr].begin();
		if (xa[it]!=-1) continue;
		kal--;
		lmao.insert(pr);
		xa[it]=pr.first, ya[it]=pr.second;
		for (auto it2 : arr[it]){
			if (qu[it2].find(it)!=qu[it2].end()) qu[it2].erase(it);
			if (qu[it2].size()==1) {
				que.push(it2);
			}
		}
		while (arr[it].size()) arr[it].erase(arr[it].begin());
	}
	build(u,v,xa,ya);
	return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 356 ms 58048 KB Output is correct
10 Correct 18 ms 5904 KB Output is correct
11 Correct 124 ms 30720 KB Output is correct
12 Correct 27 ms 8716 KB Output is correct
13 Correct 48 ms 23556 KB Output is correct
14 Correct 1 ms 860 KB Output is correct
15 Correct 2 ms 1372 KB Output is correct
16 Correct 330 ms 57592 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 356 ms 58048 KB Output is correct
10 Correct 18 ms 5904 KB Output is correct
11 Correct 124 ms 30720 KB Output is correct
12 Correct 27 ms 8716 KB Output is correct
13 Correct 48 ms 23556 KB Output is correct
14 Correct 1 ms 860 KB Output is correct
15 Correct 2 ms 1372 KB Output is correct
16 Correct 330 ms 57592 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 912 ms 105052 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 3 ms 860 KB Output is correct
26 Correct 3 ms 1628 KB Output is correct
27 Correct 5 ms 2228 KB Output is correct
28 Correct 247 ms 42344 KB Output is correct
29 Correct 477 ms 62532 KB Output is correct
30 Correct 669 ms 84932 KB Output is correct
31 Correct 904 ms 104684 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 0 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 1112 KB Output is correct
44 Correct 3 ms 1628 KB Output is correct
45 Correct 362 ms 52332 KB Output is correct
46 Correct 563 ms 74228 KB Output is correct
47 Correct 582 ms 75076 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 356 ms 58048 KB Output is correct
10 Correct 18 ms 5904 KB Output is correct
11 Correct 124 ms 30720 KB Output is correct
12 Correct 27 ms 8716 KB Output is correct
13 Correct 48 ms 23556 KB Output is correct
14 Correct 1 ms 860 KB Output is correct
15 Correct 2 ms 1372 KB Output is correct
16 Correct 330 ms 57592 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 912 ms 105052 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 3 ms 860 KB Output is correct
26 Correct 3 ms 1628 KB Output is correct
27 Correct 5 ms 2228 KB Output is correct
28 Correct 247 ms 42344 KB Output is correct
29 Correct 477 ms 62532 KB Output is correct
30 Correct 669 ms 84932 KB Output is correct
31 Correct 904 ms 104684 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 0 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 1112 KB Output is correct
44 Correct 3 ms 1628 KB Output is correct
45 Correct 362 ms 52332 KB Output is correct
46 Correct 563 ms 74228 KB Output is correct
47 Correct 582 ms 75076 KB Output is correct
48 Correct 1 ms 344 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 344 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 963 ms 100992 KB Output is correct
56 Correct 0 ms 344 KB Output is correct
57 Correct 3 ms 1116 KB Output is correct
58 Correct 17 ms 3344 KB Output is correct
59 Correct 21 ms 4880 KB Output is correct
60 Correct 355 ms 50748 KB Output is correct
61 Correct 562 ms 68380 KB Output is correct
62 Correct 778 ms 84140 KB Output is correct
63 Correct 998 ms 102748 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 348 KB Output is correct
67 Correct 871 ms 114460 KB Output is correct
68 Correct 844 ms 113132 KB Output is correct
69 Correct 877 ms 114164 KB Output is correct
70 Correct 5 ms 2136 KB Output is correct
71 Correct 10 ms 4076 KB Output is correct
72 Correct 367 ms 50952 KB Output is correct
73 Correct 643 ms 76780 KB Output is correct
74 Correct 924 ms 102516 KB Output is correct
75 Correct 871 ms 106948 KB Output is correct
76 Correct 832 ms 114416 KB Output is correct
77 Correct 6 ms 2708 KB Output is correct
78 Correct 11 ms 4696 KB Output is correct
79 Correct 390 ms 51340 KB Output is correct
80 Correct 641 ms 77548 KB Output is correct
81 Correct 939 ms 103924 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 356 ms 58048 KB Output is correct
10 Correct 18 ms 5904 KB Output is correct
11 Correct 124 ms 30720 KB Output is correct
12 Correct 27 ms 8716 KB Output is correct
13 Correct 48 ms 23556 KB Output is correct
14 Correct 1 ms 860 KB Output is correct
15 Correct 2 ms 1372 KB Output is correct
16 Correct 330 ms 57592 KB Output is correct
17 Correct 0 ms 344 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 752 ms 95084 KB Output is correct
21 Correct 760 ms 94896 KB Output is correct
22 Correct 818 ms 96500 KB Output is correct
23 Correct 604 ms 97896 KB Output is correct
24 Correct 135 ms 18256 KB Output is correct
25 Correct 606 ms 106352 KB Output is correct
26 Correct 639 ms 104652 KB Output is correct
27 Correct 901 ms 115524 KB Output is correct
28 Correct 875 ms 114804 KB Output is correct
29 Correct 879 ms 112884 KB Output is correct
30 Correct 835 ms 114736 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 39 ms 7436 KB Output is correct
33 Correct 67 ms 9300 KB Output is correct
34 Correct 787 ms 96324 KB Output is correct
35 Correct 17 ms 4884 KB Output is correct
36 Correct 106 ms 22488 KB Output is correct
37 Correct 219 ms 44788 KB Output is correct
38 Correct 282 ms 39596 KB Output is correct
39 Correct 411 ms 54728 KB Output is correct
40 Correct 578 ms 69116 KB Output is correct
41 Correct 842 ms 86000 KB Output is correct
42 Correct 974 ms 99932 KB Output is correct
43 Correct 1 ms 348 KB Output is correct
44 Correct 0 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 344 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 1116 KB Output is correct
55 Correct 3 ms 1628 KB Output is correct
56 Correct 372 ms 51076 KB Output is correct
57 Correct 583 ms 74476 KB Output is correct
58 Correct 582 ms 75248 KB Output is correct
59 Correct 0 ms 344 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 814 ms 114968 KB Output is correct
63 Correct 805 ms 114932 KB Output is correct
64 Correct 806 ms 114436 KB Output is correct
65 Correct 5 ms 2136 KB Output is correct
66 Correct 10 ms 3992 KB Output is correct
67 Correct 353 ms 50940 KB Output is correct
68 Correct 616 ms 76268 KB Output is correct
69 Correct 901 ms 102932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 356 ms 58048 KB Output is correct
10 Correct 18 ms 5904 KB Output is correct
11 Correct 124 ms 30720 KB Output is correct
12 Correct 27 ms 8716 KB Output is correct
13 Correct 48 ms 23556 KB Output is correct
14 Correct 1 ms 860 KB Output is correct
15 Correct 2 ms 1372 KB Output is correct
16 Correct 330 ms 57592 KB Output is correct
17 Correct 785 ms 114252 KB Output is correct
18 Correct 763 ms 115184 KB Output is correct
19 Correct 799 ms 96352 KB Output is correct
20 Correct 860 ms 99564 KB Output is correct
21 Correct 717 ms 95472 KB Output is correct
22 Correct 0 ms 344 KB Output is correct
23 Correct 81 ms 15636 KB Output is correct
24 Correct 30 ms 9456 KB Output is correct
25 Correct 143 ms 36404 KB Output is correct
26 Correct 289 ms 54516 KB Output is correct
27 Correct 478 ms 49996 KB Output is correct
28 Correct 626 ms 62600 KB Output is correct
29 Correct 779 ms 75312 KB Output is correct
30 Correct 856 ms 88748 KB Output is correct
31 Correct 1027 ms 101216 KB Output is correct
32 Correct 939 ms 106256 KB Output is correct
33 Correct 896 ms 114416 KB Output is correct
34 Correct 6 ms 2712 KB Output is correct
35 Correct 11 ms 4760 KB Output is correct
36 Correct 397 ms 51396 KB Output is correct
37 Correct 663 ms 77296 KB Output is correct
38 Correct 915 ms 103920 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 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 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 356 ms 58048 KB Output is correct
10 Correct 18 ms 5904 KB Output is correct
11 Correct 124 ms 30720 KB Output is correct
12 Correct 27 ms 8716 KB Output is correct
13 Correct 48 ms 23556 KB Output is correct
14 Correct 1 ms 860 KB Output is correct
15 Correct 2 ms 1372 KB Output is correct
16 Correct 330 ms 57592 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 912 ms 105052 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 3 ms 860 KB Output is correct
26 Correct 3 ms 1628 KB Output is correct
27 Correct 5 ms 2228 KB Output is correct
28 Correct 247 ms 42344 KB Output is correct
29 Correct 477 ms 62532 KB Output is correct
30 Correct 669 ms 84932 KB Output is correct
31 Correct 904 ms 104684 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 0 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 1112 KB Output is correct
44 Correct 3 ms 1628 KB Output is correct
45 Correct 362 ms 52332 KB Output is correct
46 Correct 563 ms 74228 KB Output is correct
47 Correct 582 ms 75076 KB Output is correct
48 Correct 1 ms 344 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 344 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 963 ms 100992 KB Output is correct
56 Correct 0 ms 344 KB Output is correct
57 Correct 3 ms 1116 KB Output is correct
58 Correct 17 ms 3344 KB Output is correct
59 Correct 21 ms 4880 KB Output is correct
60 Correct 355 ms 50748 KB Output is correct
61 Correct 562 ms 68380 KB Output is correct
62 Correct 778 ms 84140 KB Output is correct
63 Correct 998 ms 102748 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 348 KB Output is correct
67 Correct 871 ms 114460 KB Output is correct
68 Correct 844 ms 113132 KB Output is correct
69 Correct 877 ms 114164 KB Output is correct
70 Correct 5 ms 2136 KB Output is correct
71 Correct 10 ms 4076 KB Output is correct
72 Correct 367 ms 50952 KB Output is correct
73 Correct 643 ms 76780 KB Output is correct
74 Correct 924 ms 102516 KB Output is correct
75 Correct 871 ms 106948 KB Output is correct
76 Correct 832 ms 114416 KB Output is correct
77 Correct 6 ms 2708 KB Output is correct
78 Correct 11 ms 4696 KB Output is correct
79 Correct 390 ms 51340 KB Output is correct
80 Correct 641 ms 77548 KB Output is correct
81 Correct 939 ms 103924 KB Output is correct
82 Correct 0 ms 344 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 ms 348 KB Output is correct
85 Correct 752 ms 95084 KB Output is correct
86 Correct 760 ms 94896 KB Output is correct
87 Correct 818 ms 96500 KB Output is correct
88 Correct 604 ms 97896 KB Output is correct
89 Correct 135 ms 18256 KB Output is correct
90 Correct 606 ms 106352 KB Output is correct
91 Correct 639 ms 104652 KB Output is correct
92 Correct 901 ms 115524 KB Output is correct
93 Correct 875 ms 114804 KB Output is correct
94 Correct 879 ms 112884 KB Output is correct
95 Correct 835 ms 114736 KB Output is correct
96 Correct 0 ms 344 KB Output is correct
97 Correct 39 ms 7436 KB Output is correct
98 Correct 67 ms 9300 KB Output is correct
99 Correct 787 ms 96324 KB Output is correct
100 Correct 17 ms 4884 KB Output is correct
101 Correct 106 ms 22488 KB Output is correct
102 Correct 219 ms 44788 KB Output is correct
103 Correct 282 ms 39596 KB Output is correct
104 Correct 411 ms 54728 KB Output is correct
105 Correct 578 ms 69116 KB Output is correct
106 Correct 842 ms 86000 KB Output is correct
107 Correct 974 ms 99932 KB Output is correct
108 Correct 1 ms 348 KB Output is correct
109 Correct 0 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 344 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 1116 KB Output is correct
120 Correct 3 ms 1628 KB Output is correct
121 Correct 372 ms 51076 KB Output is correct
122 Correct 583 ms 74476 KB Output is correct
123 Correct 582 ms 75248 KB Output is correct
124 Correct 0 ms 344 KB Output is correct
125 Correct 0 ms 348 KB Output is correct
126 Correct 0 ms 348 KB Output is correct
127 Correct 814 ms 114968 KB Output is correct
128 Correct 805 ms 114932 KB Output is correct
129 Correct 806 ms 114436 KB Output is correct
130 Correct 5 ms 2136 KB Output is correct
131 Correct 10 ms 3992 KB Output is correct
132 Correct 353 ms 50940 KB Output is correct
133 Correct 616 ms 76268 KB Output is correct
134 Correct 901 ms 102932 KB Output is correct
135 Correct 785 ms 114252 KB Output is correct
136 Correct 763 ms 115184 KB Output is correct
137 Correct 799 ms 96352 KB Output is correct
138 Correct 860 ms 99564 KB Output is correct
139 Correct 717 ms 95472 KB Output is correct
140 Correct 0 ms 344 KB Output is correct
141 Correct 81 ms 15636 KB Output is correct
142 Correct 30 ms 9456 KB Output is correct
143 Correct 143 ms 36404 KB Output is correct
144 Correct 289 ms 54516 KB Output is correct
145 Correct 478 ms 49996 KB Output is correct
146 Correct 626 ms 62600 KB Output is correct
147 Correct 779 ms 75312 KB Output is correct
148 Correct 856 ms 88748 KB Output is correct
149 Correct 1027 ms 101216 KB Output is correct
150 Correct 939 ms 106256 KB Output is correct
151 Correct 896 ms 114416 KB Output is correct
152 Correct 6 ms 2712 KB Output is correct
153 Correct 11 ms 4760 KB Output is correct
154 Correct 397 ms 51396 KB Output is correct
155 Correct 663 ms 77296 KB Output is correct
156 Correct 915 ms 103920 KB Output is correct
157 Correct 0 ms 348 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 Incorrect 949 ms 91472 KB Solution announced impossible, but it is possible.
162 Halted 0 ms 0 KB -