// Be Name Khoda //
//#pragma GCC optimize ("O3")
//#pragma GCC target("avx2")
//#pragma GCC optimize("unroll-loops,O3")
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define debug(x) cerr << "(" << (#x) << "): " << (x) << endl;
#define all(x) x.begin(), x.end()
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define fi first
#define se second
#define pb push_back
#define mp make_pair
const int maxn5 = 1e6 + 10;
int n;
vector <int> ret[2], ed[2];
map <pair<int, int>, int> av, cnt, idof;
set <pair<pair<int, int>, pair<int, int>>> rem;
void dfs(int v, int x, int y){
av.erase(mp(x, y));
if(av.find(mp(x - 2, y)) != av.end()){
int u = av[mp(x - 2, y)];
dfs(u, x - 2, y);
}
if(av.find(mp(x + 2, y)) != av.end()){
int u = av[mp(x + 2, y)];
dfs(u, x + 2, y);
}
if(av.find(mp(x, y - 2)) != av.end()){
int u = av[mp(x, y - 2)];
dfs(u, x, y - 2);
}
if(av.find(mp(x, y + 2)) != av.end()){
int u = av[mp(x, y + 2)];
dfs(u, x, y + 2);
}
}
int construct_roads(std::vector<int> x, std::vector<int> y) {
n = x.size();
for(int i = 0; i < n; i++)
av[mp(x[i], y[i])] = i;
dfs(0, x[0], y[0]);
if(av.size())
return 0;
for(int i = 0; i < n; i++){
cnt[mp(x[i] - 1, y[i] - 1)]++;
cnt[mp(x[i] + 1, y[i] - 1)]++;
cnt[mp(x[i] - 1, y[i] + 1)]++;
cnt[mp(x[i] + 1, y[i] + 1)]++;
idof[mp(x[i], y[i])] = i;
}
for(auto it = cnt.begin(); it != cnt.end(); it++) if(it -> se == 4){
int x = (it -> fi).fi, y = (it -> fi).se;
x--; y--;
if(((x / 2) + (y / 2)) % 2){ // is black
rem.insert({{x, y}, {x + 2, y}});
}
else{ // is white
rem.insert({{x, y}, {x, y + 2}});
}
}
for(int i = 0; i < n; i++){
if(idof.find(mp(x[i] + 2, y[i])) != idof.end() &&
rem.find(mp(mp(x[i], y[i]), mp(x[i] + 2, y[i]))) == rem.end()){
ed[0].pb(i);
ed[1].pb(idof[mp(x[i] + 2, y[i])]);
ret[0].pb(x[i] + 1);
if(((x[i] / 2) + (y[i] / 2)) % 2)
ret[1].pb(y[i] + 1);
else
ret[1].pb(y[i] - 1);
}
if(idof.find(mp(x[i], y[i] + 2)) != idof.end() &&
rem.find(mp(mp(x[i], y[i]), mp(x[i], y[i] + 2))) == rem.end()){
ed[0].pb(i);
ed[1].pb(idof[mp(x[i], y[i] + 2)]);
ret[1].pb(y[i] + 1);
if(((x[i] / 2) + (y[i] / 2)) % 2)
ret[0].pb(x[i] - 1);
else
ret[0].pb(x[i] + 1);
}
}
build(ed[0], ed[1], ret[0], ret[1]);
return 1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
277 ms |
26480 KB |
Output is correct |
10 |
Correct |
14 ms |
3028 KB |
Output is correct |
11 |
Correct |
100 ms |
13860 KB |
Output is correct |
12 |
Correct |
22 ms |
4228 KB |
Output is correct |
13 |
Correct |
21 ms |
3780 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
345 ms |
32660 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
277 ms |
26480 KB |
Output is correct |
10 |
Correct |
14 ms |
3028 KB |
Output is correct |
11 |
Correct |
100 ms |
13860 KB |
Output is correct |
12 |
Correct |
22 ms |
4228 KB |
Output is correct |
13 |
Correct |
21 ms |
3780 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
345 ms |
32660 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
268 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
296 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
300 KB |
Output is correct |
23 |
Correct |
928 ms |
77176 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
688 KB |
Output is correct |
26 |
Correct |
2 ms |
596 KB |
Output is correct |
27 |
Correct |
2 ms |
568 KB |
Output is correct |
28 |
Correct |
240 ms |
32124 KB |
Output is correct |
29 |
Correct |
420 ms |
37972 KB |
Output is correct |
30 |
Correct |
670 ms |
52264 KB |
Output is correct |
31 |
Correct |
951 ms |
74572 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
300 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
468 KB |
Output is correct |
44 |
Correct |
1 ms |
596 KB |
Output is correct |
45 |
Correct |
311 ms |
35184 KB |
Output is correct |
46 |
Correct |
584 ms |
51432 KB |
Output is correct |
47 |
Correct |
617 ms |
50628 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
277 ms |
26480 KB |
Output is correct |
10 |
Correct |
14 ms |
3028 KB |
Output is correct |
11 |
Correct |
100 ms |
13860 KB |
Output is correct |
12 |
Correct |
22 ms |
4228 KB |
Output is correct |
13 |
Correct |
21 ms |
3780 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
345 ms |
32660 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
268 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
296 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
300 KB |
Output is correct |
23 |
Correct |
928 ms |
77176 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
688 KB |
Output is correct |
26 |
Correct |
2 ms |
596 KB |
Output is correct |
27 |
Correct |
2 ms |
568 KB |
Output is correct |
28 |
Correct |
240 ms |
32124 KB |
Output is correct |
29 |
Correct |
420 ms |
37972 KB |
Output is correct |
30 |
Correct |
670 ms |
52264 KB |
Output is correct |
31 |
Correct |
951 ms |
74572 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
300 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
468 KB |
Output is correct |
44 |
Correct |
1 ms |
596 KB |
Output is correct |
45 |
Correct |
311 ms |
35184 KB |
Output is correct |
46 |
Correct |
584 ms |
51432 KB |
Output is correct |
47 |
Correct |
617 ms |
50628 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
1 ms |
212 KB |
Output is correct |
50 |
Correct |
0 ms |
296 KB |
Output is correct |
51 |
Correct |
1 ms |
212 KB |
Output is correct |
52 |
Correct |
0 ms |
212 KB |
Output is correct |
53 |
Correct |
1 ms |
212 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
1042 ms |
72124 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
4 ms |
980 KB |
Output is correct |
58 |
Correct |
12 ms |
2668 KB |
Output is correct |
59 |
Correct |
4 ms |
1236 KB |
Output is correct |
60 |
Correct |
347 ms |
35044 KB |
Output is correct |
61 |
Correct |
537 ms |
52344 KB |
Output is correct |
62 |
Correct |
759 ms |
60668 KB |
Output is correct |
63 |
Correct |
1033 ms |
64912 KB |
Output is correct |
64 |
Correct |
0 ms |
212 KB |
Output is correct |
65 |
Correct |
1 ms |
212 KB |
Output is correct |
66 |
Correct |
1 ms |
212 KB |
Output is correct |
67 |
Correct |
827 ms |
66212 KB |
Output is correct |
68 |
Correct |
855 ms |
58544 KB |
Output is correct |
69 |
Correct |
861 ms |
61344 KB |
Output is correct |
70 |
Correct |
2 ms |
724 KB |
Output is correct |
71 |
Correct |
3 ms |
940 KB |
Output is correct |
72 |
Correct |
359 ms |
29224 KB |
Output is correct |
73 |
Correct |
581 ms |
40368 KB |
Output is correct |
74 |
Correct |
901 ms |
58472 KB |
Output is correct |
75 |
Correct |
818 ms |
59968 KB |
Output is correct |
76 |
Correct |
776 ms |
66296 KB |
Output is correct |
77 |
Correct |
3 ms |
724 KB |
Output is correct |
78 |
Correct |
4 ms |
1336 KB |
Output is correct |
79 |
Correct |
305 ms |
32600 KB |
Output is correct |
80 |
Correct |
562 ms |
49920 KB |
Output is correct |
81 |
Correct |
858 ms |
56384 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
277 ms |
26480 KB |
Output is correct |
10 |
Correct |
14 ms |
3028 KB |
Output is correct |
11 |
Correct |
100 ms |
13860 KB |
Output is correct |
12 |
Correct |
22 ms |
4228 KB |
Output is correct |
13 |
Correct |
21 ms |
3780 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
345 ms |
32660 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
803 ms |
64720 KB |
Output is correct |
21 |
Correct |
823 ms |
68144 KB |
Output is correct |
22 |
Correct |
829 ms |
64968 KB |
Output is correct |
23 |
Correct |
655 ms |
58964 KB |
Output is correct |
24 |
Correct |
90 ms |
17612 KB |
Output is correct |
25 |
Correct |
92 ms |
17612 KB |
Output is correct |
26 |
Correct |
91 ms |
17596 KB |
Output is correct |
27 |
Correct |
822 ms |
52304 KB |
Output is correct |
28 |
Correct |
748 ms |
52216 KB |
Output is correct |
29 |
Correct |
1041 ms |
52356 KB |
Output is correct |
30 |
Correct |
1034 ms |
52240 KB |
Output is correct |
31 |
Correct |
1 ms |
212 KB |
Output is correct |
32 |
Correct |
34 ms |
4896 KB |
Output is correct |
33 |
Correct |
47 ms |
9292 KB |
Output is correct |
34 |
Correct |
770 ms |
65036 KB |
Output is correct |
35 |
Correct |
6 ms |
1108 KB |
Output is correct |
36 |
Correct |
24 ms |
4812 KB |
Output is correct |
37 |
Correct |
46 ms |
9304 KB |
Output is correct |
38 |
Correct |
244 ms |
20144 KB |
Output is correct |
39 |
Correct |
395 ms |
27648 KB |
Output is correct |
40 |
Correct |
616 ms |
34812 KB |
Output is correct |
41 |
Correct |
689 ms |
42512 KB |
Output is correct |
42 |
Correct |
895 ms |
49740 KB |
Output is correct |
43 |
Correct |
1 ms |
304 KB |
Output is correct |
44 |
Correct |
1 ms |
212 KB |
Output is correct |
45 |
Correct |
0 ms |
212 KB |
Output is correct |
46 |
Correct |
0 ms |
212 KB |
Output is correct |
47 |
Correct |
0 ms |
212 KB |
Output is correct |
48 |
Correct |
1 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
212 KB |
Output is correct |
50 |
Correct |
1 ms |
340 KB |
Output is correct |
51 |
Correct |
0 ms |
296 KB |
Output is correct |
52 |
Correct |
0 ms |
296 KB |
Output is correct |
53 |
Correct |
1 ms |
212 KB |
Output is correct |
54 |
Correct |
2 ms |
468 KB |
Output is correct |
55 |
Correct |
1 ms |
604 KB |
Output is correct |
56 |
Correct |
306 ms |
35036 KB |
Output is correct |
57 |
Correct |
580 ms |
51336 KB |
Output is correct |
58 |
Correct |
577 ms |
50496 KB |
Output is correct |
59 |
Correct |
0 ms |
212 KB |
Output is correct |
60 |
Correct |
0 ms |
212 KB |
Output is correct |
61 |
Correct |
1 ms |
212 KB |
Output is correct |
62 |
Correct |
761 ms |
66292 KB |
Output is correct |
63 |
Correct |
844 ms |
58596 KB |
Output is correct |
64 |
Correct |
780 ms |
61312 KB |
Output is correct |
65 |
Correct |
2 ms |
696 KB |
Output is correct |
66 |
Correct |
3 ms |
980 KB |
Output is correct |
67 |
Correct |
352 ms |
29312 KB |
Output is correct |
68 |
Correct |
589 ms |
40340 KB |
Output is correct |
69 |
Correct |
870 ms |
58380 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
277 ms |
26480 KB |
Output is correct |
10 |
Correct |
14 ms |
3028 KB |
Output is correct |
11 |
Correct |
100 ms |
13860 KB |
Output is correct |
12 |
Correct |
22 ms |
4228 KB |
Output is correct |
13 |
Correct |
21 ms |
3780 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
345 ms |
32660 KB |
Output is correct |
17 |
Correct |
794 ms |
71768 KB |
Output is correct |
18 |
Correct |
821 ms |
71240 KB |
Output is correct |
19 |
Correct |
864 ms |
74324 KB |
Output is correct |
20 |
Correct |
899 ms |
61796 KB |
Output is correct |
21 |
Correct |
770 ms |
55068 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
80 ms |
9128 KB |
Output is correct |
24 |
Correct |
12 ms |
2564 KB |
Output is correct |
25 |
Correct |
38 ms |
7040 KB |
Output is correct |
26 |
Correct |
57 ms |
11720 KB |
Output is correct |
27 |
Correct |
328 ms |
29876 KB |
Output is correct |
28 |
Correct |
456 ms |
37668 KB |
Output is correct |
29 |
Correct |
592 ms |
45032 KB |
Output is correct |
30 |
Correct |
767 ms |
52012 KB |
Output is correct |
31 |
Correct |
937 ms |
59792 KB |
Output is correct |
32 |
Correct |
894 ms |
59896 KB |
Output is correct |
33 |
Correct |
792 ms |
66296 KB |
Output is correct |
34 |
Correct |
3 ms |
724 KB |
Output is correct |
35 |
Correct |
4 ms |
1336 KB |
Output is correct |
36 |
Correct |
334 ms |
32596 KB |
Output is correct |
37 |
Correct |
581 ms |
49888 KB |
Output is correct |
38 |
Correct |
933 ms |
56448 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
277 ms |
26480 KB |
Output is correct |
10 |
Correct |
14 ms |
3028 KB |
Output is correct |
11 |
Correct |
100 ms |
13860 KB |
Output is correct |
12 |
Correct |
22 ms |
4228 KB |
Output is correct |
13 |
Correct |
21 ms |
3780 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
345 ms |
32660 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
268 KB |
Output is correct |
19 |
Correct |
1 ms |
212 KB |
Output is correct |
20 |
Correct |
1 ms |
296 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
300 KB |
Output is correct |
23 |
Correct |
928 ms |
77176 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
688 KB |
Output is correct |
26 |
Correct |
2 ms |
596 KB |
Output is correct |
27 |
Correct |
2 ms |
568 KB |
Output is correct |
28 |
Correct |
240 ms |
32124 KB |
Output is correct |
29 |
Correct |
420 ms |
37972 KB |
Output is correct |
30 |
Correct |
670 ms |
52264 KB |
Output is correct |
31 |
Correct |
951 ms |
74572 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
300 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
468 KB |
Output is correct |
44 |
Correct |
1 ms |
596 KB |
Output is correct |
45 |
Correct |
311 ms |
35184 KB |
Output is correct |
46 |
Correct |
584 ms |
51432 KB |
Output is correct |
47 |
Correct |
617 ms |
50628 KB |
Output is correct |
48 |
Correct |
0 ms |
212 KB |
Output is correct |
49 |
Correct |
1 ms |
212 KB |
Output is correct |
50 |
Correct |
0 ms |
296 KB |
Output is correct |
51 |
Correct |
1 ms |
212 KB |
Output is correct |
52 |
Correct |
0 ms |
212 KB |
Output is correct |
53 |
Correct |
1 ms |
212 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
1042 ms |
72124 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
4 ms |
980 KB |
Output is correct |
58 |
Correct |
12 ms |
2668 KB |
Output is correct |
59 |
Correct |
4 ms |
1236 KB |
Output is correct |
60 |
Correct |
347 ms |
35044 KB |
Output is correct |
61 |
Correct |
537 ms |
52344 KB |
Output is correct |
62 |
Correct |
759 ms |
60668 KB |
Output is correct |
63 |
Correct |
1033 ms |
64912 KB |
Output is correct |
64 |
Correct |
0 ms |
212 KB |
Output is correct |
65 |
Correct |
1 ms |
212 KB |
Output is correct |
66 |
Correct |
1 ms |
212 KB |
Output is correct |
67 |
Correct |
827 ms |
66212 KB |
Output is correct |
68 |
Correct |
855 ms |
58544 KB |
Output is correct |
69 |
Correct |
861 ms |
61344 KB |
Output is correct |
70 |
Correct |
2 ms |
724 KB |
Output is correct |
71 |
Correct |
3 ms |
940 KB |
Output is correct |
72 |
Correct |
359 ms |
29224 KB |
Output is correct |
73 |
Correct |
581 ms |
40368 KB |
Output is correct |
74 |
Correct |
901 ms |
58472 KB |
Output is correct |
75 |
Correct |
818 ms |
59968 KB |
Output is correct |
76 |
Correct |
776 ms |
66296 KB |
Output is correct |
77 |
Correct |
3 ms |
724 KB |
Output is correct |
78 |
Correct |
4 ms |
1336 KB |
Output is correct |
79 |
Correct |
305 ms |
32600 KB |
Output is correct |
80 |
Correct |
562 ms |
49920 KB |
Output is correct |
81 |
Correct |
858 ms |
56384 KB |
Output is correct |
82 |
Correct |
0 ms |
212 KB |
Output is correct |
83 |
Correct |
1 ms |
212 KB |
Output is correct |
84 |
Correct |
0 ms |
212 KB |
Output is correct |
85 |
Correct |
803 ms |
64720 KB |
Output is correct |
86 |
Correct |
823 ms |
68144 KB |
Output is correct |
87 |
Correct |
829 ms |
64968 KB |
Output is correct |
88 |
Correct |
655 ms |
58964 KB |
Output is correct |
89 |
Correct |
90 ms |
17612 KB |
Output is correct |
90 |
Correct |
92 ms |
17612 KB |
Output is correct |
91 |
Correct |
91 ms |
17596 KB |
Output is correct |
92 |
Correct |
822 ms |
52304 KB |
Output is correct |
93 |
Correct |
748 ms |
52216 KB |
Output is correct |
94 |
Correct |
1041 ms |
52356 KB |
Output is correct |
95 |
Correct |
1034 ms |
52240 KB |
Output is correct |
96 |
Correct |
1 ms |
212 KB |
Output is correct |
97 |
Correct |
34 ms |
4896 KB |
Output is correct |
98 |
Correct |
47 ms |
9292 KB |
Output is correct |
99 |
Correct |
770 ms |
65036 KB |
Output is correct |
100 |
Correct |
6 ms |
1108 KB |
Output is correct |
101 |
Correct |
24 ms |
4812 KB |
Output is correct |
102 |
Correct |
46 ms |
9304 KB |
Output is correct |
103 |
Correct |
244 ms |
20144 KB |
Output is correct |
104 |
Correct |
395 ms |
27648 KB |
Output is correct |
105 |
Correct |
616 ms |
34812 KB |
Output is correct |
106 |
Correct |
689 ms |
42512 KB |
Output is correct |
107 |
Correct |
895 ms |
49740 KB |
Output is correct |
108 |
Correct |
1 ms |
304 KB |
Output is correct |
109 |
Correct |
1 ms |
212 KB |
Output is correct |
110 |
Correct |
0 ms |
212 KB |
Output is correct |
111 |
Correct |
0 ms |
212 KB |
Output is correct |
112 |
Correct |
0 ms |
212 KB |
Output is correct |
113 |
Correct |
1 ms |
212 KB |
Output is correct |
114 |
Correct |
0 ms |
212 KB |
Output is correct |
115 |
Correct |
1 ms |
340 KB |
Output is correct |
116 |
Correct |
0 ms |
296 KB |
Output is correct |
117 |
Correct |
0 ms |
296 KB |
Output is correct |
118 |
Correct |
1 ms |
212 KB |
Output is correct |
119 |
Correct |
2 ms |
468 KB |
Output is correct |
120 |
Correct |
1 ms |
604 KB |
Output is correct |
121 |
Correct |
306 ms |
35036 KB |
Output is correct |
122 |
Correct |
580 ms |
51336 KB |
Output is correct |
123 |
Correct |
577 ms |
50496 KB |
Output is correct |
124 |
Correct |
0 ms |
212 KB |
Output is correct |
125 |
Correct |
0 ms |
212 KB |
Output is correct |
126 |
Correct |
1 ms |
212 KB |
Output is correct |
127 |
Correct |
761 ms |
66292 KB |
Output is correct |
128 |
Correct |
844 ms |
58596 KB |
Output is correct |
129 |
Correct |
780 ms |
61312 KB |
Output is correct |
130 |
Correct |
2 ms |
696 KB |
Output is correct |
131 |
Correct |
3 ms |
980 KB |
Output is correct |
132 |
Correct |
352 ms |
29312 KB |
Output is correct |
133 |
Correct |
589 ms |
40340 KB |
Output is correct |
134 |
Correct |
870 ms |
58380 KB |
Output is correct |
135 |
Correct |
794 ms |
71768 KB |
Output is correct |
136 |
Correct |
821 ms |
71240 KB |
Output is correct |
137 |
Correct |
864 ms |
74324 KB |
Output is correct |
138 |
Correct |
899 ms |
61796 KB |
Output is correct |
139 |
Correct |
770 ms |
55068 KB |
Output is correct |
140 |
Correct |
0 ms |
212 KB |
Output is correct |
141 |
Correct |
80 ms |
9128 KB |
Output is correct |
142 |
Correct |
12 ms |
2564 KB |
Output is correct |
143 |
Correct |
38 ms |
7040 KB |
Output is correct |
144 |
Correct |
57 ms |
11720 KB |
Output is correct |
145 |
Correct |
328 ms |
29876 KB |
Output is correct |
146 |
Correct |
456 ms |
37668 KB |
Output is correct |
147 |
Correct |
592 ms |
45032 KB |
Output is correct |
148 |
Correct |
767 ms |
52012 KB |
Output is correct |
149 |
Correct |
937 ms |
59792 KB |
Output is correct |
150 |
Correct |
894 ms |
59896 KB |
Output is correct |
151 |
Correct |
792 ms |
66296 KB |
Output is correct |
152 |
Correct |
3 ms |
724 KB |
Output is correct |
153 |
Correct |
4 ms |
1336 KB |
Output is correct |
154 |
Correct |
334 ms |
32596 KB |
Output is correct |
155 |
Correct |
581 ms |
49888 KB |
Output is correct |
156 |
Correct |
933 ms |
56448 KB |
Output is correct |
157 |
Correct |
1 ms |
212 KB |
Output is correct |
158 |
Correct |
0 ms |
212 KB |
Output is correct |
159 |
Correct |
0 ms |
212 KB |
Output is correct |
160 |
Correct |
0 ms |
212 KB |
Output is correct |
161 |
Correct |
1091 ms |
69836 KB |
Output is correct |
162 |
Correct |
721 ms |
72440 KB |
Output is correct |
163 |
Correct |
884 ms |
60400 KB |
Output is correct |
164 |
Correct |
915 ms |
61444 KB |
Output is correct |
165 |
Correct |
967 ms |
75004 KB |
Output is correct |
166 |
Correct |
1006 ms |
78948 KB |
Output is correct |
167 |
Correct |
140 ms |
14272 KB |
Output is correct |
168 |
Correct |
17 ms |
3824 KB |
Output is correct |
169 |
Correct |
38 ms |
8328 KB |
Output is correct |
170 |
Correct |
81 ms |
14668 KB |
Output is correct |
171 |
Correct |
97 ms |
18732 KB |
Output is correct |
172 |
Correct |
402 ms |
35300 KB |
Output is correct |
173 |
Correct |
492 ms |
40360 KB |
Output is correct |
174 |
Correct |
726 ms |
45140 KB |
Output is correct |
175 |
Correct |
926 ms |
53528 KB |
Output is correct |
176 |
Correct |
996 ms |
60908 KB |
Output is correct |
177 |
Correct |
1044 ms |
63848 KB |
Output is correct |