#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();
vector <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] - 1 > i)
{
int nx = mp[x1][y1];
int x2 = (x[i] + x1) / 2;
int y2 = (y[i] + y1) / 2;
mp1[x2][y2] = {i + 1, nx};
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.pb({x3, y3});
}
}
}
}
sort(st.begin(), st.end());
for (int i = 0; i < n; i++) pred[i] = i;
int kol = n - 1;
for (int p = 0; p < st.size() && kol > 0; p++)
{
pair<int, int> c = st[p];
if (p > 0 && c == st[p - 1]) continue;
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
*/
Compilation message
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:69:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
69 | for (int p = 0; p < st.size() && kol > 0; p++)
| ~~^~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
19104 KB |
Output is correct |
2 |
Correct |
10 ms |
19100 KB |
Output is correct |
3 |
Correct |
10 ms |
19104 KB |
Output is correct |
4 |
Correct |
10 ms |
19020 KB |
Output is correct |
5 |
Correct |
10 ms |
18984 KB |
Output is correct |
6 |
Correct |
12 ms |
19076 KB |
Output is correct |
7 |
Correct |
10 ms |
19028 KB |
Output is correct |
8 |
Correct |
10 ms |
19028 KB |
Output is correct |
9 |
Correct |
361 ms |
48148 KB |
Output is correct |
10 |
Correct |
26 ms |
22096 KB |
Output is correct |
11 |
Correct |
114 ms |
34732 KB |
Output is correct |
12 |
Correct |
35 ms |
23460 KB |
Output is correct |
13 |
Correct |
80 ms |
31036 KB |
Output is correct |
14 |
Correct |
12 ms |
19284 KB |
Output is correct |
15 |
Correct |
14 ms |
19604 KB |
Output is correct |
16 |
Correct |
347 ms |
48180 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
19104 KB |
Output is correct |
2 |
Correct |
10 ms |
19100 KB |
Output is correct |
3 |
Correct |
10 ms |
19104 KB |
Output is correct |
4 |
Correct |
10 ms |
19020 KB |
Output is correct |
5 |
Correct |
10 ms |
18984 KB |
Output is correct |
6 |
Correct |
12 ms |
19076 KB |
Output is correct |
7 |
Correct |
10 ms |
19028 KB |
Output is correct |
8 |
Correct |
10 ms |
19028 KB |
Output is correct |
9 |
Correct |
361 ms |
48148 KB |
Output is correct |
10 |
Correct |
26 ms |
22096 KB |
Output is correct |
11 |
Correct |
114 ms |
34732 KB |
Output is correct |
12 |
Correct |
35 ms |
23460 KB |
Output is correct |
13 |
Correct |
80 ms |
31036 KB |
Output is correct |
14 |
Correct |
12 ms |
19284 KB |
Output is correct |
15 |
Correct |
14 ms |
19604 KB |
Output is correct |
16 |
Correct |
347 ms |
48180 KB |
Output is correct |
17 |
Correct |
13 ms |
19028 KB |
Output is correct |
18 |
Correct |
10 ms |
19104 KB |
Output is correct |
19 |
Correct |
10 ms |
19028 KB |
Output is correct |
20 |
Correct |
10 ms |
19096 KB |
Output is correct |
21 |
Correct |
10 ms |
19044 KB |
Output is correct |
22 |
Correct |
10 ms |
19104 KB |
Output is correct |
23 |
Correct |
982 ms |
76260 KB |
Output is correct |
24 |
Correct |
11 ms |
19028 KB |
Output is correct |
25 |
Correct |
13 ms |
19364 KB |
Output is correct |
26 |
Correct |
18 ms |
19924 KB |
Output is correct |
27 |
Correct |
18 ms |
20060 KB |
Output is correct |
28 |
Correct |
286 ms |
42300 KB |
Output is correct |
29 |
Correct |
547 ms |
53228 KB |
Output is correct |
30 |
Correct |
723 ms |
65536 KB |
Output is correct |
31 |
Correct |
978 ms |
76148 KB |
Output is correct |
32 |
Correct |
10 ms |
19028 KB |
Output is correct |
33 |
Correct |
10 ms |
19028 KB |
Output is correct |
34 |
Correct |
10 ms |
19028 KB |
Output is correct |
35 |
Correct |
11 ms |
19036 KB |
Output is correct |
36 |
Correct |
10 ms |
19028 KB |
Output is correct |
37 |
Correct |
11 ms |
19100 KB |
Output is correct |
38 |
Correct |
10 ms |
19028 KB |
Output is correct |
39 |
Correct |
10 ms |
19044 KB |
Output is correct |
40 |
Correct |
10 ms |
19100 KB |
Output is correct |
41 |
Correct |
10 ms |
19100 KB |
Output is correct |
42 |
Correct |
11 ms |
19032 KB |
Output is correct |
43 |
Correct |
14 ms |
19500 KB |
Output is correct |
44 |
Correct |
17 ms |
19796 KB |
Output is correct |
45 |
Correct |
409 ms |
45248 KB |
Output is correct |
46 |
Correct |
638 ms |
57808 KB |
Output is correct |
47 |
Correct |
613 ms |
58012 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
19104 KB |
Output is correct |
2 |
Correct |
10 ms |
19100 KB |
Output is correct |
3 |
Correct |
10 ms |
19104 KB |
Output is correct |
4 |
Correct |
10 ms |
19020 KB |
Output is correct |
5 |
Correct |
10 ms |
18984 KB |
Output is correct |
6 |
Correct |
12 ms |
19076 KB |
Output is correct |
7 |
Correct |
10 ms |
19028 KB |
Output is correct |
8 |
Correct |
10 ms |
19028 KB |
Output is correct |
9 |
Correct |
361 ms |
48148 KB |
Output is correct |
10 |
Correct |
26 ms |
22096 KB |
Output is correct |
11 |
Correct |
114 ms |
34732 KB |
Output is correct |
12 |
Correct |
35 ms |
23460 KB |
Output is correct |
13 |
Correct |
80 ms |
31036 KB |
Output is correct |
14 |
Correct |
12 ms |
19284 KB |
Output is correct |
15 |
Correct |
14 ms |
19604 KB |
Output is correct |
16 |
Correct |
347 ms |
48180 KB |
Output is correct |
17 |
Correct |
13 ms |
19028 KB |
Output is correct |
18 |
Correct |
10 ms |
19104 KB |
Output is correct |
19 |
Correct |
10 ms |
19028 KB |
Output is correct |
20 |
Correct |
10 ms |
19096 KB |
Output is correct |
21 |
Correct |
10 ms |
19044 KB |
Output is correct |
22 |
Correct |
10 ms |
19104 KB |
Output is correct |
23 |
Correct |
982 ms |
76260 KB |
Output is correct |
24 |
Correct |
11 ms |
19028 KB |
Output is correct |
25 |
Correct |
13 ms |
19364 KB |
Output is correct |
26 |
Correct |
18 ms |
19924 KB |
Output is correct |
27 |
Correct |
18 ms |
20060 KB |
Output is correct |
28 |
Correct |
286 ms |
42300 KB |
Output is correct |
29 |
Correct |
547 ms |
53228 KB |
Output is correct |
30 |
Correct |
723 ms |
65536 KB |
Output is correct |
31 |
Correct |
978 ms |
76148 KB |
Output is correct |
32 |
Correct |
10 ms |
19028 KB |
Output is correct |
33 |
Correct |
10 ms |
19028 KB |
Output is correct |
34 |
Correct |
10 ms |
19028 KB |
Output is correct |
35 |
Correct |
11 ms |
19036 KB |
Output is correct |
36 |
Correct |
10 ms |
19028 KB |
Output is correct |
37 |
Correct |
11 ms |
19100 KB |
Output is correct |
38 |
Correct |
10 ms |
19028 KB |
Output is correct |
39 |
Correct |
10 ms |
19044 KB |
Output is correct |
40 |
Correct |
10 ms |
19100 KB |
Output is correct |
41 |
Correct |
10 ms |
19100 KB |
Output is correct |
42 |
Correct |
11 ms |
19032 KB |
Output is correct |
43 |
Correct |
14 ms |
19500 KB |
Output is correct |
44 |
Correct |
17 ms |
19796 KB |
Output is correct |
45 |
Correct |
409 ms |
45248 KB |
Output is correct |
46 |
Correct |
638 ms |
57808 KB |
Output is correct |
47 |
Correct |
613 ms |
58012 KB |
Output is correct |
48 |
Correct |
13 ms |
19028 KB |
Output is correct |
49 |
Correct |
12 ms |
19100 KB |
Output is correct |
50 |
Correct |
12 ms |
19108 KB |
Output is correct |
51 |
Correct |
11 ms |
19028 KB |
Output is correct |
52 |
Correct |
13 ms |
19012 KB |
Output is correct |
53 |
Correct |
10 ms |
19028 KB |
Output is correct |
54 |
Correct |
11 ms |
19008 KB |
Output is correct |
55 |
Correct |
999 ms |
75516 KB |
Output is correct |
56 |
Correct |
11 ms |
19028 KB |
Output is correct |
57 |
Correct |
14 ms |
19628 KB |
Output is correct |
58 |
Correct |
26 ms |
20716 KB |
Output is correct |
59 |
Correct |
31 ms |
21688 KB |
Output is correct |
60 |
Correct |
397 ms |
47372 KB |
Output is correct |
61 |
Correct |
601 ms |
58208 KB |
Output is correct |
62 |
Correct |
782 ms |
66144 KB |
Output is correct |
63 |
Correct |
1041 ms |
75468 KB |
Output is correct |
64 |
Correct |
10 ms |
19028 KB |
Output is correct |
65 |
Correct |
11 ms |
19028 KB |
Output is correct |
66 |
Correct |
11 ms |
19168 KB |
Output is correct |
67 |
Correct |
849 ms |
72612 KB |
Output is correct |
68 |
Correct |
824 ms |
72800 KB |
Output is correct |
69 |
Correct |
838 ms |
72404 KB |
Output is correct |
70 |
Correct |
16 ms |
19924 KB |
Output is correct |
71 |
Correct |
25 ms |
20948 KB |
Output is correct |
72 |
Correct |
365 ms |
44240 KB |
Output is correct |
73 |
Correct |
601 ms |
57532 KB |
Output is correct |
74 |
Correct |
914 ms |
69308 KB |
Output is correct |
75 |
Correct |
891 ms |
71428 KB |
Output is correct |
76 |
Correct |
825 ms |
72772 KB |
Output is correct |
77 |
Correct |
19 ms |
20308 KB |
Output is correct |
78 |
Correct |
27 ms |
21324 KB |
Output is correct |
79 |
Correct |
360 ms |
44592 KB |
Output is correct |
80 |
Correct |
633 ms |
58096 KB |
Output is correct |
81 |
Correct |
984 ms |
69980 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
19104 KB |
Output is correct |
2 |
Correct |
10 ms |
19100 KB |
Output is correct |
3 |
Correct |
10 ms |
19104 KB |
Output is correct |
4 |
Correct |
10 ms |
19020 KB |
Output is correct |
5 |
Correct |
10 ms |
18984 KB |
Output is correct |
6 |
Correct |
12 ms |
19076 KB |
Output is correct |
7 |
Correct |
10 ms |
19028 KB |
Output is correct |
8 |
Correct |
10 ms |
19028 KB |
Output is correct |
9 |
Correct |
361 ms |
48148 KB |
Output is correct |
10 |
Correct |
26 ms |
22096 KB |
Output is correct |
11 |
Correct |
114 ms |
34732 KB |
Output is correct |
12 |
Correct |
35 ms |
23460 KB |
Output is correct |
13 |
Correct |
80 ms |
31036 KB |
Output is correct |
14 |
Correct |
12 ms |
19284 KB |
Output is correct |
15 |
Correct |
14 ms |
19604 KB |
Output is correct |
16 |
Correct |
347 ms |
48180 KB |
Output is correct |
17 |
Correct |
10 ms |
19028 KB |
Output is correct |
18 |
Correct |
12 ms |
19100 KB |
Output is correct |
19 |
Correct |
12 ms |
19104 KB |
Output is correct |
20 |
Correct |
401 ms |
68240 KB |
Output is correct |
21 |
Correct |
434 ms |
68068 KB |
Output is correct |
22 |
Correct |
441 ms |
68092 KB |
Output is correct |
23 |
Correct |
463 ms |
69044 KB |
Output is correct |
24 |
Correct |
432 ms |
51264 KB |
Output is correct |
25 |
Correct |
675 ms |
63068 KB |
Output is correct |
26 |
Correct |
630 ms |
63028 KB |
Output is correct |
27 |
Correct |
710 ms |
67880 KB |
Output is correct |
28 |
Correct |
710 ms |
67844 KB |
Output is correct |
29 |
Correct |
730 ms |
67892 KB |
Output is correct |
30 |
Correct |
767 ms |
67804 KB |
Output is correct |
31 |
Correct |
10 ms |
19032 KB |
Output is correct |
32 |
Correct |
37 ms |
22692 KB |
Output is correct |
33 |
Correct |
99 ms |
35240 KB |
Output is correct |
34 |
Correct |
432 ms |
68252 KB |
Output is correct |
35 |
Correct |
25 ms |
21328 KB |
Output is correct |
36 |
Correct |
133 ms |
29456 KB |
Output is correct |
37 |
Correct |
238 ms |
39684 KB |
Output is correct |
38 |
Correct |
211 ms |
37948 KB |
Output is correct |
39 |
Correct |
358 ms |
44364 KB |
Output is correct |
40 |
Correct |
494 ms |
52332 KB |
Output is correct |
41 |
Correct |
599 ms |
58900 KB |
Output is correct |
42 |
Correct |
720 ms |
65236 KB |
Output is correct |
43 |
Correct |
10 ms |
19028 KB |
Output is correct |
44 |
Correct |
10 ms |
19028 KB |
Output is correct |
45 |
Correct |
10 ms |
18984 KB |
Output is correct |
46 |
Correct |
11 ms |
19104 KB |
Output is correct |
47 |
Correct |
10 ms |
19156 KB |
Output is correct |
48 |
Correct |
10 ms |
19028 KB |
Output is correct |
49 |
Correct |
10 ms |
19028 KB |
Output is correct |
50 |
Correct |
10 ms |
19100 KB |
Output is correct |
51 |
Correct |
11 ms |
19120 KB |
Output is correct |
52 |
Correct |
10 ms |
19028 KB |
Output is correct |
53 |
Correct |
10 ms |
19092 KB |
Output is correct |
54 |
Correct |
14 ms |
19484 KB |
Output is correct |
55 |
Correct |
15 ms |
19828 KB |
Output is correct |
56 |
Correct |
354 ms |
45208 KB |
Output is correct |
57 |
Correct |
601 ms |
57924 KB |
Output is correct |
58 |
Correct |
591 ms |
57860 KB |
Output is correct |
59 |
Correct |
10 ms |
19028 KB |
Output is correct |
60 |
Correct |
11 ms |
19020 KB |
Output is correct |
61 |
Correct |
10 ms |
19028 KB |
Output is correct |
62 |
Correct |
886 ms |
72544 KB |
Output is correct |
63 |
Correct |
856 ms |
72880 KB |
Output is correct |
64 |
Correct |
834 ms |
72400 KB |
Output is correct |
65 |
Correct |
17 ms |
20012 KB |
Output is correct |
66 |
Correct |
25 ms |
20908 KB |
Output is correct |
67 |
Correct |
347 ms |
44100 KB |
Output is correct |
68 |
Correct |
606 ms |
57524 KB |
Output is correct |
69 |
Correct |
910 ms |
69296 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
19104 KB |
Output is correct |
2 |
Correct |
10 ms |
19100 KB |
Output is correct |
3 |
Correct |
10 ms |
19104 KB |
Output is correct |
4 |
Correct |
10 ms |
19020 KB |
Output is correct |
5 |
Correct |
10 ms |
18984 KB |
Output is correct |
6 |
Correct |
12 ms |
19076 KB |
Output is correct |
7 |
Correct |
10 ms |
19028 KB |
Output is correct |
8 |
Correct |
10 ms |
19028 KB |
Output is correct |
9 |
Correct |
361 ms |
48148 KB |
Output is correct |
10 |
Correct |
26 ms |
22096 KB |
Output is correct |
11 |
Correct |
114 ms |
34732 KB |
Output is correct |
12 |
Correct |
35 ms |
23460 KB |
Output is correct |
13 |
Correct |
80 ms |
31036 KB |
Output is correct |
14 |
Correct |
12 ms |
19284 KB |
Output is correct |
15 |
Correct |
14 ms |
19604 KB |
Output is correct |
16 |
Correct |
347 ms |
48180 KB |
Output is correct |
17 |
Correct |
634 ms |
77484 KB |
Output is correct |
18 |
Correct |
627 ms |
77380 KB |
Output is correct |
19 |
Correct |
456 ms |
68068 KB |
Output is correct |
20 |
Correct |
708 ms |
65932 KB |
Output is correct |
21 |
Correct |
658 ms |
66456 KB |
Output is correct |
22 |
Correct |
10 ms |
19028 KB |
Output is correct |
23 |
Correct |
70 ms |
26904 KB |
Output is correct |
24 |
Correct |
42 ms |
23436 KB |
Output is correct |
25 |
Correct |
172 ms |
34496 KB |
Output is correct |
26 |
Correct |
315 ms |
44252 KB |
Output is correct |
27 |
Correct |
307 ms |
42776 KB |
Output is correct |
28 |
Correct |
408 ms |
48184 KB |
Output is correct |
29 |
Correct |
521 ms |
55224 KB |
Output is correct |
30 |
Correct |
616 ms |
60780 KB |
Output is correct |
31 |
Correct |
736 ms |
66124 KB |
Output is correct |
32 |
Correct |
878 ms |
71336 KB |
Output is correct |
33 |
Correct |
847 ms |
72788 KB |
Output is correct |
34 |
Correct |
19 ms |
20308 KB |
Output is correct |
35 |
Correct |
27 ms |
21192 KB |
Output is correct |
36 |
Correct |
365 ms |
44444 KB |
Output is correct |
37 |
Correct |
627 ms |
58132 KB |
Output is correct |
38 |
Correct |
902 ms |
70076 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
19104 KB |
Output is correct |
2 |
Correct |
10 ms |
19100 KB |
Output is correct |
3 |
Correct |
10 ms |
19104 KB |
Output is correct |
4 |
Correct |
10 ms |
19020 KB |
Output is correct |
5 |
Correct |
10 ms |
18984 KB |
Output is correct |
6 |
Correct |
12 ms |
19076 KB |
Output is correct |
7 |
Correct |
10 ms |
19028 KB |
Output is correct |
8 |
Correct |
10 ms |
19028 KB |
Output is correct |
9 |
Correct |
361 ms |
48148 KB |
Output is correct |
10 |
Correct |
26 ms |
22096 KB |
Output is correct |
11 |
Correct |
114 ms |
34732 KB |
Output is correct |
12 |
Correct |
35 ms |
23460 KB |
Output is correct |
13 |
Correct |
80 ms |
31036 KB |
Output is correct |
14 |
Correct |
12 ms |
19284 KB |
Output is correct |
15 |
Correct |
14 ms |
19604 KB |
Output is correct |
16 |
Correct |
347 ms |
48180 KB |
Output is correct |
17 |
Correct |
13 ms |
19028 KB |
Output is correct |
18 |
Correct |
10 ms |
19104 KB |
Output is correct |
19 |
Correct |
10 ms |
19028 KB |
Output is correct |
20 |
Correct |
10 ms |
19096 KB |
Output is correct |
21 |
Correct |
10 ms |
19044 KB |
Output is correct |
22 |
Correct |
10 ms |
19104 KB |
Output is correct |
23 |
Correct |
982 ms |
76260 KB |
Output is correct |
24 |
Correct |
11 ms |
19028 KB |
Output is correct |
25 |
Correct |
13 ms |
19364 KB |
Output is correct |
26 |
Correct |
18 ms |
19924 KB |
Output is correct |
27 |
Correct |
18 ms |
20060 KB |
Output is correct |
28 |
Correct |
286 ms |
42300 KB |
Output is correct |
29 |
Correct |
547 ms |
53228 KB |
Output is correct |
30 |
Correct |
723 ms |
65536 KB |
Output is correct |
31 |
Correct |
978 ms |
76148 KB |
Output is correct |
32 |
Correct |
10 ms |
19028 KB |
Output is correct |
33 |
Correct |
10 ms |
19028 KB |
Output is correct |
34 |
Correct |
10 ms |
19028 KB |
Output is correct |
35 |
Correct |
11 ms |
19036 KB |
Output is correct |
36 |
Correct |
10 ms |
19028 KB |
Output is correct |
37 |
Correct |
11 ms |
19100 KB |
Output is correct |
38 |
Correct |
10 ms |
19028 KB |
Output is correct |
39 |
Correct |
10 ms |
19044 KB |
Output is correct |
40 |
Correct |
10 ms |
19100 KB |
Output is correct |
41 |
Correct |
10 ms |
19100 KB |
Output is correct |
42 |
Correct |
11 ms |
19032 KB |
Output is correct |
43 |
Correct |
14 ms |
19500 KB |
Output is correct |
44 |
Correct |
17 ms |
19796 KB |
Output is correct |
45 |
Correct |
409 ms |
45248 KB |
Output is correct |
46 |
Correct |
638 ms |
57808 KB |
Output is correct |
47 |
Correct |
613 ms |
58012 KB |
Output is correct |
48 |
Correct |
13 ms |
19028 KB |
Output is correct |
49 |
Correct |
12 ms |
19100 KB |
Output is correct |
50 |
Correct |
12 ms |
19108 KB |
Output is correct |
51 |
Correct |
11 ms |
19028 KB |
Output is correct |
52 |
Correct |
13 ms |
19012 KB |
Output is correct |
53 |
Correct |
10 ms |
19028 KB |
Output is correct |
54 |
Correct |
11 ms |
19008 KB |
Output is correct |
55 |
Correct |
999 ms |
75516 KB |
Output is correct |
56 |
Correct |
11 ms |
19028 KB |
Output is correct |
57 |
Correct |
14 ms |
19628 KB |
Output is correct |
58 |
Correct |
26 ms |
20716 KB |
Output is correct |
59 |
Correct |
31 ms |
21688 KB |
Output is correct |
60 |
Correct |
397 ms |
47372 KB |
Output is correct |
61 |
Correct |
601 ms |
58208 KB |
Output is correct |
62 |
Correct |
782 ms |
66144 KB |
Output is correct |
63 |
Correct |
1041 ms |
75468 KB |
Output is correct |
64 |
Correct |
10 ms |
19028 KB |
Output is correct |
65 |
Correct |
11 ms |
19028 KB |
Output is correct |
66 |
Correct |
11 ms |
19168 KB |
Output is correct |
67 |
Correct |
849 ms |
72612 KB |
Output is correct |
68 |
Correct |
824 ms |
72800 KB |
Output is correct |
69 |
Correct |
838 ms |
72404 KB |
Output is correct |
70 |
Correct |
16 ms |
19924 KB |
Output is correct |
71 |
Correct |
25 ms |
20948 KB |
Output is correct |
72 |
Correct |
365 ms |
44240 KB |
Output is correct |
73 |
Correct |
601 ms |
57532 KB |
Output is correct |
74 |
Correct |
914 ms |
69308 KB |
Output is correct |
75 |
Correct |
891 ms |
71428 KB |
Output is correct |
76 |
Correct |
825 ms |
72772 KB |
Output is correct |
77 |
Correct |
19 ms |
20308 KB |
Output is correct |
78 |
Correct |
27 ms |
21324 KB |
Output is correct |
79 |
Correct |
360 ms |
44592 KB |
Output is correct |
80 |
Correct |
633 ms |
58096 KB |
Output is correct |
81 |
Correct |
984 ms |
69980 KB |
Output is correct |
82 |
Correct |
10 ms |
19028 KB |
Output is correct |
83 |
Correct |
12 ms |
19100 KB |
Output is correct |
84 |
Correct |
12 ms |
19104 KB |
Output is correct |
85 |
Correct |
401 ms |
68240 KB |
Output is correct |
86 |
Correct |
434 ms |
68068 KB |
Output is correct |
87 |
Correct |
441 ms |
68092 KB |
Output is correct |
88 |
Correct |
463 ms |
69044 KB |
Output is correct |
89 |
Correct |
432 ms |
51264 KB |
Output is correct |
90 |
Correct |
675 ms |
63068 KB |
Output is correct |
91 |
Correct |
630 ms |
63028 KB |
Output is correct |
92 |
Correct |
710 ms |
67880 KB |
Output is correct |
93 |
Correct |
710 ms |
67844 KB |
Output is correct |
94 |
Correct |
730 ms |
67892 KB |
Output is correct |
95 |
Correct |
767 ms |
67804 KB |
Output is correct |
96 |
Correct |
10 ms |
19032 KB |
Output is correct |
97 |
Correct |
37 ms |
22692 KB |
Output is correct |
98 |
Correct |
99 ms |
35240 KB |
Output is correct |
99 |
Correct |
432 ms |
68252 KB |
Output is correct |
100 |
Correct |
25 ms |
21328 KB |
Output is correct |
101 |
Correct |
133 ms |
29456 KB |
Output is correct |
102 |
Correct |
238 ms |
39684 KB |
Output is correct |
103 |
Correct |
211 ms |
37948 KB |
Output is correct |
104 |
Correct |
358 ms |
44364 KB |
Output is correct |
105 |
Correct |
494 ms |
52332 KB |
Output is correct |
106 |
Correct |
599 ms |
58900 KB |
Output is correct |
107 |
Correct |
720 ms |
65236 KB |
Output is correct |
108 |
Correct |
10 ms |
19028 KB |
Output is correct |
109 |
Correct |
10 ms |
19028 KB |
Output is correct |
110 |
Correct |
10 ms |
18984 KB |
Output is correct |
111 |
Correct |
11 ms |
19104 KB |
Output is correct |
112 |
Correct |
10 ms |
19156 KB |
Output is correct |
113 |
Correct |
10 ms |
19028 KB |
Output is correct |
114 |
Correct |
10 ms |
19028 KB |
Output is correct |
115 |
Correct |
10 ms |
19100 KB |
Output is correct |
116 |
Correct |
11 ms |
19120 KB |
Output is correct |
117 |
Correct |
10 ms |
19028 KB |
Output is correct |
118 |
Correct |
10 ms |
19092 KB |
Output is correct |
119 |
Correct |
14 ms |
19484 KB |
Output is correct |
120 |
Correct |
15 ms |
19828 KB |
Output is correct |
121 |
Correct |
354 ms |
45208 KB |
Output is correct |
122 |
Correct |
601 ms |
57924 KB |
Output is correct |
123 |
Correct |
591 ms |
57860 KB |
Output is correct |
124 |
Correct |
10 ms |
19028 KB |
Output is correct |
125 |
Correct |
11 ms |
19020 KB |
Output is correct |
126 |
Correct |
10 ms |
19028 KB |
Output is correct |
127 |
Correct |
886 ms |
72544 KB |
Output is correct |
128 |
Correct |
856 ms |
72880 KB |
Output is correct |
129 |
Correct |
834 ms |
72400 KB |
Output is correct |
130 |
Correct |
17 ms |
20012 KB |
Output is correct |
131 |
Correct |
25 ms |
20908 KB |
Output is correct |
132 |
Correct |
347 ms |
44100 KB |
Output is correct |
133 |
Correct |
606 ms |
57524 KB |
Output is correct |
134 |
Correct |
910 ms |
69296 KB |
Output is correct |
135 |
Correct |
634 ms |
77484 KB |
Output is correct |
136 |
Correct |
627 ms |
77380 KB |
Output is correct |
137 |
Correct |
456 ms |
68068 KB |
Output is correct |
138 |
Correct |
708 ms |
65932 KB |
Output is correct |
139 |
Correct |
658 ms |
66456 KB |
Output is correct |
140 |
Correct |
10 ms |
19028 KB |
Output is correct |
141 |
Correct |
70 ms |
26904 KB |
Output is correct |
142 |
Correct |
42 ms |
23436 KB |
Output is correct |
143 |
Correct |
172 ms |
34496 KB |
Output is correct |
144 |
Correct |
315 ms |
44252 KB |
Output is correct |
145 |
Correct |
307 ms |
42776 KB |
Output is correct |
146 |
Correct |
408 ms |
48184 KB |
Output is correct |
147 |
Correct |
521 ms |
55224 KB |
Output is correct |
148 |
Correct |
616 ms |
60780 KB |
Output is correct |
149 |
Correct |
736 ms |
66124 KB |
Output is correct |
150 |
Correct |
878 ms |
71336 KB |
Output is correct |
151 |
Correct |
847 ms |
72788 KB |
Output is correct |
152 |
Correct |
19 ms |
20308 KB |
Output is correct |
153 |
Correct |
27 ms |
21192 KB |
Output is correct |
154 |
Correct |
365 ms |
44444 KB |
Output is correct |
155 |
Correct |
627 ms |
58132 KB |
Output is correct |
156 |
Correct |
902 ms |
70076 KB |
Output is correct |
157 |
Correct |
9 ms |
19028 KB |
Output is correct |
158 |
Correct |
10 ms |
19028 KB |
Output is correct |
159 |
Correct |
10 ms |
19064 KB |
Output is correct |
160 |
Correct |
10 ms |
19084 KB |
Output is correct |
161 |
Correct |
828 ms |
74116 KB |
Output is correct |
162 |
Correct |
396 ms |
68340 KB |
Output is correct |
163 |
Correct |
436 ms |
70120 KB |
Output is correct |
164 |
Correct |
422 ms |
69908 KB |
Output is correct |
165 |
Correct |
512 ms |
72668 KB |
Output is correct |
166 |
Correct |
621 ms |
73800 KB |
Output is correct |
167 |
Correct |
129 ms |
31676 KB |
Output is correct |
168 |
Correct |
65 ms |
26672 KB |
Output is correct |
169 |
Correct |
206 ms |
39416 KB |
Output is correct |
170 |
Correct |
472 ms |
57512 KB |
Output is correct |
171 |
Correct |
652 ms |
68888 KB |
Output is correct |
172 |
Correct |
335 ms |
46524 KB |
Output is correct |
173 |
Correct |
436 ms |
51724 KB |
Output is correct |
174 |
Correct |
573 ms |
58268 KB |
Output is correct |
175 |
Correct |
636 ms |
63444 KB |
Output is correct |
176 |
Correct |
729 ms |
68520 KB |
Output is correct |
177 |
Correct |
817 ms |
73864 KB |
Output is correct |