#include <bits/stdc++.h>
#include "parks.h"
#define pb push_back
#define f first
#define s second
#define pi acos(-1)
using namespace std;
typedef long long ll;
typedef long double ld;
const ll oo = 1e9;
const ld eps = (ld)1 / oo;
const ll N = 2e5 + 100;
const ll M = 1e6;
const int step[4][2] = {{0, -2}, {0, 2}, {-2, 0}, {2, 0}};
vector <pair<int, int> > ans;
map <int, int> mp[N];
map <int, pair<int, int> > mp1[N];
int pred[N];
//void build(vector <int> u, vector <int> v, vector <int> a, vector <int> b)
//{
// for (int i = 0; i < u.size(); i++) cout << u[i] << " " << v[i] << " " << a[i] << " " << b[i] << endl;
//}
int get(int x)
{
return ((pred[x] == x) ? x : (pred[x] = get(pred[x])));
}
void unite(int x, int y)
{
pred[x] = y;
}
int construct_roads (vector<int> x, vector<int> y) {
std::vector<int> u, v, a, b;
int n = x.size();
set <pair<int, int> > st;
for (int i = 0; i < n; i++) mp[x[i]][y[i]] = i + 1;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < 4; j++)
{
int x1 = x[i] + step[j][0];
int y1 = y[i] + step[j][1];
if (mp[x1][y1] != 0)
{
int x2 = (x[i] + x1) / 2;
int y2 = (y[i] + y1) / 2;
mp1[x2][y2] = {i + 1, mp[x1][y1]};
for (int c = 0; c < 4; c++)
{
int x3 = x2 + step[c][0] / 2;
int y3 = y2 + step[c][1] / 2;
if ((x3 & 1) && (y3 & 1)) st.insert({x3, y3});
}
}
}
}
for (int i = 0; i < n; i++) pred[i] = i;
int kol = n - 1;
while (!st.empty())
{
pair<int, int> c = *st.begin();
st.erase(st.begin());
int x = c.f, y = c.s;
for (int i = (((x + y) / 2) & 1) * 2; i < (((x + y) / 2) & 1) * 2 + 2; i++)
{
int x1 = x + step[i][0] / 2;
int y1 = y + step[i][1] / 2;
if (mp1[x1].find(y1) != mp1[x1].end())
{
c = mp1[x1][y1];
c.f--, c.s--;
if (get(c.f) != get(c.s))
{
unite(get(c.f), get(c.s));
u.pb(c.f);
v.pb(c.s);
a.pb(x);
b.pb(y);
kol--;
break;
}
}
}
}
if (kol == 0)
{
build(u, v, a, b);
return 1;
}
return 0;
}
//int main()
//{
// int n;
// cin >> n;
// vector <int> x(n), y(n);
// for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
// cout << construct_roads(x, y) << endl;
//}
/*
1
4
-100000 -100000 100000 -100000 -100000 100000
-100000 -100000 100000 -100000 -100000 100000
-100000 -100000 100000 -100000 -100000 100000
-100000 -100000 100000 -100000 -100000 100000
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
19028 KB |
Output is correct |
2 |
Correct |
11 ms |
19068 KB |
Output is correct |
3 |
Correct |
10 ms |
19028 KB |
Output is correct |
4 |
Correct |
12 ms |
19104 KB |
Output is correct |
5 |
Correct |
13 ms |
19092 KB |
Output is correct |
6 |
Correct |
11 ms |
19028 KB |
Output is correct |
7 |
Correct |
11 ms |
19104 KB |
Output is correct |
8 |
Correct |
12 ms |
19104 KB |
Output is correct |
9 |
Correct |
545 ms |
56412 KB |
Output is correct |
10 |
Correct |
35 ms |
22988 KB |
Output is correct |
11 |
Correct |
168 ms |
39236 KB |
Output is correct |
12 |
Correct |
51 ms |
24900 KB |
Output is correct |
13 |
Correct |
118 ms |
34376 KB |
Output is correct |
14 |
Correct |
13 ms |
19332 KB |
Output is correct |
15 |
Correct |
16 ms |
19788 KB |
Output is correct |
16 |
Correct |
509 ms |
56368 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
19028 KB |
Output is correct |
2 |
Correct |
11 ms |
19068 KB |
Output is correct |
3 |
Correct |
10 ms |
19028 KB |
Output is correct |
4 |
Correct |
12 ms |
19104 KB |
Output is correct |
5 |
Correct |
13 ms |
19092 KB |
Output is correct |
6 |
Correct |
11 ms |
19028 KB |
Output is correct |
7 |
Correct |
11 ms |
19104 KB |
Output is correct |
8 |
Correct |
12 ms |
19104 KB |
Output is correct |
9 |
Correct |
545 ms |
56412 KB |
Output is correct |
10 |
Correct |
35 ms |
22988 KB |
Output is correct |
11 |
Correct |
168 ms |
39236 KB |
Output is correct |
12 |
Correct |
51 ms |
24900 KB |
Output is correct |
13 |
Correct |
118 ms |
34376 KB |
Output is correct |
14 |
Correct |
13 ms |
19332 KB |
Output is correct |
15 |
Correct |
16 ms |
19788 KB |
Output is correct |
16 |
Correct |
509 ms |
56368 KB |
Output is correct |
17 |
Correct |
11 ms |
19028 KB |
Output is correct |
18 |
Correct |
11 ms |
19028 KB |
Output is correct |
19 |
Correct |
11 ms |
19108 KB |
Output is correct |
20 |
Correct |
11 ms |
19104 KB |
Output is correct |
21 |
Correct |
10 ms |
19096 KB |
Output is correct |
22 |
Correct |
11 ms |
19104 KB |
Output is correct |
23 |
Correct |
1556 ms |
86648 KB |
Output is correct |
24 |
Correct |
10 ms |
19028 KB |
Output is correct |
25 |
Correct |
13 ms |
19496 KB |
Output is correct |
26 |
Correct |
19 ms |
19948 KB |
Output is correct |
27 |
Correct |
22 ms |
20336 KB |
Output is correct |
28 |
Correct |
485 ms |
46056 KB |
Output is correct |
29 |
Correct |
831 ms |
59616 KB |
Output is correct |
30 |
Correct |
1182 ms |
73004 KB |
Output is correct |
31 |
Correct |
1555 ms |
86472 KB |
Output is correct |
32 |
Correct |
11 ms |
19028 KB |
Output is correct |
33 |
Correct |
11 ms |
19028 KB |
Output is correct |
34 |
Correct |
10 ms |
19028 KB |
Output is correct |
35 |
Correct |
10 ms |
19100 KB |
Output is correct |
36 |
Correct |
11 ms |
19060 KB |
Output is correct |
37 |
Correct |
11 ms |
19028 KB |
Output is correct |
38 |
Correct |
10 ms |
19028 KB |
Output is correct |
39 |
Correct |
12 ms |
19044 KB |
Output is correct |
40 |
Correct |
12 ms |
19028 KB |
Output is correct |
41 |
Correct |
10 ms |
19004 KB |
Output is correct |
42 |
Correct |
11 ms |
19028 KB |
Output is correct |
43 |
Correct |
15 ms |
19668 KB |
Output is correct |
44 |
Correct |
17 ms |
19924 KB |
Output is correct |
45 |
Correct |
587 ms |
50760 KB |
Output is correct |
46 |
Correct |
921 ms |
64976 KB |
Output is correct |
47 |
Correct |
949 ms |
64772 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
19028 KB |
Output is correct |
2 |
Correct |
11 ms |
19068 KB |
Output is correct |
3 |
Correct |
10 ms |
19028 KB |
Output is correct |
4 |
Correct |
12 ms |
19104 KB |
Output is correct |
5 |
Correct |
13 ms |
19092 KB |
Output is correct |
6 |
Correct |
11 ms |
19028 KB |
Output is correct |
7 |
Correct |
11 ms |
19104 KB |
Output is correct |
8 |
Correct |
12 ms |
19104 KB |
Output is correct |
9 |
Correct |
545 ms |
56412 KB |
Output is correct |
10 |
Correct |
35 ms |
22988 KB |
Output is correct |
11 |
Correct |
168 ms |
39236 KB |
Output is correct |
12 |
Correct |
51 ms |
24900 KB |
Output is correct |
13 |
Correct |
118 ms |
34376 KB |
Output is correct |
14 |
Correct |
13 ms |
19332 KB |
Output is correct |
15 |
Correct |
16 ms |
19788 KB |
Output is correct |
16 |
Correct |
509 ms |
56368 KB |
Output is correct |
17 |
Correct |
11 ms |
19028 KB |
Output is correct |
18 |
Correct |
11 ms |
19028 KB |
Output is correct |
19 |
Correct |
11 ms |
19108 KB |
Output is correct |
20 |
Correct |
11 ms |
19104 KB |
Output is correct |
21 |
Correct |
10 ms |
19096 KB |
Output is correct |
22 |
Correct |
11 ms |
19104 KB |
Output is correct |
23 |
Correct |
1556 ms |
86648 KB |
Output is correct |
24 |
Correct |
10 ms |
19028 KB |
Output is correct |
25 |
Correct |
13 ms |
19496 KB |
Output is correct |
26 |
Correct |
19 ms |
19948 KB |
Output is correct |
27 |
Correct |
22 ms |
20336 KB |
Output is correct |
28 |
Correct |
485 ms |
46056 KB |
Output is correct |
29 |
Correct |
831 ms |
59616 KB |
Output is correct |
30 |
Correct |
1182 ms |
73004 KB |
Output is correct |
31 |
Correct |
1555 ms |
86472 KB |
Output is correct |
32 |
Correct |
11 ms |
19028 KB |
Output is correct |
33 |
Correct |
11 ms |
19028 KB |
Output is correct |
34 |
Correct |
10 ms |
19028 KB |
Output is correct |
35 |
Correct |
10 ms |
19100 KB |
Output is correct |
36 |
Correct |
11 ms |
19060 KB |
Output is correct |
37 |
Correct |
11 ms |
19028 KB |
Output is correct |
38 |
Correct |
10 ms |
19028 KB |
Output is correct |
39 |
Correct |
12 ms |
19044 KB |
Output is correct |
40 |
Correct |
12 ms |
19028 KB |
Output is correct |
41 |
Correct |
10 ms |
19004 KB |
Output is correct |
42 |
Correct |
11 ms |
19028 KB |
Output is correct |
43 |
Correct |
15 ms |
19668 KB |
Output is correct |
44 |
Correct |
17 ms |
19924 KB |
Output is correct |
45 |
Correct |
587 ms |
50760 KB |
Output is correct |
46 |
Correct |
921 ms |
64976 KB |
Output is correct |
47 |
Correct |
949 ms |
64772 KB |
Output is correct |
48 |
Correct |
11 ms |
19028 KB |
Output is correct |
49 |
Correct |
11 ms |
19028 KB |
Output is correct |
50 |
Correct |
10 ms |
19104 KB |
Output is correct |
51 |
Correct |
13 ms |
19104 KB |
Output is correct |
52 |
Correct |
10 ms |
19028 KB |
Output is correct |
53 |
Correct |
11 ms |
19040 KB |
Output is correct |
54 |
Correct |
11 ms |
19104 KB |
Output is correct |
55 |
Correct |
1605 ms |
83528 KB |
Output is correct |
56 |
Correct |
10 ms |
19028 KB |
Output is correct |
57 |
Correct |
15 ms |
19628 KB |
Output is correct |
58 |
Correct |
29 ms |
21124 KB |
Output is correct |
59 |
Correct |
40 ms |
22116 KB |
Output is correct |
60 |
Correct |
646 ms |
51356 KB |
Output is correct |
61 |
Correct |
962 ms |
62540 KB |
Output is correct |
62 |
Correct |
1262 ms |
72620 KB |
Output is correct |
63 |
Correct |
1582 ms |
83624 KB |
Output is correct |
64 |
Correct |
10 ms |
19028 KB |
Output is correct |
65 |
Correct |
11 ms |
19028 KB |
Output is correct |
66 |
Correct |
10 ms |
19104 KB |
Output is correct |
67 |
Correct |
1271 ms |
89220 KB |
Output is correct |
68 |
Correct |
1222 ms |
89320 KB |
Output is correct |
69 |
Correct |
1231 ms |
88832 KB |
Output is correct |
70 |
Correct |
21 ms |
20180 KB |
Output is correct |
71 |
Correct |
30 ms |
21184 KB |
Output is correct |
72 |
Correct |
577 ms |
49404 KB |
Output is correct |
73 |
Correct |
994 ms |
64496 KB |
Output is correct |
74 |
Correct |
1388 ms |
79616 KB |
Output is correct |
75 |
Correct |
1441 ms |
83560 KB |
Output is correct |
76 |
Correct |
1228 ms |
89412 KB |
Output is correct |
77 |
Correct |
23 ms |
20468 KB |
Output is correct |
78 |
Correct |
35 ms |
21656 KB |
Output is correct |
79 |
Correct |
590 ms |
50048 KB |
Output is correct |
80 |
Correct |
997 ms |
65408 KB |
Output is correct |
81 |
Correct |
1412 ms |
80804 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
19028 KB |
Output is correct |
2 |
Correct |
11 ms |
19068 KB |
Output is correct |
3 |
Correct |
10 ms |
19028 KB |
Output is correct |
4 |
Correct |
12 ms |
19104 KB |
Output is correct |
5 |
Correct |
13 ms |
19092 KB |
Output is correct |
6 |
Correct |
11 ms |
19028 KB |
Output is correct |
7 |
Correct |
11 ms |
19104 KB |
Output is correct |
8 |
Correct |
12 ms |
19104 KB |
Output is correct |
9 |
Correct |
545 ms |
56412 KB |
Output is correct |
10 |
Correct |
35 ms |
22988 KB |
Output is correct |
11 |
Correct |
168 ms |
39236 KB |
Output is correct |
12 |
Correct |
51 ms |
24900 KB |
Output is correct |
13 |
Correct |
118 ms |
34376 KB |
Output is correct |
14 |
Correct |
13 ms |
19332 KB |
Output is correct |
15 |
Correct |
16 ms |
19788 KB |
Output is correct |
16 |
Correct |
509 ms |
56368 KB |
Output is correct |
17 |
Correct |
11 ms |
19028 KB |
Output is correct |
18 |
Correct |
11 ms |
19108 KB |
Output is correct |
19 |
Correct |
11 ms |
19028 KB |
Output is correct |
20 |
Correct |
669 ms |
74392 KB |
Output is correct |
21 |
Correct |
721 ms |
74296 KB |
Output is correct |
22 |
Correct |
730 ms |
74340 KB |
Output is correct |
23 |
Correct |
748 ms |
82328 KB |
Output is correct |
24 |
Correct |
453 ms |
52844 KB |
Output is correct |
25 |
Correct |
1171 ms |
78032 KB |
Output is correct |
26 |
Correct |
1031 ms |
77968 KB |
Output is correct |
27 |
Correct |
1086 ms |
83636 KB |
Output is correct |
28 |
Correct |
1111 ms |
83676 KB |
Output is correct |
29 |
Correct |
1188 ms |
83748 KB |
Output is correct |
30 |
Correct |
1173 ms |
83812 KB |
Output is correct |
31 |
Correct |
11 ms |
19028 KB |
Output is correct |
32 |
Correct |
46 ms |
23660 KB |
Output is correct |
33 |
Correct |
97 ms |
36356 KB |
Output is correct |
34 |
Correct |
628 ms |
74276 KB |
Output is correct |
35 |
Correct |
33 ms |
21596 KB |
Output is correct |
36 |
Correct |
153 ms |
31556 KB |
Output is correct |
37 |
Correct |
432 ms |
43988 KB |
Output is correct |
38 |
Correct |
374 ms |
41296 KB |
Output is correct |
39 |
Correct |
555 ms |
49328 KB |
Output is correct |
40 |
Correct |
766 ms |
57188 KB |
Output is correct |
41 |
Correct |
973 ms |
65156 KB |
Output is correct |
42 |
Correct |
1195 ms |
73120 KB |
Output is correct |
43 |
Correct |
10 ms |
19028 KB |
Output is correct |
44 |
Correct |
11 ms |
19024 KB |
Output is correct |
45 |
Correct |
10 ms |
19108 KB |
Output is correct |
46 |
Correct |
10 ms |
19028 KB |
Output is correct |
47 |
Correct |
10 ms |
19028 KB |
Output is correct |
48 |
Correct |
10 ms |
19048 KB |
Output is correct |
49 |
Correct |
10 ms |
19100 KB |
Output is correct |
50 |
Correct |
10 ms |
19028 KB |
Output is correct |
51 |
Correct |
11 ms |
19028 KB |
Output is correct |
52 |
Correct |
14 ms |
19028 KB |
Output is correct |
53 |
Correct |
11 ms |
19128 KB |
Output is correct |
54 |
Correct |
16 ms |
19572 KB |
Output is correct |
55 |
Correct |
17 ms |
19924 KB |
Output is correct |
56 |
Correct |
617 ms |
50592 KB |
Output is correct |
57 |
Correct |
1014 ms |
64768 KB |
Output is correct |
58 |
Correct |
1012 ms |
64512 KB |
Output is correct |
59 |
Correct |
10 ms |
19104 KB |
Output is correct |
60 |
Correct |
11 ms |
19104 KB |
Output is correct |
61 |
Correct |
11 ms |
19100 KB |
Output is correct |
62 |
Correct |
1511 ms |
88316 KB |
Output is correct |
63 |
Correct |
1299 ms |
88700 KB |
Output is correct |
64 |
Correct |
1195 ms |
88288 KB |
Output is correct |
65 |
Correct |
21 ms |
20116 KB |
Output is correct |
66 |
Correct |
31 ms |
21288 KB |
Output is correct |
67 |
Correct |
558 ms |
49244 KB |
Output is correct |
68 |
Correct |
951 ms |
64192 KB |
Output is correct |
69 |
Correct |
1372 ms |
78836 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
19028 KB |
Output is correct |
2 |
Correct |
11 ms |
19068 KB |
Output is correct |
3 |
Correct |
10 ms |
19028 KB |
Output is correct |
4 |
Correct |
12 ms |
19104 KB |
Output is correct |
5 |
Correct |
13 ms |
19092 KB |
Output is correct |
6 |
Correct |
11 ms |
19028 KB |
Output is correct |
7 |
Correct |
11 ms |
19104 KB |
Output is correct |
8 |
Correct |
12 ms |
19104 KB |
Output is correct |
9 |
Correct |
545 ms |
56412 KB |
Output is correct |
10 |
Correct |
35 ms |
22988 KB |
Output is correct |
11 |
Correct |
168 ms |
39236 KB |
Output is correct |
12 |
Correct |
51 ms |
24900 KB |
Output is correct |
13 |
Correct |
118 ms |
34376 KB |
Output is correct |
14 |
Correct |
13 ms |
19332 KB |
Output is correct |
15 |
Correct |
16 ms |
19788 KB |
Output is correct |
16 |
Correct |
509 ms |
56368 KB |
Output is correct |
17 |
Correct |
966 ms |
93340 KB |
Output is correct |
18 |
Correct |
955 ms |
93300 KB |
Output is correct |
19 |
Correct |
702 ms |
74496 KB |
Output is correct |
20 |
Correct |
1234 ms |
74508 KB |
Output is correct |
21 |
Correct |
1102 ms |
78048 KB |
Output is correct |
22 |
Correct |
10 ms |
19028 KB |
Output is correct |
23 |
Correct |
103 ms |
28744 KB |
Output is correct |
24 |
Correct |
59 ms |
24428 KB |
Output is correct |
25 |
Correct |
272 ms |
37256 KB |
Output is correct |
26 |
Correct |
558 ms |
49768 KB |
Output is correct |
27 |
Correct |
500 ms |
47524 KB |
Output is correct |
28 |
Correct |
704 ms |
54388 KB |
Output is correct |
29 |
Correct |
920 ms |
61216 KB |
Output is correct |
30 |
Correct |
1054 ms |
68132 KB |
Output is correct |
31 |
Correct |
1288 ms |
74988 KB |
Output is correct |
32 |
Correct |
1372 ms |
82892 KB |
Output is correct |
33 |
Correct |
1175 ms |
88552 KB |
Output is correct |
34 |
Correct |
23 ms |
20464 KB |
Output is correct |
35 |
Correct |
37 ms |
21636 KB |
Output is correct |
36 |
Correct |
569 ms |
49832 KB |
Output is correct |
37 |
Correct |
947 ms |
65356 KB |
Output is correct |
38 |
Correct |
1385 ms |
80136 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
19028 KB |
Output is correct |
2 |
Correct |
11 ms |
19068 KB |
Output is correct |
3 |
Correct |
10 ms |
19028 KB |
Output is correct |
4 |
Correct |
12 ms |
19104 KB |
Output is correct |
5 |
Correct |
13 ms |
19092 KB |
Output is correct |
6 |
Correct |
11 ms |
19028 KB |
Output is correct |
7 |
Correct |
11 ms |
19104 KB |
Output is correct |
8 |
Correct |
12 ms |
19104 KB |
Output is correct |
9 |
Correct |
545 ms |
56412 KB |
Output is correct |
10 |
Correct |
35 ms |
22988 KB |
Output is correct |
11 |
Correct |
168 ms |
39236 KB |
Output is correct |
12 |
Correct |
51 ms |
24900 KB |
Output is correct |
13 |
Correct |
118 ms |
34376 KB |
Output is correct |
14 |
Correct |
13 ms |
19332 KB |
Output is correct |
15 |
Correct |
16 ms |
19788 KB |
Output is correct |
16 |
Correct |
509 ms |
56368 KB |
Output is correct |
17 |
Correct |
11 ms |
19028 KB |
Output is correct |
18 |
Correct |
11 ms |
19028 KB |
Output is correct |
19 |
Correct |
11 ms |
19108 KB |
Output is correct |
20 |
Correct |
11 ms |
19104 KB |
Output is correct |
21 |
Correct |
10 ms |
19096 KB |
Output is correct |
22 |
Correct |
11 ms |
19104 KB |
Output is correct |
23 |
Correct |
1556 ms |
86648 KB |
Output is correct |
24 |
Correct |
10 ms |
19028 KB |
Output is correct |
25 |
Correct |
13 ms |
19496 KB |
Output is correct |
26 |
Correct |
19 ms |
19948 KB |
Output is correct |
27 |
Correct |
22 ms |
20336 KB |
Output is correct |
28 |
Correct |
485 ms |
46056 KB |
Output is correct |
29 |
Correct |
831 ms |
59616 KB |
Output is correct |
30 |
Correct |
1182 ms |
73004 KB |
Output is correct |
31 |
Correct |
1555 ms |
86472 KB |
Output is correct |
32 |
Correct |
11 ms |
19028 KB |
Output is correct |
33 |
Correct |
11 ms |
19028 KB |
Output is correct |
34 |
Correct |
10 ms |
19028 KB |
Output is correct |
35 |
Correct |
10 ms |
19100 KB |
Output is correct |
36 |
Correct |
11 ms |
19060 KB |
Output is correct |
37 |
Correct |
11 ms |
19028 KB |
Output is correct |
38 |
Correct |
10 ms |
19028 KB |
Output is correct |
39 |
Correct |
12 ms |
19044 KB |
Output is correct |
40 |
Correct |
12 ms |
19028 KB |
Output is correct |
41 |
Correct |
10 ms |
19004 KB |
Output is correct |
42 |
Correct |
11 ms |
19028 KB |
Output is correct |
43 |
Correct |
15 ms |
19668 KB |
Output is correct |
44 |
Correct |
17 ms |
19924 KB |
Output is correct |
45 |
Correct |
587 ms |
50760 KB |
Output is correct |
46 |
Correct |
921 ms |
64976 KB |
Output is correct |
47 |
Correct |
949 ms |
64772 KB |
Output is correct |
48 |
Correct |
11 ms |
19028 KB |
Output is correct |
49 |
Correct |
11 ms |
19028 KB |
Output is correct |
50 |
Correct |
10 ms |
19104 KB |
Output is correct |
51 |
Correct |
13 ms |
19104 KB |
Output is correct |
52 |
Correct |
10 ms |
19028 KB |
Output is correct |
53 |
Correct |
11 ms |
19040 KB |
Output is correct |
54 |
Correct |
11 ms |
19104 KB |
Output is correct |
55 |
Correct |
1605 ms |
83528 KB |
Output is correct |
56 |
Correct |
10 ms |
19028 KB |
Output is correct |
57 |
Correct |
15 ms |
19628 KB |
Output is correct |
58 |
Correct |
29 ms |
21124 KB |
Output is correct |
59 |
Correct |
40 ms |
22116 KB |
Output is correct |
60 |
Correct |
646 ms |
51356 KB |
Output is correct |
61 |
Correct |
962 ms |
62540 KB |
Output is correct |
62 |
Correct |
1262 ms |
72620 KB |
Output is correct |
63 |
Correct |
1582 ms |
83624 KB |
Output is correct |
64 |
Correct |
10 ms |
19028 KB |
Output is correct |
65 |
Correct |
11 ms |
19028 KB |
Output is correct |
66 |
Correct |
10 ms |
19104 KB |
Output is correct |
67 |
Correct |
1271 ms |
89220 KB |
Output is correct |
68 |
Correct |
1222 ms |
89320 KB |
Output is correct |
69 |
Correct |
1231 ms |
88832 KB |
Output is correct |
70 |
Correct |
21 ms |
20180 KB |
Output is correct |
71 |
Correct |
30 ms |
21184 KB |
Output is correct |
72 |
Correct |
577 ms |
49404 KB |
Output is correct |
73 |
Correct |
994 ms |
64496 KB |
Output is correct |
74 |
Correct |
1388 ms |
79616 KB |
Output is correct |
75 |
Correct |
1441 ms |
83560 KB |
Output is correct |
76 |
Correct |
1228 ms |
89412 KB |
Output is correct |
77 |
Correct |
23 ms |
20468 KB |
Output is correct |
78 |
Correct |
35 ms |
21656 KB |
Output is correct |
79 |
Correct |
590 ms |
50048 KB |
Output is correct |
80 |
Correct |
997 ms |
65408 KB |
Output is correct |
81 |
Correct |
1412 ms |
80804 KB |
Output is correct |
82 |
Correct |
11 ms |
19028 KB |
Output is correct |
83 |
Correct |
11 ms |
19108 KB |
Output is correct |
84 |
Correct |
11 ms |
19028 KB |
Output is correct |
85 |
Correct |
669 ms |
74392 KB |
Output is correct |
86 |
Correct |
721 ms |
74296 KB |
Output is correct |
87 |
Correct |
730 ms |
74340 KB |
Output is correct |
88 |
Correct |
748 ms |
82328 KB |
Output is correct |
89 |
Correct |
453 ms |
52844 KB |
Output is correct |
90 |
Correct |
1171 ms |
78032 KB |
Output is correct |
91 |
Correct |
1031 ms |
77968 KB |
Output is correct |
92 |
Correct |
1086 ms |
83636 KB |
Output is correct |
93 |
Correct |
1111 ms |
83676 KB |
Output is correct |
94 |
Correct |
1188 ms |
83748 KB |
Output is correct |
95 |
Correct |
1173 ms |
83812 KB |
Output is correct |
96 |
Correct |
11 ms |
19028 KB |
Output is correct |
97 |
Correct |
46 ms |
23660 KB |
Output is correct |
98 |
Correct |
97 ms |
36356 KB |
Output is correct |
99 |
Correct |
628 ms |
74276 KB |
Output is correct |
100 |
Correct |
33 ms |
21596 KB |
Output is correct |
101 |
Correct |
153 ms |
31556 KB |
Output is correct |
102 |
Correct |
432 ms |
43988 KB |
Output is correct |
103 |
Correct |
374 ms |
41296 KB |
Output is correct |
104 |
Correct |
555 ms |
49328 KB |
Output is correct |
105 |
Correct |
766 ms |
57188 KB |
Output is correct |
106 |
Correct |
973 ms |
65156 KB |
Output is correct |
107 |
Correct |
1195 ms |
73120 KB |
Output is correct |
108 |
Correct |
10 ms |
19028 KB |
Output is correct |
109 |
Correct |
11 ms |
19024 KB |
Output is correct |
110 |
Correct |
10 ms |
19108 KB |
Output is correct |
111 |
Correct |
10 ms |
19028 KB |
Output is correct |
112 |
Correct |
10 ms |
19028 KB |
Output is correct |
113 |
Correct |
10 ms |
19048 KB |
Output is correct |
114 |
Correct |
10 ms |
19100 KB |
Output is correct |
115 |
Correct |
10 ms |
19028 KB |
Output is correct |
116 |
Correct |
11 ms |
19028 KB |
Output is correct |
117 |
Correct |
14 ms |
19028 KB |
Output is correct |
118 |
Correct |
11 ms |
19128 KB |
Output is correct |
119 |
Correct |
16 ms |
19572 KB |
Output is correct |
120 |
Correct |
17 ms |
19924 KB |
Output is correct |
121 |
Correct |
617 ms |
50592 KB |
Output is correct |
122 |
Correct |
1014 ms |
64768 KB |
Output is correct |
123 |
Correct |
1012 ms |
64512 KB |
Output is correct |
124 |
Correct |
10 ms |
19104 KB |
Output is correct |
125 |
Correct |
11 ms |
19104 KB |
Output is correct |
126 |
Correct |
11 ms |
19100 KB |
Output is correct |
127 |
Correct |
1511 ms |
88316 KB |
Output is correct |
128 |
Correct |
1299 ms |
88700 KB |
Output is correct |
129 |
Correct |
1195 ms |
88288 KB |
Output is correct |
130 |
Correct |
21 ms |
20116 KB |
Output is correct |
131 |
Correct |
31 ms |
21288 KB |
Output is correct |
132 |
Correct |
558 ms |
49244 KB |
Output is correct |
133 |
Correct |
951 ms |
64192 KB |
Output is correct |
134 |
Correct |
1372 ms |
78836 KB |
Output is correct |
135 |
Correct |
966 ms |
93340 KB |
Output is correct |
136 |
Correct |
955 ms |
93300 KB |
Output is correct |
137 |
Correct |
702 ms |
74496 KB |
Output is correct |
138 |
Correct |
1234 ms |
74508 KB |
Output is correct |
139 |
Correct |
1102 ms |
78048 KB |
Output is correct |
140 |
Correct |
10 ms |
19028 KB |
Output is correct |
141 |
Correct |
103 ms |
28744 KB |
Output is correct |
142 |
Correct |
59 ms |
24428 KB |
Output is correct |
143 |
Correct |
272 ms |
37256 KB |
Output is correct |
144 |
Correct |
558 ms |
49768 KB |
Output is correct |
145 |
Correct |
500 ms |
47524 KB |
Output is correct |
146 |
Correct |
704 ms |
54388 KB |
Output is correct |
147 |
Correct |
920 ms |
61216 KB |
Output is correct |
148 |
Correct |
1054 ms |
68132 KB |
Output is correct |
149 |
Correct |
1288 ms |
74988 KB |
Output is correct |
150 |
Correct |
1372 ms |
82892 KB |
Output is correct |
151 |
Correct |
1175 ms |
88552 KB |
Output is correct |
152 |
Correct |
23 ms |
20464 KB |
Output is correct |
153 |
Correct |
37 ms |
21636 KB |
Output is correct |
154 |
Correct |
569 ms |
49832 KB |
Output is correct |
155 |
Correct |
947 ms |
65356 KB |
Output is correct |
156 |
Correct |
1385 ms |
80136 KB |
Output is correct |
157 |
Correct |
9 ms |
19100 KB |
Output is correct |
158 |
Correct |
10 ms |
19064 KB |
Output is correct |
159 |
Correct |
10 ms |
19028 KB |
Output is correct |
160 |
Correct |
10 ms |
19060 KB |
Output is correct |
161 |
Correct |
1482 ms |
78460 KB |
Output is correct |
162 |
Correct |
642 ms |
75784 KB |
Output is correct |
163 |
Correct |
705 ms |
76696 KB |
Output is correct |
164 |
Correct |
722 ms |
76708 KB |
Output is correct |
165 |
Correct |
936 ms |
77960 KB |
Output is correct |
166 |
Correct |
1108 ms |
78132 KB |
Output is correct |
167 |
Correct |
201 ms |
33108 KB |
Output is correct |
168 |
Correct |
100 ms |
27404 KB |
Output is correct |
169 |
Correct |
399 ms |
40660 KB |
Output is correct |
170 |
Correct |
991 ms |
59504 KB |
Output is correct |
171 |
Correct |
1302 ms |
72700 KB |
Output is correct |
172 |
Correct |
656 ms |
49040 KB |
Output is correct |
173 |
Correct |
849 ms |
54996 KB |
Output is correct |
174 |
Correct |
1081 ms |
61092 KB |
Output is correct |
175 |
Correct |
1265 ms |
66812 KB |
Output is correct |
176 |
Correct |
1432 ms |
72880 KB |
Output is correct |
177 |
Correct |
1484 ms |
79024 KB |
Output is correct |