#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;
int mrk[N];
map <int, int> mp[N];
map <int, int> mp1[N];
pair<int, int> coord[N];
set <pair<int, pair<int, int> > > ms;
void Rec(int x)
{
int rn = rand() % 4;
for (int i = 0; i < 4; i++)
{
int x1 = coord[x].f + step[(i + rn) % 4][0];
int y1 = coord[x].s + step[(i + rn) % 4][1];
if (mp[x1][y1] != 0)
{
int nm = mp[x1][y1] - 1;
if (!mrk[nm])
{
ans.pb({x, nm});
mrk[nm] = 1;
Rec(nm);
}
}
}
}
//
//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 construct_roads (vector<int> x, vector<int> y) {
srand(time(NULL));
for (int i = 0; i < N; i++)
{
mrk[i] = 0;
mp[i].clear();
mp1[i].clear();
}
ans.clear();
std::vector<int> u, v, a, b;
int n = x.size();
for (int i = 0; i < n; i++) coord[i] = {x[i], y[i]};
for (int i = 0; i < n; i++) mp[x[i]][y[i]] = i + 1;
mrk[0] = 1;
Rec(0);
if (ans.size() != n - 1) return 0;
a.resize(n - 1);
b.resize(n - 1);
u.resize(n - 1);
v.resize(n - 1);
for (int i = 0; i < N; i++) mp[i].clear();
for (int i = 0; i < n - 1; i++)
{
int x1 = (x[ans[i].f] + x[ans[i].s]) / 2;
int y1 = (y[ans[i].f] + y[ans[i].s]) / 2;
for (int j = 0; j < 4; j++)
{
int x2 = x1 + step[j][0] / 2;
int y2 = y1 + step[j][1] / 2;
if ((x2 & 1) && (y2 & 1))
{
if (mp[x2][y2] != 0)
{
ms.erase({mp[x2][y2], {x2, y2}});
}
mp[x2][y2]++;
ms.insert({mp[x2][y2], {x2, y2}});
}
}
mp1[x1][y1] = i + 1;
}
while (!ms.empty())
{
pair<int, pair<int, int> > c = *ms.begin();
ms.erase(ms.begin());
if (c.f == 0) continue;
int x1 = c.s.f, y1 = c.s.s;
mp[x1][y1] = 0;
for (int i = 0; i < 4; i++)
{
int x2 = x1 + step[i][0] / 2;
int y2 = y1 + step[i][1] / 2;
if (mp1[x2][y2] != 0)
{
int nom = mp1[x2][y2] - 1;
a[nom] = x1;
b[nom] = y1;
mp1[x2][y2] = 0;
int x3 = x2 + step[i][0] / 2;
int y3 = y2 + step[i][1] / 2;
if (mp[x3][y3] != 0)
{
ms.erase({mp[x3][y3], {x3, y3}});
mp[x3][y3]--;
ms.insert({mp[x3][y3], {x3, y3}});
}
break;
}
}
}
for (int i = 0; i < n - 1; i++)
if (a[i] == 0) return construct_roads(x, y);
for (int i = 0; i < n - 1; i++)
{
u[i] = ans[i].f;
v[i] = ans[i].s;
}
build(u, v, a, b);
return 1;
}
//
//int main()
//{
// srand(time(NULL));
// int n;
// cin >> n;
// vector <int> x(n), y(n);
// for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
// construct_roads(x, y);
//}
/*
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:70:20: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
70 | if (ans.size() != n - 1) return 0;
| ~~~~~~~~~~~^~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
14 ms |
19872 KB |
Output is correct |
2 |
Correct |
13 ms |
19884 KB |
Output is correct |
3 |
Correct |
13 ms |
19872 KB |
Output is correct |
4 |
Correct |
13 ms |
19764 KB |
Output is correct |
5 |
Correct |
14 ms |
19788 KB |
Output is correct |
6 |
Correct |
14 ms |
19796 KB |
Output is correct |
7 |
Correct |
15 ms |
19836 KB |
Output is correct |
8 |
Correct |
13 ms |
19796 KB |
Output is correct |
9 |
Correct |
447 ms |
67488 KB |
Output is correct |
10 |
Correct |
54 ms |
24784 KB |
Output is correct |
11 |
Correct |
260 ms |
46336 KB |
Output is correct |
12 |
Correct |
61 ms |
27412 KB |
Output is correct |
13 |
Correct |
49 ms |
30220 KB |
Output is correct |
14 |
Correct |
16 ms |
20052 KB |
Output is correct |
15 |
Correct |
14 ms |
20144 KB |
Output is correct |
16 |
Correct |
446 ms |
62420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
14 ms |
19872 KB |
Output is correct |
2 |
Correct |
13 ms |
19884 KB |
Output is correct |
3 |
Correct |
13 ms |
19872 KB |
Output is correct |
4 |
Correct |
13 ms |
19764 KB |
Output is correct |
5 |
Correct |
14 ms |
19788 KB |
Output is correct |
6 |
Correct |
14 ms |
19796 KB |
Output is correct |
7 |
Correct |
15 ms |
19836 KB |
Output is correct |
8 |
Correct |
13 ms |
19796 KB |
Output is correct |
9 |
Correct |
447 ms |
67488 KB |
Output is correct |
10 |
Correct |
54 ms |
24784 KB |
Output is correct |
11 |
Correct |
260 ms |
46336 KB |
Output is correct |
12 |
Correct |
61 ms |
27412 KB |
Output is correct |
13 |
Correct |
49 ms |
30220 KB |
Output is correct |
14 |
Correct |
16 ms |
20052 KB |
Output is correct |
15 |
Correct |
14 ms |
20144 KB |
Output is correct |
16 |
Correct |
446 ms |
62420 KB |
Output is correct |
17 |
Correct |
16 ms |
19796 KB |
Output is correct |
18 |
Correct |
15 ms |
19796 KB |
Output is correct |
19 |
Correct |
14 ms |
19780 KB |
Output is correct |
20 |
Correct |
14 ms |
19796 KB |
Output is correct |
21 |
Correct |
13 ms |
19800 KB |
Output is correct |
22 |
Correct |
14 ms |
19796 KB |
Output is correct |
23 |
Correct |
990 ms |
92764 KB |
Output is correct |
24 |
Correct |
13 ms |
19796 KB |
Output is correct |
25 |
Correct |
18 ms |
20340 KB |
Output is correct |
26 |
Correct |
16 ms |
20208 KB |
Output is correct |
27 |
Correct |
15 ms |
20180 KB |
Output is correct |
28 |
Correct |
406 ms |
49776 KB |
Output is correct |
29 |
Correct |
519 ms |
63048 KB |
Output is correct |
30 |
Correct |
753 ms |
79536 KB |
Output is correct |
31 |
Correct |
976 ms |
90844 KB |
Output is correct |
32 |
Correct |
15 ms |
19864 KB |
Output is correct |
33 |
Correct |
15 ms |
19796 KB |
Output is correct |
34 |
Correct |
15 ms |
19796 KB |
Output is correct |
35 |
Correct |
11 ms |
19828 KB |
Output is correct |
36 |
Correct |
12 ms |
19876 KB |
Output is correct |
37 |
Correct |
13 ms |
19796 KB |
Output is correct |
38 |
Correct |
15 ms |
19924 KB |
Output is correct |
39 |
Correct |
14 ms |
19796 KB |
Output is correct |
40 |
Correct |
13 ms |
19796 KB |
Output is correct |
41 |
Correct |
12 ms |
19796 KB |
Output is correct |
42 |
Correct |
13 ms |
19812 KB |
Output is correct |
43 |
Correct |
13 ms |
20108 KB |
Output is correct |
44 |
Correct |
15 ms |
20136 KB |
Output is correct |
45 |
Correct |
472 ms |
57068 KB |
Output is correct |
46 |
Correct |
725 ms |
74372 KB |
Output is correct |
47 |
Correct |
683 ms |
73544 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
14 ms |
19872 KB |
Output is correct |
2 |
Correct |
13 ms |
19884 KB |
Output is correct |
3 |
Correct |
13 ms |
19872 KB |
Output is correct |
4 |
Correct |
13 ms |
19764 KB |
Output is correct |
5 |
Correct |
14 ms |
19788 KB |
Output is correct |
6 |
Correct |
14 ms |
19796 KB |
Output is correct |
7 |
Correct |
15 ms |
19836 KB |
Output is correct |
8 |
Correct |
13 ms |
19796 KB |
Output is correct |
9 |
Correct |
447 ms |
67488 KB |
Output is correct |
10 |
Correct |
54 ms |
24784 KB |
Output is correct |
11 |
Correct |
260 ms |
46336 KB |
Output is correct |
12 |
Correct |
61 ms |
27412 KB |
Output is correct |
13 |
Correct |
49 ms |
30220 KB |
Output is correct |
14 |
Correct |
16 ms |
20052 KB |
Output is correct |
15 |
Correct |
14 ms |
20144 KB |
Output is correct |
16 |
Correct |
446 ms |
62420 KB |
Output is correct |
17 |
Correct |
16 ms |
19796 KB |
Output is correct |
18 |
Correct |
15 ms |
19796 KB |
Output is correct |
19 |
Correct |
14 ms |
19780 KB |
Output is correct |
20 |
Correct |
14 ms |
19796 KB |
Output is correct |
21 |
Correct |
13 ms |
19800 KB |
Output is correct |
22 |
Correct |
14 ms |
19796 KB |
Output is correct |
23 |
Correct |
990 ms |
92764 KB |
Output is correct |
24 |
Correct |
13 ms |
19796 KB |
Output is correct |
25 |
Correct |
18 ms |
20340 KB |
Output is correct |
26 |
Correct |
16 ms |
20208 KB |
Output is correct |
27 |
Correct |
15 ms |
20180 KB |
Output is correct |
28 |
Correct |
406 ms |
49776 KB |
Output is correct |
29 |
Correct |
519 ms |
63048 KB |
Output is correct |
30 |
Correct |
753 ms |
79536 KB |
Output is correct |
31 |
Correct |
976 ms |
90844 KB |
Output is correct |
32 |
Correct |
15 ms |
19864 KB |
Output is correct |
33 |
Correct |
15 ms |
19796 KB |
Output is correct |
34 |
Correct |
15 ms |
19796 KB |
Output is correct |
35 |
Correct |
11 ms |
19828 KB |
Output is correct |
36 |
Correct |
12 ms |
19876 KB |
Output is correct |
37 |
Correct |
13 ms |
19796 KB |
Output is correct |
38 |
Correct |
15 ms |
19924 KB |
Output is correct |
39 |
Correct |
14 ms |
19796 KB |
Output is correct |
40 |
Correct |
13 ms |
19796 KB |
Output is correct |
41 |
Correct |
12 ms |
19796 KB |
Output is correct |
42 |
Correct |
13 ms |
19812 KB |
Output is correct |
43 |
Correct |
13 ms |
20108 KB |
Output is correct |
44 |
Correct |
15 ms |
20136 KB |
Output is correct |
45 |
Correct |
472 ms |
57068 KB |
Output is correct |
46 |
Correct |
725 ms |
74372 KB |
Output is correct |
47 |
Correct |
683 ms |
73544 KB |
Output is correct |
48 |
Correct |
16 ms |
19796 KB |
Output is correct |
49 |
Correct |
13 ms |
19780 KB |
Output is correct |
50 |
Correct |
15 ms |
19796 KB |
Output is correct |
51 |
Correct |
13 ms |
19796 KB |
Output is correct |
52 |
Correct |
14 ms |
19796 KB |
Output is correct |
53 |
Correct |
15 ms |
19788 KB |
Output is correct |
54 |
Correct |
13 ms |
19796 KB |
Output is correct |
55 |
Correct |
1006 ms |
84788 KB |
Output is correct |
56 |
Correct |
13 ms |
19796 KB |
Output is correct |
57 |
Correct |
21 ms |
20400 KB |
Output is correct |
58 |
Correct |
39 ms |
22012 KB |
Output is correct |
59 |
Correct |
20 ms |
20808 KB |
Output is correct |
60 |
Correct |
441 ms |
54988 KB |
Output is correct |
61 |
Correct |
662 ms |
65468 KB |
Output is correct |
62 |
Correct |
850 ms |
73980 KB |
Output is correct |
63 |
Correct |
1004 ms |
85924 KB |
Output is correct |
64 |
Correct |
12 ms |
19796 KB |
Output is correct |
65 |
Correct |
14 ms |
19876 KB |
Output is correct |
66 |
Correct |
13 ms |
19820 KB |
Output is correct |
67 |
Correct |
950 ms |
109676 KB |
Output is correct |
68 |
Correct |
950 ms |
110008 KB |
Output is correct |
69 |
Correct |
925 ms |
112516 KB |
Output is correct |
70 |
Correct |
16 ms |
20308 KB |
Output is correct |
71 |
Correct |
18 ms |
20672 KB |
Output is correct |
72 |
Correct |
459 ms |
52724 KB |
Output is correct |
73 |
Correct |
735 ms |
72364 KB |
Output is correct |
74 |
Correct |
1012 ms |
85972 KB |
Output is correct |
75 |
Correct |
1008 ms |
96108 KB |
Output is correct |
76 |
Correct |
965 ms |
117256 KB |
Output is correct |
77 |
Correct |
16 ms |
20596 KB |
Output is correct |
78 |
Correct |
23 ms |
21048 KB |
Output is correct |
79 |
Correct |
472 ms |
54744 KB |
Output is correct |
80 |
Correct |
724 ms |
73396 KB |
Output is correct |
81 |
Correct |
996 ms |
91896 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
14 ms |
19872 KB |
Output is correct |
2 |
Correct |
13 ms |
19884 KB |
Output is correct |
3 |
Correct |
13 ms |
19872 KB |
Output is correct |
4 |
Correct |
13 ms |
19764 KB |
Output is correct |
5 |
Correct |
14 ms |
19788 KB |
Output is correct |
6 |
Correct |
14 ms |
19796 KB |
Output is correct |
7 |
Correct |
15 ms |
19836 KB |
Output is correct |
8 |
Correct |
13 ms |
19796 KB |
Output is correct |
9 |
Correct |
447 ms |
67488 KB |
Output is correct |
10 |
Correct |
54 ms |
24784 KB |
Output is correct |
11 |
Correct |
260 ms |
46336 KB |
Output is correct |
12 |
Correct |
61 ms |
27412 KB |
Output is correct |
13 |
Correct |
49 ms |
30220 KB |
Output is correct |
14 |
Correct |
16 ms |
20052 KB |
Output is correct |
15 |
Correct |
14 ms |
20144 KB |
Output is correct |
16 |
Correct |
446 ms |
62420 KB |
Output is correct |
17 |
Correct |
13 ms |
19796 KB |
Output is correct |
18 |
Correct |
13 ms |
19880 KB |
Output is correct |
19 |
Correct |
13 ms |
19796 KB |
Output is correct |
20 |
Correct |
525 ms |
95672 KB |
Output is correct |
21 |
Correct |
483 ms |
90660 KB |
Output is correct |
22 |
Correct |
507 ms |
87848 KB |
Output is correct |
23 |
Correct |
503 ms |
95532 KB |
Output is correct |
24 |
Correct |
172 ms |
34712 KB |
Output is correct |
25 |
Correct |
113 ms |
34816 KB |
Output is correct |
26 |
Correct |
147 ms |
34780 KB |
Output is correct |
27 |
Correct |
745 ms |
92324 KB |
Output is correct |
28 |
Correct |
703 ms |
92388 KB |
Output is correct |
29 |
Correct |
851 ms |
92868 KB |
Output is correct |
30 |
Correct |
800 ms |
93112 KB |
Output is correct |
31 |
Correct |
17 ms |
19796 KB |
Output is correct |
32 |
Correct |
64 ms |
24888 KB |
Output is correct |
33 |
Correct |
61 ms |
28064 KB |
Output is correct |
34 |
Correct |
582 ms |
92384 KB |
Output is correct |
35 |
Correct |
25 ms |
20840 KB |
Output is correct |
36 |
Correct |
42 ms |
24396 KB |
Output is correct |
37 |
Correct |
76 ms |
28476 KB |
Output is correct |
38 |
Correct |
330 ms |
42808 KB |
Output is correct |
39 |
Correct |
475 ms |
51392 KB |
Output is correct |
40 |
Correct |
618 ms |
59752 KB |
Output is correct |
41 |
Correct |
814 ms |
68080 KB |
Output is correct |
42 |
Correct |
888 ms |
76328 KB |
Output is correct |
43 |
Correct |
13 ms |
19796 KB |
Output is correct |
44 |
Correct |
14 ms |
19768 KB |
Output is correct |
45 |
Correct |
14 ms |
19796 KB |
Output is correct |
46 |
Correct |
13 ms |
19852 KB |
Output is correct |
47 |
Correct |
14 ms |
19864 KB |
Output is correct |
48 |
Correct |
14 ms |
19776 KB |
Output is correct |
49 |
Correct |
14 ms |
19876 KB |
Output is correct |
50 |
Correct |
15 ms |
19796 KB |
Output is correct |
51 |
Correct |
15 ms |
19796 KB |
Output is correct |
52 |
Correct |
15 ms |
19812 KB |
Output is correct |
53 |
Correct |
14 ms |
19804 KB |
Output is correct |
54 |
Correct |
15 ms |
20148 KB |
Output is correct |
55 |
Correct |
14 ms |
20104 KB |
Output is correct |
56 |
Correct |
430 ms |
57508 KB |
Output is correct |
57 |
Correct |
652 ms |
75084 KB |
Output is correct |
58 |
Correct |
718 ms |
74328 KB |
Output is correct |
59 |
Correct |
12 ms |
19796 KB |
Output is correct |
60 |
Correct |
15 ms |
19796 KB |
Output is correct |
61 |
Correct |
13 ms |
19796 KB |
Output is correct |
62 |
Correct |
964 ms |
110568 KB |
Output is correct |
63 |
Correct |
959 ms |
111060 KB |
Output is correct |
64 |
Correct |
919 ms |
113356 KB |
Output is correct |
65 |
Correct |
16 ms |
20308 KB |
Output is correct |
66 |
Correct |
16 ms |
20692 KB |
Output is correct |
67 |
Correct |
486 ms |
53128 KB |
Output is correct |
68 |
Correct |
749 ms |
73172 KB |
Output is correct |
69 |
Correct |
1004 ms |
86800 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
14 ms |
19872 KB |
Output is correct |
2 |
Correct |
13 ms |
19884 KB |
Output is correct |
3 |
Correct |
13 ms |
19872 KB |
Output is correct |
4 |
Correct |
13 ms |
19764 KB |
Output is correct |
5 |
Correct |
14 ms |
19788 KB |
Output is correct |
6 |
Correct |
14 ms |
19796 KB |
Output is correct |
7 |
Correct |
15 ms |
19836 KB |
Output is correct |
8 |
Correct |
13 ms |
19796 KB |
Output is correct |
9 |
Correct |
447 ms |
67488 KB |
Output is correct |
10 |
Correct |
54 ms |
24784 KB |
Output is correct |
11 |
Correct |
260 ms |
46336 KB |
Output is correct |
12 |
Correct |
61 ms |
27412 KB |
Output is correct |
13 |
Correct |
49 ms |
30220 KB |
Output is correct |
14 |
Correct |
16 ms |
20052 KB |
Output is correct |
15 |
Correct |
14 ms |
20144 KB |
Output is correct |
16 |
Correct |
446 ms |
62420 KB |
Output is correct |
17 |
Correct |
748 ms |
118276 KB |
Output is correct |
18 |
Correct |
687 ms |
108396 KB |
Output is correct |
19 |
Correct |
469 ms |
98000 KB |
Output is correct |
20 |
Correct |
796 ms |
81496 KB |
Output is correct |
21 |
Correct |
744 ms |
83144 KB |
Output is correct |
22 |
Correct |
13 ms |
19796 KB |
Output is correct |
23 |
Correct |
113 ms |
29972 KB |
Output is correct |
24 |
Correct |
29 ms |
22076 KB |
Output is correct |
25 |
Correct |
62 ms |
26320 KB |
Output is correct |
26 |
Correct |
75 ms |
30452 KB |
Output is correct |
27 |
Correct |
366 ms |
51788 KB |
Output is correct |
28 |
Correct |
492 ms |
60004 KB |
Output is correct |
29 |
Correct |
656 ms |
68188 KB |
Output is correct |
30 |
Correct |
811 ms |
75520 KB |
Output is correct |
31 |
Correct |
892 ms |
83428 KB |
Output is correct |
32 |
Correct |
949 ms |
97068 KB |
Output is correct |
33 |
Correct |
984 ms |
117900 KB |
Output is correct |
34 |
Correct |
16 ms |
20564 KB |
Output is correct |
35 |
Correct |
17 ms |
20904 KB |
Output is correct |
36 |
Correct |
438 ms |
55088 KB |
Output is correct |
37 |
Correct |
757 ms |
73844 KB |
Output is correct |
38 |
Correct |
1061 ms |
92392 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
14 ms |
19872 KB |
Output is correct |
2 |
Correct |
13 ms |
19884 KB |
Output is correct |
3 |
Correct |
13 ms |
19872 KB |
Output is correct |
4 |
Correct |
13 ms |
19764 KB |
Output is correct |
5 |
Correct |
14 ms |
19788 KB |
Output is correct |
6 |
Correct |
14 ms |
19796 KB |
Output is correct |
7 |
Correct |
15 ms |
19836 KB |
Output is correct |
8 |
Correct |
13 ms |
19796 KB |
Output is correct |
9 |
Correct |
447 ms |
67488 KB |
Output is correct |
10 |
Correct |
54 ms |
24784 KB |
Output is correct |
11 |
Correct |
260 ms |
46336 KB |
Output is correct |
12 |
Correct |
61 ms |
27412 KB |
Output is correct |
13 |
Correct |
49 ms |
30220 KB |
Output is correct |
14 |
Correct |
16 ms |
20052 KB |
Output is correct |
15 |
Correct |
14 ms |
20144 KB |
Output is correct |
16 |
Correct |
446 ms |
62420 KB |
Output is correct |
17 |
Correct |
16 ms |
19796 KB |
Output is correct |
18 |
Correct |
15 ms |
19796 KB |
Output is correct |
19 |
Correct |
14 ms |
19780 KB |
Output is correct |
20 |
Correct |
14 ms |
19796 KB |
Output is correct |
21 |
Correct |
13 ms |
19800 KB |
Output is correct |
22 |
Correct |
14 ms |
19796 KB |
Output is correct |
23 |
Correct |
990 ms |
92764 KB |
Output is correct |
24 |
Correct |
13 ms |
19796 KB |
Output is correct |
25 |
Correct |
18 ms |
20340 KB |
Output is correct |
26 |
Correct |
16 ms |
20208 KB |
Output is correct |
27 |
Correct |
15 ms |
20180 KB |
Output is correct |
28 |
Correct |
406 ms |
49776 KB |
Output is correct |
29 |
Correct |
519 ms |
63048 KB |
Output is correct |
30 |
Correct |
753 ms |
79536 KB |
Output is correct |
31 |
Correct |
976 ms |
90844 KB |
Output is correct |
32 |
Correct |
15 ms |
19864 KB |
Output is correct |
33 |
Correct |
15 ms |
19796 KB |
Output is correct |
34 |
Correct |
15 ms |
19796 KB |
Output is correct |
35 |
Correct |
11 ms |
19828 KB |
Output is correct |
36 |
Correct |
12 ms |
19876 KB |
Output is correct |
37 |
Correct |
13 ms |
19796 KB |
Output is correct |
38 |
Correct |
15 ms |
19924 KB |
Output is correct |
39 |
Correct |
14 ms |
19796 KB |
Output is correct |
40 |
Correct |
13 ms |
19796 KB |
Output is correct |
41 |
Correct |
12 ms |
19796 KB |
Output is correct |
42 |
Correct |
13 ms |
19812 KB |
Output is correct |
43 |
Correct |
13 ms |
20108 KB |
Output is correct |
44 |
Correct |
15 ms |
20136 KB |
Output is correct |
45 |
Correct |
472 ms |
57068 KB |
Output is correct |
46 |
Correct |
725 ms |
74372 KB |
Output is correct |
47 |
Correct |
683 ms |
73544 KB |
Output is correct |
48 |
Correct |
16 ms |
19796 KB |
Output is correct |
49 |
Correct |
13 ms |
19780 KB |
Output is correct |
50 |
Correct |
15 ms |
19796 KB |
Output is correct |
51 |
Correct |
13 ms |
19796 KB |
Output is correct |
52 |
Correct |
14 ms |
19796 KB |
Output is correct |
53 |
Correct |
15 ms |
19788 KB |
Output is correct |
54 |
Correct |
13 ms |
19796 KB |
Output is correct |
55 |
Correct |
1006 ms |
84788 KB |
Output is correct |
56 |
Correct |
13 ms |
19796 KB |
Output is correct |
57 |
Correct |
21 ms |
20400 KB |
Output is correct |
58 |
Correct |
39 ms |
22012 KB |
Output is correct |
59 |
Correct |
20 ms |
20808 KB |
Output is correct |
60 |
Correct |
441 ms |
54988 KB |
Output is correct |
61 |
Correct |
662 ms |
65468 KB |
Output is correct |
62 |
Correct |
850 ms |
73980 KB |
Output is correct |
63 |
Correct |
1004 ms |
85924 KB |
Output is correct |
64 |
Correct |
12 ms |
19796 KB |
Output is correct |
65 |
Correct |
14 ms |
19876 KB |
Output is correct |
66 |
Correct |
13 ms |
19820 KB |
Output is correct |
67 |
Correct |
950 ms |
109676 KB |
Output is correct |
68 |
Correct |
950 ms |
110008 KB |
Output is correct |
69 |
Correct |
925 ms |
112516 KB |
Output is correct |
70 |
Correct |
16 ms |
20308 KB |
Output is correct |
71 |
Correct |
18 ms |
20672 KB |
Output is correct |
72 |
Correct |
459 ms |
52724 KB |
Output is correct |
73 |
Correct |
735 ms |
72364 KB |
Output is correct |
74 |
Correct |
1012 ms |
85972 KB |
Output is correct |
75 |
Correct |
1008 ms |
96108 KB |
Output is correct |
76 |
Correct |
965 ms |
117256 KB |
Output is correct |
77 |
Correct |
16 ms |
20596 KB |
Output is correct |
78 |
Correct |
23 ms |
21048 KB |
Output is correct |
79 |
Correct |
472 ms |
54744 KB |
Output is correct |
80 |
Correct |
724 ms |
73396 KB |
Output is correct |
81 |
Correct |
996 ms |
91896 KB |
Output is correct |
82 |
Correct |
13 ms |
19796 KB |
Output is correct |
83 |
Correct |
13 ms |
19880 KB |
Output is correct |
84 |
Correct |
13 ms |
19796 KB |
Output is correct |
85 |
Correct |
525 ms |
95672 KB |
Output is correct |
86 |
Correct |
483 ms |
90660 KB |
Output is correct |
87 |
Correct |
507 ms |
87848 KB |
Output is correct |
88 |
Correct |
503 ms |
95532 KB |
Output is correct |
89 |
Correct |
172 ms |
34712 KB |
Output is correct |
90 |
Correct |
113 ms |
34816 KB |
Output is correct |
91 |
Correct |
147 ms |
34780 KB |
Output is correct |
92 |
Correct |
745 ms |
92324 KB |
Output is correct |
93 |
Correct |
703 ms |
92388 KB |
Output is correct |
94 |
Correct |
851 ms |
92868 KB |
Output is correct |
95 |
Correct |
800 ms |
93112 KB |
Output is correct |
96 |
Correct |
17 ms |
19796 KB |
Output is correct |
97 |
Correct |
64 ms |
24888 KB |
Output is correct |
98 |
Correct |
61 ms |
28064 KB |
Output is correct |
99 |
Correct |
582 ms |
92384 KB |
Output is correct |
100 |
Correct |
25 ms |
20840 KB |
Output is correct |
101 |
Correct |
42 ms |
24396 KB |
Output is correct |
102 |
Correct |
76 ms |
28476 KB |
Output is correct |
103 |
Correct |
330 ms |
42808 KB |
Output is correct |
104 |
Correct |
475 ms |
51392 KB |
Output is correct |
105 |
Correct |
618 ms |
59752 KB |
Output is correct |
106 |
Correct |
814 ms |
68080 KB |
Output is correct |
107 |
Correct |
888 ms |
76328 KB |
Output is correct |
108 |
Correct |
13 ms |
19796 KB |
Output is correct |
109 |
Correct |
14 ms |
19768 KB |
Output is correct |
110 |
Correct |
14 ms |
19796 KB |
Output is correct |
111 |
Correct |
13 ms |
19852 KB |
Output is correct |
112 |
Correct |
14 ms |
19864 KB |
Output is correct |
113 |
Correct |
14 ms |
19776 KB |
Output is correct |
114 |
Correct |
14 ms |
19876 KB |
Output is correct |
115 |
Correct |
15 ms |
19796 KB |
Output is correct |
116 |
Correct |
15 ms |
19796 KB |
Output is correct |
117 |
Correct |
15 ms |
19812 KB |
Output is correct |
118 |
Correct |
14 ms |
19804 KB |
Output is correct |
119 |
Correct |
15 ms |
20148 KB |
Output is correct |
120 |
Correct |
14 ms |
20104 KB |
Output is correct |
121 |
Correct |
430 ms |
57508 KB |
Output is correct |
122 |
Correct |
652 ms |
75084 KB |
Output is correct |
123 |
Correct |
718 ms |
74328 KB |
Output is correct |
124 |
Correct |
12 ms |
19796 KB |
Output is correct |
125 |
Correct |
15 ms |
19796 KB |
Output is correct |
126 |
Correct |
13 ms |
19796 KB |
Output is correct |
127 |
Correct |
964 ms |
110568 KB |
Output is correct |
128 |
Correct |
959 ms |
111060 KB |
Output is correct |
129 |
Correct |
919 ms |
113356 KB |
Output is correct |
130 |
Correct |
16 ms |
20308 KB |
Output is correct |
131 |
Correct |
16 ms |
20692 KB |
Output is correct |
132 |
Correct |
486 ms |
53128 KB |
Output is correct |
133 |
Correct |
749 ms |
73172 KB |
Output is correct |
134 |
Correct |
1004 ms |
86800 KB |
Output is correct |
135 |
Correct |
748 ms |
118276 KB |
Output is correct |
136 |
Correct |
687 ms |
108396 KB |
Output is correct |
137 |
Correct |
469 ms |
98000 KB |
Output is correct |
138 |
Correct |
796 ms |
81496 KB |
Output is correct |
139 |
Correct |
744 ms |
83144 KB |
Output is correct |
140 |
Correct |
13 ms |
19796 KB |
Output is correct |
141 |
Correct |
113 ms |
29972 KB |
Output is correct |
142 |
Correct |
29 ms |
22076 KB |
Output is correct |
143 |
Correct |
62 ms |
26320 KB |
Output is correct |
144 |
Correct |
75 ms |
30452 KB |
Output is correct |
145 |
Correct |
366 ms |
51788 KB |
Output is correct |
146 |
Correct |
492 ms |
60004 KB |
Output is correct |
147 |
Correct |
656 ms |
68188 KB |
Output is correct |
148 |
Correct |
811 ms |
75520 KB |
Output is correct |
149 |
Correct |
892 ms |
83428 KB |
Output is correct |
150 |
Correct |
949 ms |
97068 KB |
Output is correct |
151 |
Correct |
984 ms |
117900 KB |
Output is correct |
152 |
Correct |
16 ms |
20564 KB |
Output is correct |
153 |
Correct |
17 ms |
20904 KB |
Output is correct |
154 |
Correct |
438 ms |
55088 KB |
Output is correct |
155 |
Correct |
757 ms |
73844 KB |
Output is correct |
156 |
Correct |
1061 ms |
92392 KB |
Output is correct |
157 |
Correct |
13 ms |
19796 KB |
Output is correct |
158 |
Correct |
12 ms |
19796 KB |
Output is correct |
159 |
Correct |
14 ms |
19796 KB |
Output is correct |
160 |
Correct |
15 ms |
19880 KB |
Output is correct |
161 |
Execution timed out |
3538 ms |
85008 KB |
Time limit exceeded |
162 |
Halted |
0 ms |
0 KB |
- |