#include <bits/stdc++.h>
#include "parks.h"
using namespace std;
// vector <int> a1, b1, c1, d1;
// void build(vector <int> a, vector <int> b, vector <int> c, vector <int> d) {
// a1 = a;
// b1 = b;
// c1 = c;
// d1 = d;
// }
const int N = 2e5 + 5;
int n;
vector <vector <int> > pos;
vector <int> a2, b2, c2, d2, par(N);
map <pair <int, int> , int> fIdx;
set <pair <int, int> > used;
int find(int a) {
if (par[a] == a) return a;
return par[a] = find(par[a]);
}
int merged = 0;
bool merge(int a, int b) {
a = find(a), b = find(b);
if (a == b) return 0;
par[b] = a;
merged++;
return 1;
}
void connect(pair <int, int> pt, int i, int j) {
if (used.count(pt)) return;
used.insert(pt);
merge(i, j);
a2.push_back(i);
b2.push_back(j);
c2.push_back(pt.first);
d2.push_back(pt.second);
}
void xEdge(int x, int y) {
int X = x+1, Y = y + ((x+y)& 2 ? 1 : -1);
connect({X, Y}, fIdx[{x, y}], fIdx[{x+2, y}]);
}
void yEdge(int x, int y) {
int X = x + ((x+y)& 2 ? -1 : 1), Y = y+1;
connect({X, Y}, fIdx[{x, y}], fIdx[{x, y+2}]);
}
bool custom(vector<int>&a, vector<int>&b) {
return a < b;
}
int construct_roads(vector<int> X, vector<int> Y) {
n = X.size();
for (int i = 0; i < n; i++)
pos.push_back({X[i], Y[i], i});
for (int i = 0; i < N; i++) par[i] = i;
sort(pos.begin(), pos.end(), custom);
for (int i = 0; i < n; i++) {
int id = pos[i][2];
pair <int, int> cur = {pos[i][0], pos[i][1]};
// cout << id << " " << cur.first << ' ' << cur.second << '\n';
fIdx[cur] = id;
if (fIdx.count({cur.first-2, cur.second})) xEdge(cur.first-2, cur.second);
if (fIdx.count({cur.first, cur.second-2})) yEdge(cur.first, cur.second-2);
}
// cout << "\n";
int source = find(0);
// for (int i = 0; i < n; i++) {
// cout << i << ' ' << find(i) << '\n';
// }
if (merged != n-1) return 0;
build(a2, b2, c2, d2);
return 1;
}
// int main() {
// int n, a, b;
// freopen("in.txt", "r", stdin);
// cin >> n;
// vector <int> x, y;
// for (int i = 0; i < n; i++) {
// cin >> a >> b;
// x.push_back(a);
// y.push_back(b);
// }
// int val = construct_roads(x, y);
// cout << val << '\n';
// cout << a1.size() << '\n';
// for (int i = 0; i < a1.size(); i++) {
// cout << a1[i] << ' ' << b1[i] << ' ' << c1[i] << ' ' << d1[i] << '\n';
// }
// }
Compilation message
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:65:9: warning: unused variable 'source' [-Wunused-variable]
65 | int source = find(0);
| ^~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
972 KB |
Output is correct |
3 |
Correct |
2 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
2 ms |
972 KB |
Output is correct |
6 |
Correct |
2 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
282 ms |
25092 KB |
Output is correct |
10 |
Correct |
16 ms |
3464 KB |
Output is correct |
11 |
Correct |
124 ms |
13980 KB |
Output is correct |
12 |
Correct |
25 ms |
4736 KB |
Output is correct |
13 |
Correct |
65 ms |
9764 KB |
Output is correct |
14 |
Correct |
2 ms |
1228 KB |
Output is correct |
15 |
Correct |
3 ms |
1484 KB |
Output is correct |
16 |
Correct |
235 ms |
25128 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
972 KB |
Output is correct |
3 |
Correct |
2 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
2 ms |
972 KB |
Output is correct |
6 |
Correct |
2 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
282 ms |
25092 KB |
Output is correct |
10 |
Correct |
16 ms |
3464 KB |
Output is correct |
11 |
Correct |
124 ms |
13980 KB |
Output is correct |
12 |
Correct |
25 ms |
4736 KB |
Output is correct |
13 |
Correct |
65 ms |
9764 KB |
Output is correct |
14 |
Correct |
2 ms |
1228 KB |
Output is correct |
15 |
Correct |
3 ms |
1484 KB |
Output is correct |
16 |
Correct |
235 ms |
25128 KB |
Output is correct |
17 |
Correct |
1 ms |
972 KB |
Output is correct |
18 |
Correct |
2 ms |
972 KB |
Output is correct |
19 |
Correct |
1 ms |
972 KB |
Output is correct |
20 |
Correct |
1 ms |
972 KB |
Output is correct |
21 |
Correct |
1 ms |
972 KB |
Output is correct |
22 |
Correct |
2 ms |
972 KB |
Output is correct |
23 |
Correct |
580 ms |
49440 KB |
Output is correct |
24 |
Correct |
2 ms |
972 KB |
Output is correct |
25 |
Correct |
3 ms |
1356 KB |
Output is correct |
26 |
Correct |
5 ms |
1612 KB |
Output is correct |
27 |
Correct |
6 ms |
1868 KB |
Output is correct |
28 |
Correct |
208 ms |
20324 KB |
Output is correct |
29 |
Correct |
292 ms |
29916 KB |
Output is correct |
30 |
Correct |
412 ms |
39864 KB |
Output is correct |
31 |
Correct |
532 ms |
49352 KB |
Output is correct |
32 |
Correct |
1 ms |
972 KB |
Output is correct |
33 |
Correct |
1 ms |
972 KB |
Output is correct |
34 |
Correct |
1 ms |
972 KB |
Output is correct |
35 |
Correct |
1 ms |
972 KB |
Output is correct |
36 |
Correct |
1 ms |
972 KB |
Output is correct |
37 |
Correct |
1 ms |
972 KB |
Output is correct |
38 |
Correct |
1 ms |
972 KB |
Output is correct |
39 |
Correct |
1 ms |
972 KB |
Output is correct |
40 |
Correct |
2 ms |
972 KB |
Output is correct |
41 |
Correct |
1 ms |
972 KB |
Output is correct |
42 |
Correct |
2 ms |
972 KB |
Output is correct |
43 |
Correct |
4 ms |
1484 KB |
Output is correct |
44 |
Correct |
5 ms |
1628 KB |
Output is correct |
45 |
Correct |
196 ms |
25172 KB |
Output is correct |
46 |
Correct |
395 ms |
36312 KB |
Output is correct |
47 |
Correct |
307 ms |
36572 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
972 KB |
Output is correct |
3 |
Correct |
2 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
2 ms |
972 KB |
Output is correct |
6 |
Correct |
2 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
282 ms |
25092 KB |
Output is correct |
10 |
Correct |
16 ms |
3464 KB |
Output is correct |
11 |
Correct |
124 ms |
13980 KB |
Output is correct |
12 |
Correct |
25 ms |
4736 KB |
Output is correct |
13 |
Correct |
65 ms |
9764 KB |
Output is correct |
14 |
Correct |
2 ms |
1228 KB |
Output is correct |
15 |
Correct |
3 ms |
1484 KB |
Output is correct |
16 |
Correct |
235 ms |
25128 KB |
Output is correct |
17 |
Correct |
1 ms |
972 KB |
Output is correct |
18 |
Correct |
2 ms |
972 KB |
Output is correct |
19 |
Correct |
1 ms |
972 KB |
Output is correct |
20 |
Correct |
1 ms |
972 KB |
Output is correct |
21 |
Correct |
1 ms |
972 KB |
Output is correct |
22 |
Correct |
2 ms |
972 KB |
Output is correct |
23 |
Correct |
580 ms |
49440 KB |
Output is correct |
24 |
Correct |
2 ms |
972 KB |
Output is correct |
25 |
Correct |
3 ms |
1356 KB |
Output is correct |
26 |
Correct |
5 ms |
1612 KB |
Output is correct |
27 |
Correct |
6 ms |
1868 KB |
Output is correct |
28 |
Correct |
208 ms |
20324 KB |
Output is correct |
29 |
Correct |
292 ms |
29916 KB |
Output is correct |
30 |
Correct |
412 ms |
39864 KB |
Output is correct |
31 |
Correct |
532 ms |
49352 KB |
Output is correct |
32 |
Correct |
1 ms |
972 KB |
Output is correct |
33 |
Correct |
1 ms |
972 KB |
Output is correct |
34 |
Correct |
1 ms |
972 KB |
Output is correct |
35 |
Correct |
1 ms |
972 KB |
Output is correct |
36 |
Correct |
1 ms |
972 KB |
Output is correct |
37 |
Correct |
1 ms |
972 KB |
Output is correct |
38 |
Correct |
1 ms |
972 KB |
Output is correct |
39 |
Correct |
1 ms |
972 KB |
Output is correct |
40 |
Correct |
2 ms |
972 KB |
Output is correct |
41 |
Correct |
1 ms |
972 KB |
Output is correct |
42 |
Correct |
2 ms |
972 KB |
Output is correct |
43 |
Correct |
4 ms |
1484 KB |
Output is correct |
44 |
Correct |
5 ms |
1628 KB |
Output is correct |
45 |
Correct |
196 ms |
25172 KB |
Output is correct |
46 |
Correct |
395 ms |
36312 KB |
Output is correct |
47 |
Correct |
307 ms |
36572 KB |
Output is correct |
48 |
Correct |
1 ms |
972 KB |
Output is correct |
49 |
Correct |
1 ms |
972 KB |
Output is correct |
50 |
Correct |
1 ms |
972 KB |
Output is correct |
51 |
Correct |
1 ms |
972 KB |
Output is correct |
52 |
Correct |
1 ms |
972 KB |
Output is correct |
53 |
Correct |
1 ms |
972 KB |
Output is correct |
54 |
Correct |
1 ms |
972 KB |
Output is correct |
55 |
Correct |
616 ms |
49548 KB |
Output is correct |
56 |
Correct |
1 ms |
972 KB |
Output is correct |
57 |
Correct |
5 ms |
1484 KB |
Output is correct |
58 |
Correct |
15 ms |
2508 KB |
Output is correct |
59 |
Correct |
14 ms |
3092 KB |
Output is correct |
60 |
Correct |
296 ms |
25068 KB |
Output is correct |
61 |
Correct |
336 ms |
34616 KB |
Output is correct |
62 |
Correct |
420 ms |
41168 KB |
Output is correct |
63 |
Correct |
567 ms |
49400 KB |
Output is correct |
64 |
Correct |
2 ms |
972 KB |
Output is correct |
65 |
Correct |
1 ms |
1024 KB |
Output is correct |
66 |
Correct |
1 ms |
972 KB |
Output is correct |
67 |
Correct |
509 ms |
49420 KB |
Output is correct |
68 |
Correct |
516 ms |
49376 KB |
Output is correct |
69 |
Correct |
502 ms |
49356 KB |
Output is correct |
70 |
Correct |
6 ms |
1920 KB |
Output is correct |
71 |
Correct |
11 ms |
2572 KB |
Output is correct |
72 |
Correct |
199 ms |
25056 KB |
Output is correct |
73 |
Correct |
322 ms |
37580 KB |
Output is correct |
74 |
Correct |
456 ms |
49484 KB |
Output is correct |
75 |
Correct |
574 ms |
53860 KB |
Output is correct |
76 |
Correct |
496 ms |
49364 KB |
Output is correct |
77 |
Correct |
8 ms |
2124 KB |
Output is correct |
78 |
Correct |
12 ms |
2952 KB |
Output is correct |
79 |
Correct |
203 ms |
26168 KB |
Output is correct |
80 |
Correct |
337 ms |
39376 KB |
Output is correct |
81 |
Correct |
495 ms |
51844 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
972 KB |
Output is correct |
3 |
Correct |
2 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
2 ms |
972 KB |
Output is correct |
6 |
Correct |
2 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
282 ms |
25092 KB |
Output is correct |
10 |
Correct |
16 ms |
3464 KB |
Output is correct |
11 |
Correct |
124 ms |
13980 KB |
Output is correct |
12 |
Correct |
25 ms |
4736 KB |
Output is correct |
13 |
Correct |
65 ms |
9764 KB |
Output is correct |
14 |
Correct |
2 ms |
1228 KB |
Output is correct |
15 |
Correct |
3 ms |
1484 KB |
Output is correct |
16 |
Correct |
235 ms |
25128 KB |
Output is correct |
17 |
Correct |
1 ms |
1040 KB |
Output is correct |
18 |
Correct |
1 ms |
972 KB |
Output is correct |
19 |
Correct |
1 ms |
972 KB |
Output is correct |
20 |
Correct |
456 ms |
50268 KB |
Output is correct |
21 |
Correct |
458 ms |
50012 KB |
Output is correct |
22 |
Correct |
465 ms |
50260 KB |
Output is correct |
23 |
Correct |
402 ms |
42656 KB |
Output is correct |
24 |
Correct |
262 ms |
27632 KB |
Output is correct |
25 |
Correct |
403 ms |
40444 KB |
Output is correct |
26 |
Correct |
341 ms |
40364 KB |
Output is correct |
27 |
Correct |
475 ms |
49284 KB |
Output is correct |
28 |
Correct |
460 ms |
49348 KB |
Output is correct |
29 |
Correct |
597 ms |
49360 KB |
Output is correct |
30 |
Correct |
492 ms |
49348 KB |
Output is correct |
31 |
Correct |
1 ms |
972 KB |
Output is correct |
32 |
Correct |
25 ms |
4548 KB |
Output is correct |
33 |
Correct |
103 ms |
14332 KB |
Output is correct |
34 |
Correct |
463 ms |
50388 KB |
Output is correct |
35 |
Correct |
21 ms |
2960 KB |
Output is correct |
36 |
Correct |
76 ms |
10868 KB |
Output is correct |
37 |
Correct |
204 ms |
20728 KB |
Output is correct |
38 |
Correct |
159 ms |
20880 KB |
Output is correct |
39 |
Correct |
237 ms |
27972 KB |
Output is correct |
40 |
Correct |
300 ms |
35824 KB |
Output is correct |
41 |
Correct |
377 ms |
43104 KB |
Output is correct |
42 |
Correct |
462 ms |
50464 KB |
Output is correct |
43 |
Correct |
1 ms |
972 KB |
Output is correct |
44 |
Correct |
1 ms |
972 KB |
Output is correct |
45 |
Correct |
1 ms |
972 KB |
Output is correct |
46 |
Correct |
1 ms |
972 KB |
Output is correct |
47 |
Correct |
1 ms |
972 KB |
Output is correct |
48 |
Correct |
2 ms |
972 KB |
Output is correct |
49 |
Correct |
1 ms |
972 KB |
Output is correct |
50 |
Correct |
1 ms |
972 KB |
Output is correct |
51 |
Correct |
2 ms |
972 KB |
Output is correct |
52 |
Correct |
1 ms |
972 KB |
Output is correct |
53 |
Correct |
1 ms |
972 KB |
Output is correct |
54 |
Correct |
3 ms |
1372 KB |
Output is correct |
55 |
Correct |
5 ms |
1612 KB |
Output is correct |
56 |
Correct |
251 ms |
25132 KB |
Output is correct |
57 |
Correct |
324 ms |
36420 KB |
Output is correct |
58 |
Correct |
301 ms |
36344 KB |
Output is correct |
59 |
Correct |
1 ms |
972 KB |
Output is correct |
60 |
Correct |
1 ms |
972 KB |
Output is correct |
61 |
Correct |
1 ms |
972 KB |
Output is correct |
62 |
Correct |
509 ms |
49448 KB |
Output is correct |
63 |
Correct |
522 ms |
49508 KB |
Output is correct |
64 |
Correct |
523 ms |
49124 KB |
Output is correct |
65 |
Correct |
6 ms |
1868 KB |
Output is correct |
66 |
Correct |
11 ms |
2648 KB |
Output is correct |
67 |
Correct |
197 ms |
25076 KB |
Output is correct |
68 |
Correct |
321 ms |
37704 KB |
Output is correct |
69 |
Correct |
472 ms |
49576 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
972 KB |
Output is correct |
3 |
Correct |
2 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
2 ms |
972 KB |
Output is correct |
6 |
Correct |
2 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
282 ms |
25092 KB |
Output is correct |
10 |
Correct |
16 ms |
3464 KB |
Output is correct |
11 |
Correct |
124 ms |
13980 KB |
Output is correct |
12 |
Correct |
25 ms |
4736 KB |
Output is correct |
13 |
Correct |
65 ms |
9764 KB |
Output is correct |
14 |
Correct |
2 ms |
1228 KB |
Output is correct |
15 |
Correct |
3 ms |
1484 KB |
Output is correct |
16 |
Correct |
235 ms |
25128 KB |
Output is correct |
17 |
Correct |
519 ms |
49824 KB |
Output is correct |
18 |
Correct |
482 ms |
49956 KB |
Output is correct |
19 |
Correct |
467 ms |
50368 KB |
Output is correct |
20 |
Correct |
499 ms |
55572 KB |
Output is correct |
21 |
Correct |
495 ms |
45728 KB |
Output is correct |
22 |
Correct |
1 ms |
972 KB |
Output is correct |
23 |
Correct |
60 ms |
9376 KB |
Output is correct |
24 |
Correct |
42 ms |
5164 KB |
Output is correct |
25 |
Correct |
128 ms |
15828 KB |
Output is correct |
26 |
Correct |
213 ms |
26352 KB |
Output is correct |
27 |
Correct |
227 ms |
27816 KB |
Output is correct |
28 |
Correct |
274 ms |
35196 KB |
Output is correct |
29 |
Correct |
360 ms |
41816 KB |
Output is correct |
30 |
Correct |
402 ms |
48044 KB |
Output is correct |
31 |
Correct |
503 ms |
54960 KB |
Output is correct |
32 |
Correct |
618 ms |
53912 KB |
Output is correct |
33 |
Correct |
506 ms |
49456 KB |
Output is correct |
34 |
Correct |
8 ms |
2124 KB |
Output is correct |
35 |
Correct |
13 ms |
2880 KB |
Output is correct |
36 |
Correct |
199 ms |
26228 KB |
Output is correct |
37 |
Correct |
405 ms |
39348 KB |
Output is correct |
38 |
Correct |
612 ms |
51780 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
972 KB |
Output is correct |
2 |
Correct |
1 ms |
972 KB |
Output is correct |
3 |
Correct |
2 ms |
972 KB |
Output is correct |
4 |
Correct |
1 ms |
972 KB |
Output is correct |
5 |
Correct |
2 ms |
972 KB |
Output is correct |
6 |
Correct |
2 ms |
972 KB |
Output is correct |
7 |
Correct |
1 ms |
972 KB |
Output is correct |
8 |
Correct |
1 ms |
972 KB |
Output is correct |
9 |
Correct |
282 ms |
25092 KB |
Output is correct |
10 |
Correct |
16 ms |
3464 KB |
Output is correct |
11 |
Correct |
124 ms |
13980 KB |
Output is correct |
12 |
Correct |
25 ms |
4736 KB |
Output is correct |
13 |
Correct |
65 ms |
9764 KB |
Output is correct |
14 |
Correct |
2 ms |
1228 KB |
Output is correct |
15 |
Correct |
3 ms |
1484 KB |
Output is correct |
16 |
Correct |
235 ms |
25128 KB |
Output is correct |
17 |
Correct |
1 ms |
972 KB |
Output is correct |
18 |
Correct |
2 ms |
972 KB |
Output is correct |
19 |
Correct |
1 ms |
972 KB |
Output is correct |
20 |
Correct |
1 ms |
972 KB |
Output is correct |
21 |
Correct |
1 ms |
972 KB |
Output is correct |
22 |
Correct |
2 ms |
972 KB |
Output is correct |
23 |
Correct |
580 ms |
49440 KB |
Output is correct |
24 |
Correct |
2 ms |
972 KB |
Output is correct |
25 |
Correct |
3 ms |
1356 KB |
Output is correct |
26 |
Correct |
5 ms |
1612 KB |
Output is correct |
27 |
Correct |
6 ms |
1868 KB |
Output is correct |
28 |
Correct |
208 ms |
20324 KB |
Output is correct |
29 |
Correct |
292 ms |
29916 KB |
Output is correct |
30 |
Correct |
412 ms |
39864 KB |
Output is correct |
31 |
Correct |
532 ms |
49352 KB |
Output is correct |
32 |
Correct |
1 ms |
972 KB |
Output is correct |
33 |
Correct |
1 ms |
972 KB |
Output is correct |
34 |
Correct |
1 ms |
972 KB |
Output is correct |
35 |
Correct |
1 ms |
972 KB |
Output is correct |
36 |
Correct |
1 ms |
972 KB |
Output is correct |
37 |
Correct |
1 ms |
972 KB |
Output is correct |
38 |
Correct |
1 ms |
972 KB |
Output is correct |
39 |
Correct |
1 ms |
972 KB |
Output is correct |
40 |
Correct |
2 ms |
972 KB |
Output is correct |
41 |
Correct |
1 ms |
972 KB |
Output is correct |
42 |
Correct |
2 ms |
972 KB |
Output is correct |
43 |
Correct |
4 ms |
1484 KB |
Output is correct |
44 |
Correct |
5 ms |
1628 KB |
Output is correct |
45 |
Correct |
196 ms |
25172 KB |
Output is correct |
46 |
Correct |
395 ms |
36312 KB |
Output is correct |
47 |
Correct |
307 ms |
36572 KB |
Output is correct |
48 |
Correct |
1 ms |
972 KB |
Output is correct |
49 |
Correct |
1 ms |
972 KB |
Output is correct |
50 |
Correct |
1 ms |
972 KB |
Output is correct |
51 |
Correct |
1 ms |
972 KB |
Output is correct |
52 |
Correct |
1 ms |
972 KB |
Output is correct |
53 |
Correct |
1 ms |
972 KB |
Output is correct |
54 |
Correct |
1 ms |
972 KB |
Output is correct |
55 |
Correct |
616 ms |
49548 KB |
Output is correct |
56 |
Correct |
1 ms |
972 KB |
Output is correct |
57 |
Correct |
5 ms |
1484 KB |
Output is correct |
58 |
Correct |
15 ms |
2508 KB |
Output is correct |
59 |
Correct |
14 ms |
3092 KB |
Output is correct |
60 |
Correct |
296 ms |
25068 KB |
Output is correct |
61 |
Correct |
336 ms |
34616 KB |
Output is correct |
62 |
Correct |
420 ms |
41168 KB |
Output is correct |
63 |
Correct |
567 ms |
49400 KB |
Output is correct |
64 |
Correct |
2 ms |
972 KB |
Output is correct |
65 |
Correct |
1 ms |
1024 KB |
Output is correct |
66 |
Correct |
1 ms |
972 KB |
Output is correct |
67 |
Correct |
509 ms |
49420 KB |
Output is correct |
68 |
Correct |
516 ms |
49376 KB |
Output is correct |
69 |
Correct |
502 ms |
49356 KB |
Output is correct |
70 |
Correct |
6 ms |
1920 KB |
Output is correct |
71 |
Correct |
11 ms |
2572 KB |
Output is correct |
72 |
Correct |
199 ms |
25056 KB |
Output is correct |
73 |
Correct |
322 ms |
37580 KB |
Output is correct |
74 |
Correct |
456 ms |
49484 KB |
Output is correct |
75 |
Correct |
574 ms |
53860 KB |
Output is correct |
76 |
Correct |
496 ms |
49364 KB |
Output is correct |
77 |
Correct |
8 ms |
2124 KB |
Output is correct |
78 |
Correct |
12 ms |
2952 KB |
Output is correct |
79 |
Correct |
203 ms |
26168 KB |
Output is correct |
80 |
Correct |
337 ms |
39376 KB |
Output is correct |
81 |
Correct |
495 ms |
51844 KB |
Output is correct |
82 |
Correct |
1 ms |
1040 KB |
Output is correct |
83 |
Correct |
1 ms |
972 KB |
Output is correct |
84 |
Correct |
1 ms |
972 KB |
Output is correct |
85 |
Correct |
456 ms |
50268 KB |
Output is correct |
86 |
Correct |
458 ms |
50012 KB |
Output is correct |
87 |
Correct |
465 ms |
50260 KB |
Output is correct |
88 |
Correct |
402 ms |
42656 KB |
Output is correct |
89 |
Correct |
262 ms |
27632 KB |
Output is correct |
90 |
Correct |
403 ms |
40444 KB |
Output is correct |
91 |
Correct |
341 ms |
40364 KB |
Output is correct |
92 |
Correct |
475 ms |
49284 KB |
Output is correct |
93 |
Correct |
460 ms |
49348 KB |
Output is correct |
94 |
Correct |
597 ms |
49360 KB |
Output is correct |
95 |
Correct |
492 ms |
49348 KB |
Output is correct |
96 |
Correct |
1 ms |
972 KB |
Output is correct |
97 |
Correct |
25 ms |
4548 KB |
Output is correct |
98 |
Correct |
103 ms |
14332 KB |
Output is correct |
99 |
Correct |
463 ms |
50388 KB |
Output is correct |
100 |
Correct |
21 ms |
2960 KB |
Output is correct |
101 |
Correct |
76 ms |
10868 KB |
Output is correct |
102 |
Correct |
204 ms |
20728 KB |
Output is correct |
103 |
Correct |
159 ms |
20880 KB |
Output is correct |
104 |
Correct |
237 ms |
27972 KB |
Output is correct |
105 |
Correct |
300 ms |
35824 KB |
Output is correct |
106 |
Correct |
377 ms |
43104 KB |
Output is correct |
107 |
Correct |
462 ms |
50464 KB |
Output is correct |
108 |
Correct |
1 ms |
972 KB |
Output is correct |
109 |
Correct |
1 ms |
972 KB |
Output is correct |
110 |
Correct |
1 ms |
972 KB |
Output is correct |
111 |
Correct |
1 ms |
972 KB |
Output is correct |
112 |
Correct |
1 ms |
972 KB |
Output is correct |
113 |
Correct |
2 ms |
972 KB |
Output is correct |
114 |
Correct |
1 ms |
972 KB |
Output is correct |
115 |
Correct |
1 ms |
972 KB |
Output is correct |
116 |
Correct |
2 ms |
972 KB |
Output is correct |
117 |
Correct |
1 ms |
972 KB |
Output is correct |
118 |
Correct |
1 ms |
972 KB |
Output is correct |
119 |
Correct |
3 ms |
1372 KB |
Output is correct |
120 |
Correct |
5 ms |
1612 KB |
Output is correct |
121 |
Correct |
251 ms |
25132 KB |
Output is correct |
122 |
Correct |
324 ms |
36420 KB |
Output is correct |
123 |
Correct |
301 ms |
36344 KB |
Output is correct |
124 |
Correct |
1 ms |
972 KB |
Output is correct |
125 |
Correct |
1 ms |
972 KB |
Output is correct |
126 |
Correct |
1 ms |
972 KB |
Output is correct |
127 |
Correct |
509 ms |
49448 KB |
Output is correct |
128 |
Correct |
522 ms |
49508 KB |
Output is correct |
129 |
Correct |
523 ms |
49124 KB |
Output is correct |
130 |
Correct |
6 ms |
1868 KB |
Output is correct |
131 |
Correct |
11 ms |
2648 KB |
Output is correct |
132 |
Correct |
197 ms |
25076 KB |
Output is correct |
133 |
Correct |
321 ms |
37704 KB |
Output is correct |
134 |
Correct |
472 ms |
49576 KB |
Output is correct |
135 |
Correct |
519 ms |
49824 KB |
Output is correct |
136 |
Correct |
482 ms |
49956 KB |
Output is correct |
137 |
Correct |
467 ms |
50368 KB |
Output is correct |
138 |
Correct |
499 ms |
55572 KB |
Output is correct |
139 |
Correct |
495 ms |
45728 KB |
Output is correct |
140 |
Correct |
1 ms |
972 KB |
Output is correct |
141 |
Correct |
60 ms |
9376 KB |
Output is correct |
142 |
Correct |
42 ms |
5164 KB |
Output is correct |
143 |
Correct |
128 ms |
15828 KB |
Output is correct |
144 |
Correct |
213 ms |
26352 KB |
Output is correct |
145 |
Correct |
227 ms |
27816 KB |
Output is correct |
146 |
Correct |
274 ms |
35196 KB |
Output is correct |
147 |
Correct |
360 ms |
41816 KB |
Output is correct |
148 |
Correct |
402 ms |
48044 KB |
Output is correct |
149 |
Correct |
503 ms |
54960 KB |
Output is correct |
150 |
Correct |
618 ms |
53912 KB |
Output is correct |
151 |
Correct |
506 ms |
49456 KB |
Output is correct |
152 |
Correct |
8 ms |
2124 KB |
Output is correct |
153 |
Correct |
13 ms |
2880 KB |
Output is correct |
154 |
Correct |
199 ms |
26228 KB |
Output is correct |
155 |
Correct |
405 ms |
39348 KB |
Output is correct |
156 |
Correct |
612 ms |
51780 KB |
Output is correct |
157 |
Correct |
2 ms |
972 KB |
Output is correct |
158 |
Correct |
1 ms |
972 KB |
Output is correct |
159 |
Correct |
2 ms |
972 KB |
Output is correct |
160 |
Correct |
1 ms |
972 KB |
Output is correct |
161 |
Correct |
589 ms |
49696 KB |
Output is correct |
162 |
Correct |
486 ms |
50252 KB |
Output is correct |
163 |
Correct |
485 ms |
50248 KB |
Output is correct |
164 |
Correct |
478 ms |
50244 KB |
Output is correct |
165 |
Correct |
605 ms |
50052 KB |
Output is correct |
166 |
Correct |
597 ms |
49820 KB |
Output is correct |
167 |
Correct |
101 ms |
12752 KB |
Output is correct |
168 |
Correct |
53 ms |
6904 KB |
Output is correct |
169 |
Correct |
153 ms |
16900 KB |
Output is correct |
170 |
Correct |
295 ms |
30956 KB |
Output is correct |
171 |
Correct |
423 ms |
40480 KB |
Output is correct |
172 |
Correct |
231 ms |
25696 KB |
Output is correct |
173 |
Correct |
278 ms |
30408 KB |
Output is correct |
174 |
Correct |
326 ms |
35800 KB |
Output is correct |
175 |
Correct |
403 ms |
40472 KB |
Output is correct |
176 |
Correct |
466 ms |
45668 KB |
Output is correct |
177 |
Correct |
529 ms |
50372 KB |
Output is correct |