#include "parks.h"
#include<bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define pii pair<int,int>
#define vii vector<pii>
#define fi first
#define se second
class dsu{
public:
vi ind;
vi size;
dsu(int n){
ind=vi(n);
for (int i=0;i<n;i++) ind[i]=i;
size=vi(n,1);
}
int find(int x){
if (ind[x]==x) return x;
ind[x]=find(ind[x]);
return ind[x];
}
void unite(int a, int b){
a=find(a);
b=find(b);
if (a==b) return;
if (size[a]<size[b]) swap(a,b);
size[a]+=size[b];
ind[b]=a;
}
};
int construct_roads(vi cordx, vi cordy){
int n=cordx.size();
vii v(n);
for (int i=0;i<n;i++) v[i]=pii{cordx[i],cordy[i]};
vi u; //ind fuentes
vi w;
vi a; // coord banco
vi b;
map<pii,int> indfuente;
for (int i=0;i<n;i++) indfuente[v[i]]=i+1;
set<pii> posiblesbancos;
for (pii p:v){
posiblesbancos.insert(pii{p.fi+1,p.se+1});
posiblesbancos.insert(pii{p.fi+1,p.se-1});
posiblesbancos.insert(pii{p.fi-1,p.se+1});
posiblesbancos.insert(pii{p.fi-1,p.se-1});
}
for (pii p:posiblesbancos){
if ((p.fi+p.se)%4==0){
if (indfuente[pii{p.fi+1,p.se+1}] && indfuente[pii{p.fi-1,p.se+1}]){
u.push_back(indfuente[pii{p.fi+1,p.se+1}]-1);
w.push_back(indfuente[pii{p.fi-1,p.se+1}]-1);
a.push_back(p.fi);
b.push_back(p.se);
}
else if (indfuente[pii{p.fi+1,p.se-1}] && indfuente[pii{p.fi-1,p.se-1}]){
u.push_back(indfuente[pii{p.fi+1,p.se-1}]-1);
w.push_back(indfuente[pii{p.fi-1,p.se-1}]-1);
a.push_back(p.fi);
b.push_back(p.se);
}
}
else{
if (indfuente[pii{p.fi+1,p.se+1}] && indfuente[pii{p.fi+1,p.se-1}]){
u.push_back(indfuente[pii{p.fi+1,p.se+1}]-1);
w.push_back(indfuente[pii{p.fi+1,p.se-1}]-1);
a.push_back(p.fi);
b.push_back(p.se);
}
else if (indfuente[pii{p.fi-1,p.se+1}] && indfuente[pii{p.fi-1,p.se-1}]){
u.push_back(indfuente[pii{p.fi-1,p.se+1}]-1);
w.push_back(indfuente[pii{p.fi-1,p.se-1}]-1);
a.push_back(p.fi);
b.push_back(p.se);
}
}
}
dsu comp(n);
for (int i=0;i<u.size();i++) comp.unite(u[i],w[i]);
for (int i=0;i<n;i++) if (comp.find(i)!=comp.find(0)) return 0;
build(u,w,a,b);
return 1;
}
Compilation message
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:94:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
94 | for (int i=0;i<u.size();i++) comp.unite(u[i],w[i]);
| ~^~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
312 ms |
36356 KB |
Output is correct |
10 |
Correct |
19 ms |
4052 KB |
Output is correct |
11 |
Correct |
143 ms |
19716 KB |
Output is correct |
12 |
Correct |
30 ms |
5864 KB |
Output is correct |
13 |
Correct |
94 ms |
14872 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
4 ms |
972 KB |
Output is correct |
16 |
Correct |
333 ms |
36472 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
312 ms |
36356 KB |
Output is correct |
10 |
Correct |
19 ms |
4052 KB |
Output is correct |
11 |
Correct |
143 ms |
19716 KB |
Output is correct |
12 |
Correct |
30 ms |
5864 KB |
Output is correct |
13 |
Correct |
94 ms |
14872 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
4 ms |
972 KB |
Output is correct |
16 |
Correct |
333 ms |
36472 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
0 ms |
204 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
701 ms |
55284 KB |
Output is correct |
24 |
Correct |
0 ms |
256 KB |
Output is correct |
25 |
Correct |
2 ms |
588 KB |
Output is correct |
26 |
Correct |
5 ms |
972 KB |
Output is correct |
27 |
Correct |
6 ms |
1228 KB |
Output is correct |
28 |
Correct |
212 ms |
22300 KB |
Output is correct |
29 |
Correct |
340 ms |
33192 KB |
Output is correct |
30 |
Correct |
501 ms |
44240 KB |
Output is correct |
31 |
Correct |
676 ms |
55212 KB |
Output is correct |
32 |
Correct |
0 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
204 KB |
Output is correct |
34 |
Correct |
0 ms |
204 KB |
Output is correct |
35 |
Correct |
0 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
0 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
0 ms |
204 KB |
Output is correct |
43 |
Correct |
4 ms |
832 KB |
Output is correct |
44 |
Correct |
5 ms |
1228 KB |
Output is correct |
45 |
Correct |
323 ms |
34076 KB |
Output is correct |
46 |
Correct |
535 ms |
49196 KB |
Output is correct |
47 |
Correct |
526 ms |
49204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
312 ms |
36356 KB |
Output is correct |
10 |
Correct |
19 ms |
4052 KB |
Output is correct |
11 |
Correct |
143 ms |
19716 KB |
Output is correct |
12 |
Correct |
30 ms |
5864 KB |
Output is correct |
13 |
Correct |
94 ms |
14872 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
4 ms |
972 KB |
Output is correct |
16 |
Correct |
333 ms |
36472 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
0 ms |
204 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
701 ms |
55284 KB |
Output is correct |
24 |
Correct |
0 ms |
256 KB |
Output is correct |
25 |
Correct |
2 ms |
588 KB |
Output is correct |
26 |
Correct |
5 ms |
972 KB |
Output is correct |
27 |
Correct |
6 ms |
1228 KB |
Output is correct |
28 |
Correct |
212 ms |
22300 KB |
Output is correct |
29 |
Correct |
340 ms |
33192 KB |
Output is correct |
30 |
Correct |
501 ms |
44240 KB |
Output is correct |
31 |
Correct |
676 ms |
55212 KB |
Output is correct |
32 |
Correct |
0 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
204 KB |
Output is correct |
34 |
Correct |
0 ms |
204 KB |
Output is correct |
35 |
Correct |
0 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
0 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
0 ms |
204 KB |
Output is correct |
43 |
Correct |
4 ms |
832 KB |
Output is correct |
44 |
Correct |
5 ms |
1228 KB |
Output is correct |
45 |
Correct |
323 ms |
34076 KB |
Output is correct |
46 |
Correct |
535 ms |
49196 KB |
Output is correct |
47 |
Correct |
526 ms |
49204 KB |
Output is correct |
48 |
Correct |
0 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
204 KB |
Output is correct |
50 |
Correct |
0 ms |
204 KB |
Output is correct |
51 |
Correct |
0 ms |
204 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
0 ms |
204 KB |
Output is correct |
54 |
Correct |
0 ms |
204 KB |
Output is correct |
55 |
Correct |
695 ms |
49592 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
3 ms |
716 KB |
Output is correct |
58 |
Correct |
10 ms |
1868 KB |
Output is correct |
59 |
Correct |
15 ms |
2380 KB |
Output is correct |
60 |
Correct |
261 ms |
25620 KB |
Output is correct |
61 |
Correct |
371 ms |
34436 KB |
Output is correct |
62 |
Correct |
496 ms |
42196 KB |
Output is correct |
63 |
Correct |
640 ms |
50968 KB |
Output is correct |
64 |
Correct |
0 ms |
204 KB |
Output is correct |
65 |
Correct |
0 ms |
204 KB |
Output is correct |
66 |
Correct |
0 ms |
204 KB |
Output is correct |
67 |
Correct |
772 ms |
67748 KB |
Output is correct |
68 |
Correct |
757 ms |
67732 KB |
Output is correct |
69 |
Correct |
743 ms |
67536 KB |
Output is correct |
70 |
Correct |
7 ms |
1356 KB |
Output is correct |
71 |
Correct |
18 ms |
2508 KB |
Output is correct |
72 |
Correct |
313 ms |
32532 KB |
Output is correct |
73 |
Correct |
550 ms |
48680 KB |
Output is correct |
74 |
Correct |
779 ms |
64896 KB |
Output is correct |
75 |
Correct |
720 ms |
59508 KB |
Output is correct |
76 |
Correct |
761 ms |
67732 KB |
Output is correct |
77 |
Correct |
8 ms |
1612 KB |
Output is correct |
78 |
Correct |
17 ms |
2776 KB |
Output is correct |
79 |
Correct |
294 ms |
31264 KB |
Output is correct |
80 |
Correct |
506 ms |
46980 KB |
Output is correct |
81 |
Correct |
752 ms |
62440 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
312 ms |
36356 KB |
Output is correct |
10 |
Correct |
19 ms |
4052 KB |
Output is correct |
11 |
Correct |
143 ms |
19716 KB |
Output is correct |
12 |
Correct |
30 ms |
5864 KB |
Output is correct |
13 |
Correct |
94 ms |
14872 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
4 ms |
972 KB |
Output is correct |
16 |
Correct |
333 ms |
36472 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
741 ms |
66120 KB |
Output is correct |
21 |
Correct |
760 ms |
66292 KB |
Output is correct |
22 |
Correct |
782 ms |
66296 KB |
Output is correct |
23 |
Correct |
606 ms |
61592 KB |
Output is correct |
24 |
Correct |
780 ms |
94420 KB |
Output is correct |
25 |
Correct |
638 ms |
53812 KB |
Output is correct |
26 |
Correct |
633 ms |
53876 KB |
Output is correct |
27 |
Correct |
706 ms |
59944 KB |
Output is correct |
28 |
Correct |
719 ms |
60072 KB |
Output is correct |
29 |
Correct |
704 ms |
60196 KB |
Output is correct |
30 |
Correct |
697 ms |
60004 KB |
Output is correct |
31 |
Correct |
0 ms |
204 KB |
Output is correct |
32 |
Correct |
36 ms |
4932 KB |
Output is correct |
33 |
Correct |
319 ms |
42676 KB |
Output is correct |
34 |
Correct |
671 ms |
59984 KB |
Output is correct |
35 |
Correct |
23 ms |
2720 KB |
Output is correct |
36 |
Correct |
117 ms |
12132 KB |
Output is correct |
37 |
Correct |
306 ms |
23976 KB |
Output is correct |
38 |
Correct |
216 ms |
21408 KB |
Output is correct |
39 |
Correct |
342 ms |
29312 KB |
Output is correct |
40 |
Correct |
447 ms |
37364 KB |
Output is correct |
41 |
Correct |
575 ms |
45436 KB |
Output is correct |
42 |
Correct |
757 ms |
53280 KB |
Output is correct |
43 |
Correct |
0 ms |
204 KB |
Output is correct |
44 |
Correct |
0 ms |
204 KB |
Output is correct |
45 |
Correct |
0 ms |
204 KB |
Output is correct |
46 |
Correct |
0 ms |
204 KB |
Output is correct |
47 |
Correct |
0 ms |
204 KB |
Output is correct |
48 |
Correct |
0 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
204 KB |
Output is correct |
50 |
Correct |
0 ms |
204 KB |
Output is correct |
51 |
Correct |
0 ms |
204 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
0 ms |
248 KB |
Output is correct |
54 |
Correct |
4 ms |
844 KB |
Output is correct |
55 |
Correct |
6 ms |
1228 KB |
Output is correct |
56 |
Correct |
317 ms |
34040 KB |
Output is correct |
57 |
Correct |
521 ms |
49384 KB |
Output is correct |
58 |
Correct |
532 ms |
49304 KB |
Output is correct |
59 |
Correct |
0 ms |
204 KB |
Output is correct |
60 |
Correct |
1 ms |
204 KB |
Output is correct |
61 |
Correct |
0 ms |
204 KB |
Output is correct |
62 |
Correct |
745 ms |
66164 KB |
Output is correct |
63 |
Correct |
743 ms |
66200 KB |
Output is correct |
64 |
Correct |
730 ms |
65856 KB |
Output is correct |
65 |
Correct |
8 ms |
1356 KB |
Output is correct |
66 |
Correct |
16 ms |
2620 KB |
Output is correct |
67 |
Correct |
301 ms |
31712 KB |
Output is correct |
68 |
Correct |
530 ms |
47420 KB |
Output is correct |
69 |
Correct |
741 ms |
63256 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
312 ms |
36356 KB |
Output is correct |
10 |
Correct |
19 ms |
4052 KB |
Output is correct |
11 |
Correct |
143 ms |
19716 KB |
Output is correct |
12 |
Correct |
30 ms |
5864 KB |
Output is correct |
13 |
Correct |
94 ms |
14872 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
4 ms |
972 KB |
Output is correct |
16 |
Correct |
333 ms |
36472 KB |
Output is correct |
17 |
Correct |
735 ms |
72460 KB |
Output is correct |
18 |
Correct |
737 ms |
72508 KB |
Output is correct |
19 |
Correct |
730 ms |
66184 KB |
Output is correct |
20 |
Correct |
618 ms |
47624 KB |
Output is correct |
21 |
Correct |
612 ms |
55308 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
80 ms |
9260 KB |
Output is correct |
24 |
Correct |
37 ms |
4664 KB |
Output is correct |
25 |
Correct |
166 ms |
16356 KB |
Output is correct |
26 |
Correct |
318 ms |
27928 KB |
Output is correct |
27 |
Correct |
272 ms |
26644 KB |
Output is correct |
28 |
Correct |
396 ms |
33460 KB |
Output is correct |
29 |
Correct |
466 ms |
39960 KB |
Output is correct |
30 |
Correct |
584 ms |
46380 KB |
Output is correct |
31 |
Correct |
668 ms |
53096 KB |
Output is correct |
32 |
Correct |
694 ms |
59536 KB |
Output is correct |
33 |
Correct |
735 ms |
67732 KB |
Output is correct |
34 |
Correct |
8 ms |
1612 KB |
Output is correct |
35 |
Correct |
17 ms |
2720 KB |
Output is correct |
36 |
Correct |
291 ms |
31264 KB |
Output is correct |
37 |
Correct |
496 ms |
46972 KB |
Output is correct |
38 |
Correct |
733 ms |
62376 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
312 ms |
36356 KB |
Output is correct |
10 |
Correct |
19 ms |
4052 KB |
Output is correct |
11 |
Correct |
143 ms |
19716 KB |
Output is correct |
12 |
Correct |
30 ms |
5864 KB |
Output is correct |
13 |
Correct |
94 ms |
14872 KB |
Output is correct |
14 |
Correct |
2 ms |
588 KB |
Output is correct |
15 |
Correct |
4 ms |
972 KB |
Output is correct |
16 |
Correct |
333 ms |
36472 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Correct |
0 ms |
204 KB |
Output is correct |
21 |
Correct |
0 ms |
204 KB |
Output is correct |
22 |
Correct |
0 ms |
204 KB |
Output is correct |
23 |
Correct |
701 ms |
55284 KB |
Output is correct |
24 |
Correct |
0 ms |
256 KB |
Output is correct |
25 |
Correct |
2 ms |
588 KB |
Output is correct |
26 |
Correct |
5 ms |
972 KB |
Output is correct |
27 |
Correct |
6 ms |
1228 KB |
Output is correct |
28 |
Correct |
212 ms |
22300 KB |
Output is correct |
29 |
Correct |
340 ms |
33192 KB |
Output is correct |
30 |
Correct |
501 ms |
44240 KB |
Output is correct |
31 |
Correct |
676 ms |
55212 KB |
Output is correct |
32 |
Correct |
0 ms |
204 KB |
Output is correct |
33 |
Correct |
0 ms |
204 KB |
Output is correct |
34 |
Correct |
0 ms |
204 KB |
Output is correct |
35 |
Correct |
0 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
0 ms |
204 KB |
Output is correct |
38 |
Correct |
0 ms |
204 KB |
Output is correct |
39 |
Correct |
0 ms |
204 KB |
Output is correct |
40 |
Correct |
0 ms |
204 KB |
Output is correct |
41 |
Correct |
0 ms |
204 KB |
Output is correct |
42 |
Correct |
0 ms |
204 KB |
Output is correct |
43 |
Correct |
4 ms |
832 KB |
Output is correct |
44 |
Correct |
5 ms |
1228 KB |
Output is correct |
45 |
Correct |
323 ms |
34076 KB |
Output is correct |
46 |
Correct |
535 ms |
49196 KB |
Output is correct |
47 |
Correct |
526 ms |
49204 KB |
Output is correct |
48 |
Correct |
0 ms |
204 KB |
Output is correct |
49 |
Correct |
0 ms |
204 KB |
Output is correct |
50 |
Correct |
0 ms |
204 KB |
Output is correct |
51 |
Correct |
0 ms |
204 KB |
Output is correct |
52 |
Correct |
0 ms |
204 KB |
Output is correct |
53 |
Correct |
0 ms |
204 KB |
Output is correct |
54 |
Correct |
0 ms |
204 KB |
Output is correct |
55 |
Correct |
695 ms |
49592 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
3 ms |
716 KB |
Output is correct |
58 |
Correct |
10 ms |
1868 KB |
Output is correct |
59 |
Correct |
15 ms |
2380 KB |
Output is correct |
60 |
Correct |
261 ms |
25620 KB |
Output is correct |
61 |
Correct |
371 ms |
34436 KB |
Output is correct |
62 |
Correct |
496 ms |
42196 KB |
Output is correct |
63 |
Correct |
640 ms |
50968 KB |
Output is correct |
64 |
Correct |
0 ms |
204 KB |
Output is correct |
65 |
Correct |
0 ms |
204 KB |
Output is correct |
66 |
Correct |
0 ms |
204 KB |
Output is correct |
67 |
Correct |
772 ms |
67748 KB |
Output is correct |
68 |
Correct |
757 ms |
67732 KB |
Output is correct |
69 |
Correct |
743 ms |
67536 KB |
Output is correct |
70 |
Correct |
7 ms |
1356 KB |
Output is correct |
71 |
Correct |
18 ms |
2508 KB |
Output is correct |
72 |
Correct |
313 ms |
32532 KB |
Output is correct |
73 |
Correct |
550 ms |
48680 KB |
Output is correct |
74 |
Correct |
779 ms |
64896 KB |
Output is correct |
75 |
Correct |
720 ms |
59508 KB |
Output is correct |
76 |
Correct |
761 ms |
67732 KB |
Output is correct |
77 |
Correct |
8 ms |
1612 KB |
Output is correct |
78 |
Correct |
17 ms |
2776 KB |
Output is correct |
79 |
Correct |
294 ms |
31264 KB |
Output is correct |
80 |
Correct |
506 ms |
46980 KB |
Output is correct |
81 |
Correct |
752 ms |
62440 KB |
Output is correct |
82 |
Correct |
0 ms |
204 KB |
Output is correct |
83 |
Correct |
0 ms |
204 KB |
Output is correct |
84 |
Correct |
1 ms |
204 KB |
Output is correct |
85 |
Correct |
741 ms |
66120 KB |
Output is correct |
86 |
Correct |
760 ms |
66292 KB |
Output is correct |
87 |
Correct |
782 ms |
66296 KB |
Output is correct |
88 |
Correct |
606 ms |
61592 KB |
Output is correct |
89 |
Correct |
780 ms |
94420 KB |
Output is correct |
90 |
Correct |
638 ms |
53812 KB |
Output is correct |
91 |
Correct |
633 ms |
53876 KB |
Output is correct |
92 |
Correct |
706 ms |
59944 KB |
Output is correct |
93 |
Correct |
719 ms |
60072 KB |
Output is correct |
94 |
Correct |
704 ms |
60196 KB |
Output is correct |
95 |
Correct |
697 ms |
60004 KB |
Output is correct |
96 |
Correct |
0 ms |
204 KB |
Output is correct |
97 |
Correct |
36 ms |
4932 KB |
Output is correct |
98 |
Correct |
319 ms |
42676 KB |
Output is correct |
99 |
Correct |
671 ms |
59984 KB |
Output is correct |
100 |
Correct |
23 ms |
2720 KB |
Output is correct |
101 |
Correct |
117 ms |
12132 KB |
Output is correct |
102 |
Correct |
306 ms |
23976 KB |
Output is correct |
103 |
Correct |
216 ms |
21408 KB |
Output is correct |
104 |
Correct |
342 ms |
29312 KB |
Output is correct |
105 |
Correct |
447 ms |
37364 KB |
Output is correct |
106 |
Correct |
575 ms |
45436 KB |
Output is correct |
107 |
Correct |
757 ms |
53280 KB |
Output is correct |
108 |
Correct |
0 ms |
204 KB |
Output is correct |
109 |
Correct |
0 ms |
204 KB |
Output is correct |
110 |
Correct |
0 ms |
204 KB |
Output is correct |
111 |
Correct |
0 ms |
204 KB |
Output is correct |
112 |
Correct |
0 ms |
204 KB |
Output is correct |
113 |
Correct |
0 ms |
204 KB |
Output is correct |
114 |
Correct |
0 ms |
204 KB |
Output is correct |
115 |
Correct |
0 ms |
204 KB |
Output is correct |
116 |
Correct |
0 ms |
204 KB |
Output is correct |
117 |
Correct |
0 ms |
204 KB |
Output is correct |
118 |
Correct |
0 ms |
248 KB |
Output is correct |
119 |
Correct |
4 ms |
844 KB |
Output is correct |
120 |
Correct |
6 ms |
1228 KB |
Output is correct |
121 |
Correct |
317 ms |
34040 KB |
Output is correct |
122 |
Correct |
521 ms |
49384 KB |
Output is correct |
123 |
Correct |
532 ms |
49304 KB |
Output is correct |
124 |
Correct |
0 ms |
204 KB |
Output is correct |
125 |
Correct |
1 ms |
204 KB |
Output is correct |
126 |
Correct |
0 ms |
204 KB |
Output is correct |
127 |
Correct |
745 ms |
66164 KB |
Output is correct |
128 |
Correct |
743 ms |
66200 KB |
Output is correct |
129 |
Correct |
730 ms |
65856 KB |
Output is correct |
130 |
Correct |
8 ms |
1356 KB |
Output is correct |
131 |
Correct |
16 ms |
2620 KB |
Output is correct |
132 |
Correct |
301 ms |
31712 KB |
Output is correct |
133 |
Correct |
530 ms |
47420 KB |
Output is correct |
134 |
Correct |
741 ms |
63256 KB |
Output is correct |
135 |
Correct |
735 ms |
72460 KB |
Output is correct |
136 |
Correct |
737 ms |
72508 KB |
Output is correct |
137 |
Correct |
730 ms |
66184 KB |
Output is correct |
138 |
Correct |
618 ms |
47624 KB |
Output is correct |
139 |
Correct |
612 ms |
55308 KB |
Output is correct |
140 |
Correct |
0 ms |
204 KB |
Output is correct |
141 |
Correct |
80 ms |
9260 KB |
Output is correct |
142 |
Correct |
37 ms |
4664 KB |
Output is correct |
143 |
Correct |
166 ms |
16356 KB |
Output is correct |
144 |
Correct |
318 ms |
27928 KB |
Output is correct |
145 |
Correct |
272 ms |
26644 KB |
Output is correct |
146 |
Correct |
396 ms |
33460 KB |
Output is correct |
147 |
Correct |
466 ms |
39960 KB |
Output is correct |
148 |
Correct |
584 ms |
46380 KB |
Output is correct |
149 |
Correct |
668 ms |
53096 KB |
Output is correct |
150 |
Correct |
694 ms |
59536 KB |
Output is correct |
151 |
Correct |
735 ms |
67732 KB |
Output is correct |
152 |
Correct |
8 ms |
1612 KB |
Output is correct |
153 |
Correct |
17 ms |
2720 KB |
Output is correct |
154 |
Correct |
291 ms |
31264 KB |
Output is correct |
155 |
Correct |
496 ms |
46972 KB |
Output is correct |
156 |
Correct |
733 ms |
62376 KB |
Output is correct |
157 |
Correct |
0 ms |
204 KB |
Output is correct |
158 |
Correct |
0 ms |
204 KB |
Output is correct |
159 |
Correct |
0 ms |
204 KB |
Output is correct |
160 |
Correct |
1 ms |
280 KB |
Output is correct |
161 |
Correct |
509 ms |
39956 KB |
Output is correct |
162 |
Correct |
737 ms |
75000 KB |
Output is correct |
163 |
Correct |
664 ms |
59224 KB |
Output is correct |
164 |
Correct |
658 ms |
59112 KB |
Output is correct |
165 |
Correct |
566 ms |
46472 KB |
Output is correct |
166 |
Correct |
523 ms |
41752 KB |
Output is correct |
167 |
Correct |
100 ms |
11104 KB |
Output is correct |
168 |
Correct |
46 ms |
5616 KB |
Output is correct |
169 |
Correct |
157 ms |
14404 KB |
Output is correct |
170 |
Correct |
346 ms |
26648 KB |
Output is correct |
171 |
Correct |
486 ms |
36156 KB |
Output is correct |
172 |
Correct |
215 ms |
20576 KB |
Output is correct |
173 |
Correct |
271 ms |
24796 KB |
Output is correct |
174 |
Correct |
336 ms |
28652 KB |
Output is correct |
175 |
Correct |
393 ms |
32552 KB |
Output is correct |
176 |
Correct |
465 ms |
36792 KB |
Output is correct |
177 |
Correct |
542 ms |
40920 KB |
Output is correct |