#include "parks.h"
#include <vector>
#include <map>
#include <set>
#include <functional>
using namespace std;
using pii = pair<int, int>;
struct UnionFind
{
vector<int> par;
UnionFind(int N)
{
par.resize(N+1);
for (int i = 0; i <= N; i++) par[i] = i;
}
int fin(int v)
{
return v == par[v] ? v : (par[v] = fin(par[v]));
}
void uni(int u, int v)
{
par[fin(u)] = fin(v);
}
bool isuni(int u, int v)
{
return fin(u) == fin(v);
}
};
int X[200005], Y[200005];
vector<int> adj[200005];
bool visited[200005];
pair<int, int> tilt(pair<int, int> ori, int pv)
{
if (ori == make_pair(1, 0)) return make_pair(0, -pv);
else if (ori == make_pair(0, 1)) return make_pair(pv, 0);
else if (ori == make_pair(-1, 0)) return make_pair(0, pv);
else return make_pair(-pv, 0);
}
int construct_roads(std::vector<int> x, std::vector<int> y) {
int N = x.size();
map<pii, int> mp;
for (int i = 1; i <= N; i++) {
X[i] = x[i-1], Y[i] = y[i-1];
}
for (int i = 1; i <= N; i++) {
mp[make_pair(X[i], Y[i])] = i;
}
UnionFind uf(N);
int dx[] = {-2, 2, 0, 0};
int dy[] = {0, 0, -2, 2};
for (int i = 1; i <= N; i++) {
for (int k = 0; k < 4; k++) {
int nx = X[i] + dx[k], ny = Y[i] + dy[k];
int tmp = mp[make_pair(nx, ny)];
if (tmp) {
adj[i].push_back(tmp);
uf.uni(i, tmp);
}
}
}
for (int i = 1; i <= N; i++) {
if (!uf.isuni(1, i)) return 0;
}
vector<int> a, b, c, d;
set<pii> st;
int dx2[] = {1, 1, -1, -1};
int dy2[] = {1, -1, 1, -1};
for (int i = 1; i <= N; i++) {
for (int k = 0; k < 4; k++) {
st.insert(make_pair(X[i] + dx2[k], Y[i] + dy2[k]));
}
}
for (pii p:st) {
bool flag = (p.first / 2 + p.second / 2) % 2;
int t1 = mp[{p.first - 1, p.second - 1}], t2 = flag ? mp[{p.first + 1, p.second - 1}] : mp[{p.first - 1, p.second + 1}];
if (t1 && t2) {
a.push_back(t1-1);
b.push_back(t2-1);
c.push_back(p.first);
d.push_back(p.second);
}
else {
int t3 = flag ? mp[{p.first - 1, p.second + 1}] : mp[{p.first + 1, p.second - 1}], t4 = mp[{p.first + 1, p.second + 1}];
if (t3 && t4) {
a.push_back(t3-1);
b.push_back(t4-1);
c.push_back(p.first);
d.push_back(p.second);
}
}
}
build(a, b, c, d);
return 1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4948 KB |
Output is correct |
2 |
Correct |
2 ms |
4948 KB |
Output is correct |
3 |
Correct |
3 ms |
4948 KB |
Output is correct |
4 |
Correct |
3 ms |
4992 KB |
Output is correct |
5 |
Correct |
3 ms |
4948 KB |
Output is correct |
6 |
Correct |
2 ms |
4996 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
8 |
Correct |
2 ms |
4992 KB |
Output is correct |
9 |
Correct |
443 ms |
44044 KB |
Output is correct |
10 |
Correct |
21 ms |
9248 KB |
Output is correct |
11 |
Correct |
130 ms |
26824 KB |
Output is correct |
12 |
Correct |
33 ms |
11260 KB |
Output is correct |
13 |
Correct |
43 ms |
16420 KB |
Output is correct |
14 |
Correct |
3 ms |
5204 KB |
Output is correct |
15 |
Correct |
4 ms |
5460 KB |
Output is correct |
16 |
Correct |
426 ms |
44128 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4948 KB |
Output is correct |
2 |
Correct |
2 ms |
4948 KB |
Output is correct |
3 |
Correct |
3 ms |
4948 KB |
Output is correct |
4 |
Correct |
3 ms |
4992 KB |
Output is correct |
5 |
Correct |
3 ms |
4948 KB |
Output is correct |
6 |
Correct |
2 ms |
4996 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
8 |
Correct |
2 ms |
4992 KB |
Output is correct |
9 |
Correct |
443 ms |
44044 KB |
Output is correct |
10 |
Correct |
21 ms |
9248 KB |
Output is correct |
11 |
Correct |
130 ms |
26824 KB |
Output is correct |
12 |
Correct |
33 ms |
11260 KB |
Output is correct |
13 |
Correct |
43 ms |
16420 KB |
Output is correct |
14 |
Correct |
3 ms |
5204 KB |
Output is correct |
15 |
Correct |
4 ms |
5460 KB |
Output is correct |
16 |
Correct |
426 ms |
44128 KB |
Output is correct |
17 |
Correct |
2 ms |
4948 KB |
Output is correct |
18 |
Correct |
2 ms |
4996 KB |
Output is correct |
19 |
Correct |
2 ms |
5000 KB |
Output is correct |
20 |
Correct |
3 ms |
4948 KB |
Output is correct |
21 |
Correct |
2 ms |
4948 KB |
Output is correct |
22 |
Correct |
2 ms |
4960 KB |
Output is correct |
23 |
Correct |
980 ms |
65644 KB |
Output is correct |
24 |
Correct |
2 ms |
4996 KB |
Output is correct |
25 |
Correct |
5 ms |
5332 KB |
Output is correct |
26 |
Correct |
5 ms |
5460 KB |
Output is correct |
27 |
Correct |
9 ms |
5648 KB |
Output is correct |
28 |
Correct |
294 ms |
29564 KB |
Output is correct |
29 |
Correct |
471 ms |
41640 KB |
Output is correct |
30 |
Correct |
653 ms |
53688 KB |
Output is correct |
31 |
Correct |
1076 ms |
65768 KB |
Output is correct |
32 |
Correct |
2 ms |
4948 KB |
Output is correct |
33 |
Correct |
2 ms |
4948 KB |
Output is correct |
34 |
Correct |
3 ms |
4948 KB |
Output is correct |
35 |
Correct |
2 ms |
4948 KB |
Output is correct |
36 |
Correct |
3 ms |
5000 KB |
Output is correct |
37 |
Correct |
3 ms |
4996 KB |
Output is correct |
38 |
Correct |
3 ms |
4992 KB |
Output is correct |
39 |
Correct |
3 ms |
5024 KB |
Output is correct |
40 |
Correct |
2 ms |
4992 KB |
Output is correct |
41 |
Correct |
3 ms |
4992 KB |
Output is correct |
42 |
Correct |
2 ms |
4948 KB |
Output is correct |
43 |
Correct |
4 ms |
5332 KB |
Output is correct |
44 |
Correct |
8 ms |
5588 KB |
Output is correct |
45 |
Correct |
508 ms |
42444 KB |
Output is correct |
46 |
Correct |
952 ms |
59288 KB |
Output is correct |
47 |
Correct |
793 ms |
59404 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4948 KB |
Output is correct |
2 |
Correct |
2 ms |
4948 KB |
Output is correct |
3 |
Correct |
3 ms |
4948 KB |
Output is correct |
4 |
Correct |
3 ms |
4992 KB |
Output is correct |
5 |
Correct |
3 ms |
4948 KB |
Output is correct |
6 |
Correct |
2 ms |
4996 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
8 |
Correct |
2 ms |
4992 KB |
Output is correct |
9 |
Correct |
443 ms |
44044 KB |
Output is correct |
10 |
Correct |
21 ms |
9248 KB |
Output is correct |
11 |
Correct |
130 ms |
26824 KB |
Output is correct |
12 |
Correct |
33 ms |
11260 KB |
Output is correct |
13 |
Correct |
43 ms |
16420 KB |
Output is correct |
14 |
Correct |
3 ms |
5204 KB |
Output is correct |
15 |
Correct |
4 ms |
5460 KB |
Output is correct |
16 |
Correct |
426 ms |
44128 KB |
Output is correct |
17 |
Correct |
2 ms |
4948 KB |
Output is correct |
18 |
Correct |
2 ms |
4996 KB |
Output is correct |
19 |
Correct |
2 ms |
5000 KB |
Output is correct |
20 |
Correct |
3 ms |
4948 KB |
Output is correct |
21 |
Correct |
2 ms |
4948 KB |
Output is correct |
22 |
Correct |
2 ms |
4960 KB |
Output is correct |
23 |
Correct |
980 ms |
65644 KB |
Output is correct |
24 |
Correct |
2 ms |
4996 KB |
Output is correct |
25 |
Correct |
5 ms |
5332 KB |
Output is correct |
26 |
Correct |
5 ms |
5460 KB |
Output is correct |
27 |
Correct |
9 ms |
5648 KB |
Output is correct |
28 |
Correct |
294 ms |
29564 KB |
Output is correct |
29 |
Correct |
471 ms |
41640 KB |
Output is correct |
30 |
Correct |
653 ms |
53688 KB |
Output is correct |
31 |
Correct |
1076 ms |
65768 KB |
Output is correct |
32 |
Correct |
2 ms |
4948 KB |
Output is correct |
33 |
Correct |
2 ms |
4948 KB |
Output is correct |
34 |
Correct |
3 ms |
4948 KB |
Output is correct |
35 |
Correct |
2 ms |
4948 KB |
Output is correct |
36 |
Correct |
3 ms |
5000 KB |
Output is correct |
37 |
Correct |
3 ms |
4996 KB |
Output is correct |
38 |
Correct |
3 ms |
4992 KB |
Output is correct |
39 |
Correct |
3 ms |
5024 KB |
Output is correct |
40 |
Correct |
2 ms |
4992 KB |
Output is correct |
41 |
Correct |
3 ms |
4992 KB |
Output is correct |
42 |
Correct |
2 ms |
4948 KB |
Output is correct |
43 |
Correct |
4 ms |
5332 KB |
Output is correct |
44 |
Correct |
8 ms |
5588 KB |
Output is correct |
45 |
Correct |
508 ms |
42444 KB |
Output is correct |
46 |
Correct |
952 ms |
59288 KB |
Output is correct |
47 |
Correct |
793 ms |
59404 KB |
Output is correct |
48 |
Correct |
2 ms |
4948 KB |
Output is correct |
49 |
Correct |
2 ms |
4948 KB |
Output is correct |
50 |
Correct |
2 ms |
4992 KB |
Output is correct |
51 |
Correct |
2 ms |
4996 KB |
Output is correct |
52 |
Correct |
2 ms |
4948 KB |
Output is correct |
53 |
Correct |
2 ms |
4948 KB |
Output is correct |
54 |
Correct |
3 ms |
4948 KB |
Output is correct |
55 |
Correct |
830 ms |
59932 KB |
Output is correct |
56 |
Correct |
2 ms |
4948 KB |
Output is correct |
57 |
Correct |
5 ms |
5460 KB |
Output is correct |
58 |
Correct |
14 ms |
6732 KB |
Output is correct |
59 |
Correct |
13 ms |
6680 KB |
Output is correct |
60 |
Correct |
325 ms |
32672 KB |
Output is correct |
61 |
Correct |
560 ms |
42200 KB |
Output is correct |
62 |
Correct |
754 ms |
50452 KB |
Output is correct |
63 |
Correct |
911 ms |
60060 KB |
Output is correct |
64 |
Correct |
3 ms |
4948 KB |
Output is correct |
65 |
Correct |
3 ms |
4948 KB |
Output is correct |
66 |
Correct |
2 ms |
4948 KB |
Output is correct |
67 |
Correct |
1105 ms |
76756 KB |
Output is correct |
68 |
Correct |
1125 ms |
76752 KB |
Output is correct |
69 |
Correct |
1120 ms |
76376 KB |
Output is correct |
70 |
Correct |
6 ms |
5708 KB |
Output is correct |
71 |
Correct |
11 ms |
6540 KB |
Output is correct |
72 |
Correct |
390 ms |
39908 KB |
Output is correct |
73 |
Correct |
682 ms |
57312 KB |
Output is correct |
74 |
Correct |
1061 ms |
74848 KB |
Output is correct |
75 |
Correct |
1014 ms |
68532 KB |
Output is correct |
76 |
Correct |
1058 ms |
76792 KB |
Output is correct |
77 |
Correct |
8 ms |
5924 KB |
Output is correct |
78 |
Correct |
12 ms |
6672 KB |
Output is correct |
79 |
Correct |
374 ms |
38692 KB |
Output is correct |
80 |
Correct |
651 ms |
55328 KB |
Output is correct |
81 |
Correct |
1093 ms |
71992 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4948 KB |
Output is correct |
2 |
Correct |
2 ms |
4948 KB |
Output is correct |
3 |
Correct |
3 ms |
4948 KB |
Output is correct |
4 |
Correct |
3 ms |
4992 KB |
Output is correct |
5 |
Correct |
3 ms |
4948 KB |
Output is correct |
6 |
Correct |
2 ms |
4996 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
8 |
Correct |
2 ms |
4992 KB |
Output is correct |
9 |
Correct |
443 ms |
44044 KB |
Output is correct |
10 |
Correct |
21 ms |
9248 KB |
Output is correct |
11 |
Correct |
130 ms |
26824 KB |
Output is correct |
12 |
Correct |
33 ms |
11260 KB |
Output is correct |
13 |
Correct |
43 ms |
16420 KB |
Output is correct |
14 |
Correct |
3 ms |
5204 KB |
Output is correct |
15 |
Correct |
4 ms |
5460 KB |
Output is correct |
16 |
Correct |
426 ms |
44128 KB |
Output is correct |
17 |
Correct |
2 ms |
4948 KB |
Output is correct |
18 |
Correct |
2 ms |
4948 KB |
Output is correct |
19 |
Correct |
2 ms |
4948 KB |
Output is correct |
20 |
Correct |
910 ms |
82908 KB |
Output is correct |
21 |
Correct |
1018 ms |
79708 KB |
Output is correct |
22 |
Correct |
981 ms |
79720 KB |
Output is correct |
23 |
Correct |
767 ms |
71332 KB |
Output is correct |
24 |
Correct |
579 ms |
48432 KB |
Output is correct |
25 |
Correct |
559 ms |
42244 KB |
Output is correct |
26 |
Correct |
614 ms |
42124 KB |
Output is correct |
27 |
Correct |
1029 ms |
70528 KB |
Output is correct |
28 |
Correct |
1053 ms |
70484 KB |
Output is correct |
29 |
Correct |
1141 ms |
70564 KB |
Output is correct |
30 |
Correct |
1048 ms |
70496 KB |
Output is correct |
31 |
Correct |
2 ms |
4948 KB |
Output is correct |
32 |
Correct |
42 ms |
10252 KB |
Output is correct |
33 |
Correct |
181 ms |
26800 KB |
Output is correct |
34 |
Correct |
893 ms |
82908 KB |
Output is correct |
35 |
Correct |
14 ms |
6740 KB |
Output is correct |
36 |
Correct |
71 ms |
13620 KB |
Output is correct |
37 |
Correct |
169 ms |
21812 KB |
Output is correct |
38 |
Correct |
257 ms |
28712 KB |
Output is correct |
39 |
Correct |
470 ms |
37448 KB |
Output is correct |
40 |
Correct |
595 ms |
46140 KB |
Output is correct |
41 |
Correct |
726 ms |
54820 KB |
Output is correct |
42 |
Correct |
935 ms |
63584 KB |
Output is correct |
43 |
Correct |
2 ms |
4948 KB |
Output is correct |
44 |
Correct |
2 ms |
4948 KB |
Output is correct |
45 |
Correct |
2 ms |
4948 KB |
Output is correct |
46 |
Correct |
2 ms |
4948 KB |
Output is correct |
47 |
Correct |
2 ms |
4948 KB |
Output is correct |
48 |
Correct |
2 ms |
4988 KB |
Output is correct |
49 |
Correct |
2 ms |
4948 KB |
Output is correct |
50 |
Correct |
2 ms |
4948 KB |
Output is correct |
51 |
Correct |
2 ms |
4948 KB |
Output is correct |
52 |
Correct |
2 ms |
4992 KB |
Output is correct |
53 |
Correct |
2 ms |
5000 KB |
Output is correct |
54 |
Correct |
4 ms |
5332 KB |
Output is correct |
55 |
Correct |
5 ms |
5588 KB |
Output is correct |
56 |
Correct |
449 ms |
42520 KB |
Output is correct |
57 |
Correct |
704 ms |
59324 KB |
Output is correct |
58 |
Correct |
765 ms |
59444 KB |
Output is correct |
59 |
Correct |
2 ms |
4948 KB |
Output is correct |
60 |
Correct |
2 ms |
4948 KB |
Output is correct |
61 |
Correct |
2 ms |
4948 KB |
Output is correct |
62 |
Correct |
1050 ms |
76708 KB |
Output is correct |
63 |
Correct |
1106 ms |
76744 KB |
Output is correct |
64 |
Correct |
1085 ms |
76420 KB |
Output is correct |
65 |
Correct |
6 ms |
5716 KB |
Output is correct |
66 |
Correct |
11 ms |
6564 KB |
Output is correct |
67 |
Correct |
381 ms |
39892 KB |
Output is correct |
68 |
Correct |
730 ms |
57284 KB |
Output is correct |
69 |
Correct |
1101 ms |
74776 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4948 KB |
Output is correct |
2 |
Correct |
2 ms |
4948 KB |
Output is correct |
3 |
Correct |
3 ms |
4948 KB |
Output is correct |
4 |
Correct |
3 ms |
4992 KB |
Output is correct |
5 |
Correct |
3 ms |
4948 KB |
Output is correct |
6 |
Correct |
2 ms |
4996 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
8 |
Correct |
2 ms |
4992 KB |
Output is correct |
9 |
Correct |
443 ms |
44044 KB |
Output is correct |
10 |
Correct |
21 ms |
9248 KB |
Output is correct |
11 |
Correct |
130 ms |
26824 KB |
Output is correct |
12 |
Correct |
33 ms |
11260 KB |
Output is correct |
13 |
Correct |
43 ms |
16420 KB |
Output is correct |
14 |
Correct |
3 ms |
5204 KB |
Output is correct |
15 |
Correct |
4 ms |
5460 KB |
Output is correct |
16 |
Correct |
426 ms |
44128 KB |
Output is correct |
17 |
Correct |
1038 ms |
82844 KB |
Output is correct |
18 |
Correct |
1101 ms |
82992 KB |
Output is correct |
19 |
Correct |
915 ms |
82828 KB |
Output is correct |
20 |
Correct |
783 ms |
58132 KB |
Output is correct |
21 |
Correct |
809 ms |
65204 KB |
Output is correct |
22 |
Correct |
2 ms |
4948 KB |
Output is correct |
23 |
Correct |
91 ms |
15236 KB |
Output is correct |
24 |
Correct |
26 ms |
8244 KB |
Output is correct |
25 |
Correct |
130 ms |
16076 KB |
Output is correct |
26 |
Correct |
217 ms |
23788 KB |
Output is correct |
27 |
Correct |
328 ms |
33296 KB |
Output is correct |
28 |
Correct |
467 ms |
40352 KB |
Output is correct |
29 |
Correct |
669 ms |
47304 KB |
Output is correct |
30 |
Correct |
711 ms |
54196 KB |
Output is correct |
31 |
Correct |
877 ms |
61012 KB |
Output is correct |
32 |
Correct |
936 ms |
68712 KB |
Output is correct |
33 |
Correct |
1046 ms |
76712 KB |
Output is correct |
34 |
Correct |
7 ms |
5972 KB |
Output is correct |
35 |
Correct |
12 ms |
6676 KB |
Output is correct |
36 |
Correct |
369 ms |
38620 KB |
Output is correct |
37 |
Correct |
671 ms |
55324 KB |
Output is correct |
38 |
Correct |
1063 ms |
72128 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4948 KB |
Output is correct |
2 |
Correct |
2 ms |
4948 KB |
Output is correct |
3 |
Correct |
3 ms |
4948 KB |
Output is correct |
4 |
Correct |
3 ms |
4992 KB |
Output is correct |
5 |
Correct |
3 ms |
4948 KB |
Output is correct |
6 |
Correct |
2 ms |
4996 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
8 |
Correct |
2 ms |
4992 KB |
Output is correct |
9 |
Correct |
443 ms |
44044 KB |
Output is correct |
10 |
Correct |
21 ms |
9248 KB |
Output is correct |
11 |
Correct |
130 ms |
26824 KB |
Output is correct |
12 |
Correct |
33 ms |
11260 KB |
Output is correct |
13 |
Correct |
43 ms |
16420 KB |
Output is correct |
14 |
Correct |
3 ms |
5204 KB |
Output is correct |
15 |
Correct |
4 ms |
5460 KB |
Output is correct |
16 |
Correct |
426 ms |
44128 KB |
Output is correct |
17 |
Correct |
2 ms |
4948 KB |
Output is correct |
18 |
Correct |
2 ms |
4996 KB |
Output is correct |
19 |
Correct |
2 ms |
5000 KB |
Output is correct |
20 |
Correct |
3 ms |
4948 KB |
Output is correct |
21 |
Correct |
2 ms |
4948 KB |
Output is correct |
22 |
Correct |
2 ms |
4960 KB |
Output is correct |
23 |
Correct |
980 ms |
65644 KB |
Output is correct |
24 |
Correct |
2 ms |
4996 KB |
Output is correct |
25 |
Correct |
5 ms |
5332 KB |
Output is correct |
26 |
Correct |
5 ms |
5460 KB |
Output is correct |
27 |
Correct |
9 ms |
5648 KB |
Output is correct |
28 |
Correct |
294 ms |
29564 KB |
Output is correct |
29 |
Correct |
471 ms |
41640 KB |
Output is correct |
30 |
Correct |
653 ms |
53688 KB |
Output is correct |
31 |
Correct |
1076 ms |
65768 KB |
Output is correct |
32 |
Correct |
2 ms |
4948 KB |
Output is correct |
33 |
Correct |
2 ms |
4948 KB |
Output is correct |
34 |
Correct |
3 ms |
4948 KB |
Output is correct |
35 |
Correct |
2 ms |
4948 KB |
Output is correct |
36 |
Correct |
3 ms |
5000 KB |
Output is correct |
37 |
Correct |
3 ms |
4996 KB |
Output is correct |
38 |
Correct |
3 ms |
4992 KB |
Output is correct |
39 |
Correct |
3 ms |
5024 KB |
Output is correct |
40 |
Correct |
2 ms |
4992 KB |
Output is correct |
41 |
Correct |
3 ms |
4992 KB |
Output is correct |
42 |
Correct |
2 ms |
4948 KB |
Output is correct |
43 |
Correct |
4 ms |
5332 KB |
Output is correct |
44 |
Correct |
8 ms |
5588 KB |
Output is correct |
45 |
Correct |
508 ms |
42444 KB |
Output is correct |
46 |
Correct |
952 ms |
59288 KB |
Output is correct |
47 |
Correct |
793 ms |
59404 KB |
Output is correct |
48 |
Correct |
2 ms |
4948 KB |
Output is correct |
49 |
Correct |
2 ms |
4948 KB |
Output is correct |
50 |
Correct |
2 ms |
4992 KB |
Output is correct |
51 |
Correct |
2 ms |
4996 KB |
Output is correct |
52 |
Correct |
2 ms |
4948 KB |
Output is correct |
53 |
Correct |
2 ms |
4948 KB |
Output is correct |
54 |
Correct |
3 ms |
4948 KB |
Output is correct |
55 |
Correct |
830 ms |
59932 KB |
Output is correct |
56 |
Correct |
2 ms |
4948 KB |
Output is correct |
57 |
Correct |
5 ms |
5460 KB |
Output is correct |
58 |
Correct |
14 ms |
6732 KB |
Output is correct |
59 |
Correct |
13 ms |
6680 KB |
Output is correct |
60 |
Correct |
325 ms |
32672 KB |
Output is correct |
61 |
Correct |
560 ms |
42200 KB |
Output is correct |
62 |
Correct |
754 ms |
50452 KB |
Output is correct |
63 |
Correct |
911 ms |
60060 KB |
Output is correct |
64 |
Correct |
3 ms |
4948 KB |
Output is correct |
65 |
Correct |
3 ms |
4948 KB |
Output is correct |
66 |
Correct |
2 ms |
4948 KB |
Output is correct |
67 |
Correct |
1105 ms |
76756 KB |
Output is correct |
68 |
Correct |
1125 ms |
76752 KB |
Output is correct |
69 |
Correct |
1120 ms |
76376 KB |
Output is correct |
70 |
Correct |
6 ms |
5708 KB |
Output is correct |
71 |
Correct |
11 ms |
6540 KB |
Output is correct |
72 |
Correct |
390 ms |
39908 KB |
Output is correct |
73 |
Correct |
682 ms |
57312 KB |
Output is correct |
74 |
Correct |
1061 ms |
74848 KB |
Output is correct |
75 |
Correct |
1014 ms |
68532 KB |
Output is correct |
76 |
Correct |
1058 ms |
76792 KB |
Output is correct |
77 |
Correct |
8 ms |
5924 KB |
Output is correct |
78 |
Correct |
12 ms |
6672 KB |
Output is correct |
79 |
Correct |
374 ms |
38692 KB |
Output is correct |
80 |
Correct |
651 ms |
55328 KB |
Output is correct |
81 |
Correct |
1093 ms |
71992 KB |
Output is correct |
82 |
Correct |
2 ms |
4948 KB |
Output is correct |
83 |
Correct |
2 ms |
4948 KB |
Output is correct |
84 |
Correct |
2 ms |
4948 KB |
Output is correct |
85 |
Correct |
910 ms |
82908 KB |
Output is correct |
86 |
Correct |
1018 ms |
79708 KB |
Output is correct |
87 |
Correct |
981 ms |
79720 KB |
Output is correct |
88 |
Correct |
767 ms |
71332 KB |
Output is correct |
89 |
Correct |
579 ms |
48432 KB |
Output is correct |
90 |
Correct |
559 ms |
42244 KB |
Output is correct |
91 |
Correct |
614 ms |
42124 KB |
Output is correct |
92 |
Correct |
1029 ms |
70528 KB |
Output is correct |
93 |
Correct |
1053 ms |
70484 KB |
Output is correct |
94 |
Correct |
1141 ms |
70564 KB |
Output is correct |
95 |
Correct |
1048 ms |
70496 KB |
Output is correct |
96 |
Correct |
2 ms |
4948 KB |
Output is correct |
97 |
Correct |
42 ms |
10252 KB |
Output is correct |
98 |
Correct |
181 ms |
26800 KB |
Output is correct |
99 |
Correct |
893 ms |
82908 KB |
Output is correct |
100 |
Correct |
14 ms |
6740 KB |
Output is correct |
101 |
Correct |
71 ms |
13620 KB |
Output is correct |
102 |
Correct |
169 ms |
21812 KB |
Output is correct |
103 |
Correct |
257 ms |
28712 KB |
Output is correct |
104 |
Correct |
470 ms |
37448 KB |
Output is correct |
105 |
Correct |
595 ms |
46140 KB |
Output is correct |
106 |
Correct |
726 ms |
54820 KB |
Output is correct |
107 |
Correct |
935 ms |
63584 KB |
Output is correct |
108 |
Correct |
2 ms |
4948 KB |
Output is correct |
109 |
Correct |
2 ms |
4948 KB |
Output is correct |
110 |
Correct |
2 ms |
4948 KB |
Output is correct |
111 |
Correct |
2 ms |
4948 KB |
Output is correct |
112 |
Correct |
2 ms |
4948 KB |
Output is correct |
113 |
Correct |
2 ms |
4988 KB |
Output is correct |
114 |
Correct |
2 ms |
4948 KB |
Output is correct |
115 |
Correct |
2 ms |
4948 KB |
Output is correct |
116 |
Correct |
2 ms |
4948 KB |
Output is correct |
117 |
Correct |
2 ms |
4992 KB |
Output is correct |
118 |
Correct |
2 ms |
5000 KB |
Output is correct |
119 |
Correct |
4 ms |
5332 KB |
Output is correct |
120 |
Correct |
5 ms |
5588 KB |
Output is correct |
121 |
Correct |
449 ms |
42520 KB |
Output is correct |
122 |
Correct |
704 ms |
59324 KB |
Output is correct |
123 |
Correct |
765 ms |
59444 KB |
Output is correct |
124 |
Correct |
2 ms |
4948 KB |
Output is correct |
125 |
Correct |
2 ms |
4948 KB |
Output is correct |
126 |
Correct |
2 ms |
4948 KB |
Output is correct |
127 |
Correct |
1050 ms |
76708 KB |
Output is correct |
128 |
Correct |
1106 ms |
76744 KB |
Output is correct |
129 |
Correct |
1085 ms |
76420 KB |
Output is correct |
130 |
Correct |
6 ms |
5716 KB |
Output is correct |
131 |
Correct |
11 ms |
6564 KB |
Output is correct |
132 |
Correct |
381 ms |
39892 KB |
Output is correct |
133 |
Correct |
730 ms |
57284 KB |
Output is correct |
134 |
Correct |
1101 ms |
74776 KB |
Output is correct |
135 |
Correct |
1038 ms |
82844 KB |
Output is correct |
136 |
Correct |
1101 ms |
82992 KB |
Output is correct |
137 |
Correct |
915 ms |
82828 KB |
Output is correct |
138 |
Correct |
783 ms |
58132 KB |
Output is correct |
139 |
Correct |
809 ms |
65204 KB |
Output is correct |
140 |
Correct |
2 ms |
4948 KB |
Output is correct |
141 |
Correct |
91 ms |
15236 KB |
Output is correct |
142 |
Correct |
26 ms |
8244 KB |
Output is correct |
143 |
Correct |
130 ms |
16076 KB |
Output is correct |
144 |
Correct |
217 ms |
23788 KB |
Output is correct |
145 |
Correct |
328 ms |
33296 KB |
Output is correct |
146 |
Correct |
467 ms |
40352 KB |
Output is correct |
147 |
Correct |
669 ms |
47304 KB |
Output is correct |
148 |
Correct |
711 ms |
54196 KB |
Output is correct |
149 |
Correct |
877 ms |
61012 KB |
Output is correct |
150 |
Correct |
936 ms |
68712 KB |
Output is correct |
151 |
Correct |
1046 ms |
76712 KB |
Output is correct |
152 |
Correct |
7 ms |
5972 KB |
Output is correct |
153 |
Correct |
12 ms |
6676 KB |
Output is correct |
154 |
Correct |
369 ms |
38620 KB |
Output is correct |
155 |
Correct |
671 ms |
55324 KB |
Output is correct |
156 |
Correct |
1063 ms |
72128 KB |
Output is correct |
157 |
Correct |
2 ms |
4948 KB |
Output is correct |
158 |
Correct |
3 ms |
4948 KB |
Output is correct |
159 |
Correct |
2 ms |
4996 KB |
Output is correct |
160 |
Correct |
2 ms |
4948 KB |
Output is correct |
161 |
Correct |
661 ms |
50364 KB |
Output is correct |
162 |
Correct |
802 ms |
85024 KB |
Output is correct |
163 |
Correct |
835 ms |
73344 KB |
Output is correct |
164 |
Correct |
767 ms |
73392 KB |
Output is correct |
165 |
Correct |
698 ms |
57968 KB |
Output is correct |
166 |
Correct |
740 ms |
52408 KB |
Output is correct |
167 |
Correct |
127 ms |
17216 KB |
Output is correct |
168 |
Correct |
39 ms |
9020 KB |
Output is correct |
169 |
Correct |
126 ms |
16036 KB |
Output is correct |
170 |
Correct |
275 ms |
25656 KB |
Output is correct |
171 |
Correct |
368 ms |
32780 KB |
Output is correct |
172 |
Correct |
281 ms |
28180 KB |
Output is correct |
173 |
Correct |
345 ms |
32716 KB |
Output is correct |
174 |
Correct |
431 ms |
37380 KB |
Output is correct |
175 |
Correct |
517 ms |
41764 KB |
Output is correct |
176 |
Correct |
627 ms |
46520 KB |
Output is correct |
177 |
Correct |
671 ms |
51064 KB |
Output is correct |