#include <bits/stdc++.h>
#include "parks.h"
using namespace std;
typedef long long ll;
struct Edge{
int u, v, idx;
Edge(){}
Edge(int u, int v, int idx): u(u), v(v), idx(idx){}
bool operator==(const Edge &r)const{
return idx==r.idx;
}
};
struct dat{
int x, y;
vector<Edge> vec;
dat(){}
dat(int x, int y, vector<Edge> vec): x(x), y(y), vec(vec){}
bool operator<(const dat &r)const{
if(vec.size() != r.vec.size()) return vec.size() < r.vec.size();
return make_pair(x, y) < make_pair(r.x, r.y);
}
};
int xx[]={-1, 1, 0, 0}, yy[]={0, 0, -1, 1};
int n;
pair<int, int> arr[200002];
map<pair<int, int>, int> idx;
int par[200002];
int edgeU[200002], edgeV[200002], edgeCnt;
int edgeA[200002], edgeB[200002];
vector<pair<int, int> > link[200002];
map<pair<int, int>, vector<Edge> > mp;
set<dat> st;
int find(int x){
if(x==par[x]) return x;
return par[x] = find(par[x]);
}
void merge(int x, int y){
x = find(x), y = find(y);
par[y] = x;
}
void dfs(int u){
int x = arr[u].first, y = arr[u].second;
for(int d=0; d<4; d++){
int tx = x+xx[d]+xx[d], ty = y+yy[d]+yy[d];
if(idx.find(make_pair(tx, ty)) == idx.end()) continue;
int tmp = idx[make_pair(tx, ty)];
if(find(u) == find(tmp)) continue;
edgeU[edgeCnt] = u, edgeV[edgeCnt] = tmp;
if(x == tx){
mp[make_pair(x+1, y+yy[d])].push_back(Edge(u, tmp, edgeCnt));
mp[make_pair(x-1, y+yy[d])].push_back(Edge(u, tmp, edgeCnt));
link[edgeCnt].push_back(make_pair(x+1, y+yy[d]));
link[edgeCnt].push_back(make_pair(x-1, y+yy[d]));
}
else{
mp[make_pair(x+xx[d], y+1)].push_back(Edge(u, tmp, edgeCnt));
mp[make_pair(x+xx[d], y-1)].push_back(Edge(u, tmp, edgeCnt));
link[edgeCnt].push_back(make_pair(x+xx[d], y-1));
link[edgeCnt].push_back(make_pair(x+xx[d], y+1));
}
edgeCnt++;
merge(u, tmp);
dfs(tmp);
}
}
int construct_roads(vector<int> x, vector<int> y) {
n = (int)x.size();
for(int i=0; i<n; i++){
arr[i] = make_pair(x[i], y[i]);
par[i] = i;
idx[arr[i]] = i;
}
int start = min_element(arr, arr+n) - arr;
dfs(start);
for(int i=0; i<n; i++){
if(find(i) != find(0)) return 0;
}
for(auto p: mp){
st.insert(dat(p.first.first, p.first.second, p.second));
}
while(!st.empty()){
dat tmp = *st.begin(); st.erase(st.begin());
if(tmp.vec.empty()) continue;
Edge edge = tmp.vec[0];
edgeA[edge.idx] = tmp.x;
edgeB[edge.idx] = tmp.y;
for(auto p: link[edge.idx]){
if(p.first == tmp.x && p.second == tmp.y) continue;
st.erase(dat(p.first, p.second, mp[p]));
auto it = find(mp[p].begin(), mp[p].end(), Edge(edgeU[edge.idx], edgeV[edge.idx], edge.idx));
if(it == mp[p].end()) continue;
mp[p].erase(it);
st.insert(dat(p.first, p.second, mp[p]));
}
}
build(vector<int>(edgeU, edgeU+n-1), vector<int>(edgeV, edgeV+n-1), vector<int>(edgeA, edgeA+n-1), vector<int>(edgeB, edgeB+n-1));
return 1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
4940 KB |
Output is correct |
2 |
Correct |
7 ms |
4940 KB |
Output is correct |
3 |
Correct |
4 ms |
4940 KB |
Output is correct |
4 |
Correct |
3 ms |
4940 KB |
Output is correct |
5 |
Correct |
4 ms |
4940 KB |
Output is correct |
6 |
Correct |
4 ms |
4940 KB |
Output is correct |
7 |
Correct |
3 ms |
4940 KB |
Output is correct |
8 |
Correct |
6 ms |
4940 KB |
Output is correct |
9 |
Correct |
613 ms |
76396 KB |
Output is correct |
10 |
Correct |
48 ms |
12120 KB |
Output is correct |
11 |
Correct |
285 ms |
43364 KB |
Output is correct |
12 |
Correct |
72 ms |
15764 KB |
Output is correct |
13 |
Correct |
89 ms |
20588 KB |
Output is correct |
14 |
Correct |
5 ms |
5196 KB |
Output is correct |
15 |
Correct |
6 ms |
5324 KB |
Output is correct |
16 |
Correct |
640 ms |
76264 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
4940 KB |
Output is correct |
2 |
Correct |
7 ms |
4940 KB |
Output is correct |
3 |
Correct |
4 ms |
4940 KB |
Output is correct |
4 |
Correct |
3 ms |
4940 KB |
Output is correct |
5 |
Correct |
4 ms |
4940 KB |
Output is correct |
6 |
Correct |
4 ms |
4940 KB |
Output is correct |
7 |
Correct |
3 ms |
4940 KB |
Output is correct |
8 |
Correct |
6 ms |
4940 KB |
Output is correct |
9 |
Correct |
613 ms |
76396 KB |
Output is correct |
10 |
Correct |
48 ms |
12120 KB |
Output is correct |
11 |
Correct |
285 ms |
43364 KB |
Output is correct |
12 |
Correct |
72 ms |
15764 KB |
Output is correct |
13 |
Correct |
89 ms |
20588 KB |
Output is correct |
14 |
Correct |
5 ms |
5196 KB |
Output is correct |
15 |
Correct |
6 ms |
5324 KB |
Output is correct |
16 |
Correct |
640 ms |
76264 KB |
Output is correct |
17 |
Correct |
5 ms |
4940 KB |
Output is correct |
18 |
Correct |
5 ms |
4940 KB |
Output is correct |
19 |
Correct |
4 ms |
4940 KB |
Output is correct |
20 |
Correct |
6 ms |
4956 KB |
Output is correct |
21 |
Correct |
4 ms |
4940 KB |
Output is correct |
22 |
Correct |
5 ms |
4940 KB |
Output is correct |
23 |
Correct |
1191 ms |
108608 KB |
Output is correct |
24 |
Correct |
4 ms |
4940 KB |
Output is correct |
25 |
Correct |
7 ms |
5580 KB |
Output is correct |
26 |
Correct |
9 ms |
5580 KB |
Output is correct |
27 |
Correct |
7 ms |
5540 KB |
Output is correct |
28 |
Correct |
434 ms |
46280 KB |
Output is correct |
29 |
Correct |
664 ms |
67080 KB |
Output is correct |
30 |
Correct |
926 ms |
87848 KB |
Output is correct |
31 |
Correct |
1140 ms |
108608 KB |
Output is correct |
32 |
Correct |
4 ms |
4940 KB |
Output is correct |
33 |
Correct |
10 ms |
4996 KB |
Output is correct |
34 |
Correct |
6 ms |
4936 KB |
Output is correct |
35 |
Correct |
4 ms |
4940 KB |
Output is correct |
36 |
Correct |
6 ms |
4940 KB |
Output is correct |
37 |
Correct |
4 ms |
4940 KB |
Output is correct |
38 |
Correct |
4 ms |
4940 KB |
Output is correct |
39 |
Correct |
4 ms |
4940 KB |
Output is correct |
40 |
Correct |
4 ms |
4940 KB |
Output is correct |
41 |
Correct |
4 ms |
4940 KB |
Output is correct |
42 |
Correct |
4 ms |
4940 KB |
Output is correct |
43 |
Correct |
6 ms |
5452 KB |
Output is correct |
44 |
Correct |
8 ms |
5324 KB |
Output is correct |
45 |
Correct |
553 ms |
60120 KB |
Output is correct |
46 |
Correct |
768 ms |
84920 KB |
Output is correct |
47 |
Correct |
855 ms |
84928 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
4940 KB |
Output is correct |
2 |
Correct |
7 ms |
4940 KB |
Output is correct |
3 |
Correct |
4 ms |
4940 KB |
Output is correct |
4 |
Correct |
3 ms |
4940 KB |
Output is correct |
5 |
Correct |
4 ms |
4940 KB |
Output is correct |
6 |
Correct |
4 ms |
4940 KB |
Output is correct |
7 |
Correct |
3 ms |
4940 KB |
Output is correct |
8 |
Correct |
6 ms |
4940 KB |
Output is correct |
9 |
Correct |
613 ms |
76396 KB |
Output is correct |
10 |
Correct |
48 ms |
12120 KB |
Output is correct |
11 |
Correct |
285 ms |
43364 KB |
Output is correct |
12 |
Correct |
72 ms |
15764 KB |
Output is correct |
13 |
Correct |
89 ms |
20588 KB |
Output is correct |
14 |
Correct |
5 ms |
5196 KB |
Output is correct |
15 |
Correct |
6 ms |
5324 KB |
Output is correct |
16 |
Correct |
640 ms |
76264 KB |
Output is correct |
17 |
Correct |
5 ms |
4940 KB |
Output is correct |
18 |
Correct |
5 ms |
4940 KB |
Output is correct |
19 |
Correct |
4 ms |
4940 KB |
Output is correct |
20 |
Correct |
6 ms |
4956 KB |
Output is correct |
21 |
Correct |
4 ms |
4940 KB |
Output is correct |
22 |
Correct |
5 ms |
4940 KB |
Output is correct |
23 |
Correct |
1191 ms |
108608 KB |
Output is correct |
24 |
Correct |
4 ms |
4940 KB |
Output is correct |
25 |
Correct |
7 ms |
5580 KB |
Output is correct |
26 |
Correct |
9 ms |
5580 KB |
Output is correct |
27 |
Correct |
7 ms |
5540 KB |
Output is correct |
28 |
Correct |
434 ms |
46280 KB |
Output is correct |
29 |
Correct |
664 ms |
67080 KB |
Output is correct |
30 |
Correct |
926 ms |
87848 KB |
Output is correct |
31 |
Correct |
1140 ms |
108608 KB |
Output is correct |
32 |
Correct |
4 ms |
4940 KB |
Output is correct |
33 |
Correct |
10 ms |
4996 KB |
Output is correct |
34 |
Correct |
6 ms |
4936 KB |
Output is correct |
35 |
Correct |
4 ms |
4940 KB |
Output is correct |
36 |
Correct |
6 ms |
4940 KB |
Output is correct |
37 |
Correct |
4 ms |
4940 KB |
Output is correct |
38 |
Correct |
4 ms |
4940 KB |
Output is correct |
39 |
Correct |
4 ms |
4940 KB |
Output is correct |
40 |
Correct |
4 ms |
4940 KB |
Output is correct |
41 |
Correct |
4 ms |
4940 KB |
Output is correct |
42 |
Correct |
4 ms |
4940 KB |
Output is correct |
43 |
Correct |
6 ms |
5452 KB |
Output is correct |
44 |
Correct |
8 ms |
5324 KB |
Output is correct |
45 |
Correct |
553 ms |
60120 KB |
Output is correct |
46 |
Correct |
768 ms |
84920 KB |
Output is correct |
47 |
Correct |
855 ms |
84928 KB |
Output is correct |
48 |
Correct |
4 ms |
4940 KB |
Output is correct |
49 |
Correct |
4 ms |
4940 KB |
Output is correct |
50 |
Correct |
4 ms |
4960 KB |
Output is correct |
51 |
Correct |
3 ms |
4940 KB |
Output is correct |
52 |
Correct |
4 ms |
4940 KB |
Output is correct |
53 |
Correct |
4 ms |
4940 KB |
Output is correct |
54 |
Correct |
4 ms |
4940 KB |
Output is correct |
55 |
Correct |
1184 ms |
107052 KB |
Output is correct |
56 |
Correct |
6 ms |
4940 KB |
Output is correct |
57 |
Correct |
10 ms |
5836 KB |
Output is correct |
58 |
Correct |
37 ms |
8048 KB |
Output is correct |
59 |
Correct |
17 ms |
6416 KB |
Output is correct |
60 |
Correct |
509 ms |
55892 KB |
Output is correct |
61 |
Correct |
739 ms |
73712 KB |
Output is correct |
62 |
Correct |
970 ms |
89224 KB |
Output is correct |
63 |
Correct |
1222 ms |
107040 KB |
Output is correct |
64 |
Correct |
4 ms |
4940 KB |
Output is correct |
65 |
Correct |
4 ms |
4940 KB |
Output is correct |
66 |
Correct |
4 ms |
4940 KB |
Output is correct |
67 |
Correct |
1167 ms |
147752 KB |
Output is correct |
68 |
Correct |
1300 ms |
135200 KB |
Output is correct |
69 |
Correct |
1282 ms |
140888 KB |
Output is correct |
70 |
Correct |
10 ms |
5836 KB |
Output is correct |
71 |
Correct |
12 ms |
6220 KB |
Output is correct |
72 |
Correct |
553 ms |
55348 KB |
Output is correct |
73 |
Correct |
873 ms |
80476 KB |
Output is correct |
74 |
Correct |
1182 ms |
105844 KB |
Output is correct |
75 |
Correct |
1399 ms |
116388 KB |
Output is correct |
76 |
Correct |
1240 ms |
147808 KB |
Output is correct |
77 |
Correct |
10 ms |
6092 KB |
Output is correct |
78 |
Correct |
11 ms |
6220 KB |
Output is correct |
79 |
Correct |
558 ms |
56756 KB |
Output is correct |
80 |
Correct |
854 ms |
82988 KB |
Output is correct |
81 |
Correct |
1313 ms |
108924 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
4940 KB |
Output is correct |
2 |
Correct |
7 ms |
4940 KB |
Output is correct |
3 |
Correct |
4 ms |
4940 KB |
Output is correct |
4 |
Correct |
3 ms |
4940 KB |
Output is correct |
5 |
Correct |
4 ms |
4940 KB |
Output is correct |
6 |
Correct |
4 ms |
4940 KB |
Output is correct |
7 |
Correct |
3 ms |
4940 KB |
Output is correct |
8 |
Correct |
6 ms |
4940 KB |
Output is correct |
9 |
Correct |
613 ms |
76396 KB |
Output is correct |
10 |
Correct |
48 ms |
12120 KB |
Output is correct |
11 |
Correct |
285 ms |
43364 KB |
Output is correct |
12 |
Correct |
72 ms |
15764 KB |
Output is correct |
13 |
Correct |
89 ms |
20588 KB |
Output is correct |
14 |
Correct |
5 ms |
5196 KB |
Output is correct |
15 |
Correct |
6 ms |
5324 KB |
Output is correct |
16 |
Correct |
640 ms |
76264 KB |
Output is correct |
17 |
Correct |
4 ms |
4940 KB |
Output is correct |
18 |
Correct |
6 ms |
4940 KB |
Output is correct |
19 |
Correct |
4 ms |
4940 KB |
Output is correct |
20 |
Correct |
1014 ms |
104832 KB |
Output is correct |
21 |
Correct |
1057 ms |
92040 KB |
Output is correct |
22 |
Correct |
1053 ms |
104560 KB |
Output is correct |
23 |
Correct |
1034 ms |
121692 KB |
Output is correct |
24 |
Correct |
234 ms |
22984 KB |
Output is correct |
25 |
Correct |
236 ms |
23180 KB |
Output is correct |
26 |
Correct |
200 ms |
23080 KB |
Output is correct |
27 |
Correct |
1039 ms |
122624 KB |
Output is correct |
28 |
Correct |
1065 ms |
122748 KB |
Output is correct |
29 |
Correct |
1562 ms |
122684 KB |
Output is correct |
30 |
Correct |
1481 ms |
122756 KB |
Output is correct |
31 |
Correct |
4 ms |
4940 KB |
Output is correct |
32 |
Correct |
60 ms |
11836 KB |
Output is correct |
33 |
Correct |
87 ms |
14020 KB |
Output is correct |
34 |
Correct |
1012 ms |
104740 KB |
Output is correct |
35 |
Correct |
18 ms |
6740 KB |
Output is correct |
36 |
Correct |
76 ms |
11288 KB |
Output is correct |
37 |
Correct |
115 ms |
15804 KB |
Output is correct |
38 |
Correct |
444 ms |
38352 KB |
Output is correct |
39 |
Correct |
574 ms |
50580 KB |
Output is correct |
40 |
Correct |
912 ms |
63192 KB |
Output is correct |
41 |
Correct |
966 ms |
75648 KB |
Output is correct |
42 |
Correct |
1214 ms |
88224 KB |
Output is correct |
43 |
Correct |
4 ms |
4940 KB |
Output is correct |
44 |
Correct |
4 ms |
4940 KB |
Output is correct |
45 |
Correct |
4 ms |
4940 KB |
Output is correct |
46 |
Correct |
4 ms |
4940 KB |
Output is correct |
47 |
Correct |
4 ms |
4940 KB |
Output is correct |
48 |
Correct |
4 ms |
4940 KB |
Output is correct |
49 |
Correct |
4 ms |
4940 KB |
Output is correct |
50 |
Correct |
4 ms |
4940 KB |
Output is correct |
51 |
Correct |
4 ms |
4940 KB |
Output is correct |
52 |
Correct |
4 ms |
4940 KB |
Output is correct |
53 |
Correct |
3 ms |
4940 KB |
Output is correct |
54 |
Correct |
6 ms |
5476 KB |
Output is correct |
55 |
Correct |
8 ms |
5452 KB |
Output is correct |
56 |
Correct |
547 ms |
60076 KB |
Output is correct |
57 |
Correct |
826 ms |
84936 KB |
Output is correct |
58 |
Correct |
889 ms |
85008 KB |
Output is correct |
59 |
Correct |
5 ms |
4940 KB |
Output is correct |
60 |
Correct |
4 ms |
4940 KB |
Output is correct |
61 |
Correct |
5 ms |
4940 KB |
Output is correct |
62 |
Correct |
1250 ms |
147704 KB |
Output is correct |
63 |
Correct |
1234 ms |
135288 KB |
Output is correct |
64 |
Correct |
1227 ms |
140900 KB |
Output is correct |
65 |
Correct |
10 ms |
5836 KB |
Output is correct |
66 |
Correct |
13 ms |
6160 KB |
Output is correct |
67 |
Correct |
642 ms |
55292 KB |
Output is correct |
68 |
Correct |
865 ms |
80428 KB |
Output is correct |
69 |
Correct |
1221 ms |
105648 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
4940 KB |
Output is correct |
2 |
Correct |
7 ms |
4940 KB |
Output is correct |
3 |
Correct |
4 ms |
4940 KB |
Output is correct |
4 |
Correct |
3 ms |
4940 KB |
Output is correct |
5 |
Correct |
4 ms |
4940 KB |
Output is correct |
6 |
Correct |
4 ms |
4940 KB |
Output is correct |
7 |
Correct |
3 ms |
4940 KB |
Output is correct |
8 |
Correct |
6 ms |
4940 KB |
Output is correct |
9 |
Correct |
613 ms |
76396 KB |
Output is correct |
10 |
Correct |
48 ms |
12120 KB |
Output is correct |
11 |
Correct |
285 ms |
43364 KB |
Output is correct |
12 |
Correct |
72 ms |
15764 KB |
Output is correct |
13 |
Correct |
89 ms |
20588 KB |
Output is correct |
14 |
Correct |
5 ms |
5196 KB |
Output is correct |
15 |
Correct |
6 ms |
5324 KB |
Output is correct |
16 |
Correct |
640 ms |
76264 KB |
Output is correct |
17 |
Correct |
1196 ms |
148216 KB |
Output is correct |
18 |
Correct |
1229 ms |
142100 KB |
Output is correct |
19 |
Correct |
1022 ms |
104612 KB |
Output is correct |
20 |
Correct |
1267 ms |
108224 KB |
Output is correct |
21 |
Correct |
1197 ms |
111896 KB |
Output is correct |
22 |
Correct |
4 ms |
4940 KB |
Output is correct |
23 |
Correct |
148 ms |
19936 KB |
Output is correct |
24 |
Correct |
34 ms |
9072 KB |
Output is correct |
25 |
Correct |
87 ms |
13764 KB |
Output is correct |
26 |
Correct |
155 ms |
18628 KB |
Output is correct |
27 |
Correct |
580 ms |
54068 KB |
Output is correct |
28 |
Correct |
754 ms |
66332 KB |
Output is correct |
29 |
Correct |
894 ms |
78592 KB |
Output is correct |
30 |
Correct |
1057 ms |
90776 KB |
Output is correct |
31 |
Correct |
1241 ms |
103344 KB |
Output is correct |
32 |
Correct |
1285 ms |
116572 KB |
Output is correct |
33 |
Correct |
1289 ms |
147796 KB |
Output is correct |
34 |
Correct |
10 ms |
6092 KB |
Output is correct |
35 |
Correct |
13 ms |
6228 KB |
Output is correct |
36 |
Correct |
538 ms |
56812 KB |
Output is correct |
37 |
Correct |
873 ms |
82984 KB |
Output is correct |
38 |
Correct |
1334 ms |
108896 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
4940 KB |
Output is correct |
2 |
Correct |
7 ms |
4940 KB |
Output is correct |
3 |
Correct |
4 ms |
4940 KB |
Output is correct |
4 |
Correct |
3 ms |
4940 KB |
Output is correct |
5 |
Correct |
4 ms |
4940 KB |
Output is correct |
6 |
Correct |
4 ms |
4940 KB |
Output is correct |
7 |
Correct |
3 ms |
4940 KB |
Output is correct |
8 |
Correct |
6 ms |
4940 KB |
Output is correct |
9 |
Correct |
613 ms |
76396 KB |
Output is correct |
10 |
Correct |
48 ms |
12120 KB |
Output is correct |
11 |
Correct |
285 ms |
43364 KB |
Output is correct |
12 |
Correct |
72 ms |
15764 KB |
Output is correct |
13 |
Correct |
89 ms |
20588 KB |
Output is correct |
14 |
Correct |
5 ms |
5196 KB |
Output is correct |
15 |
Correct |
6 ms |
5324 KB |
Output is correct |
16 |
Correct |
640 ms |
76264 KB |
Output is correct |
17 |
Correct |
5 ms |
4940 KB |
Output is correct |
18 |
Correct |
5 ms |
4940 KB |
Output is correct |
19 |
Correct |
4 ms |
4940 KB |
Output is correct |
20 |
Correct |
6 ms |
4956 KB |
Output is correct |
21 |
Correct |
4 ms |
4940 KB |
Output is correct |
22 |
Correct |
5 ms |
4940 KB |
Output is correct |
23 |
Correct |
1191 ms |
108608 KB |
Output is correct |
24 |
Correct |
4 ms |
4940 KB |
Output is correct |
25 |
Correct |
7 ms |
5580 KB |
Output is correct |
26 |
Correct |
9 ms |
5580 KB |
Output is correct |
27 |
Correct |
7 ms |
5540 KB |
Output is correct |
28 |
Correct |
434 ms |
46280 KB |
Output is correct |
29 |
Correct |
664 ms |
67080 KB |
Output is correct |
30 |
Correct |
926 ms |
87848 KB |
Output is correct |
31 |
Correct |
1140 ms |
108608 KB |
Output is correct |
32 |
Correct |
4 ms |
4940 KB |
Output is correct |
33 |
Correct |
10 ms |
4996 KB |
Output is correct |
34 |
Correct |
6 ms |
4936 KB |
Output is correct |
35 |
Correct |
4 ms |
4940 KB |
Output is correct |
36 |
Correct |
6 ms |
4940 KB |
Output is correct |
37 |
Correct |
4 ms |
4940 KB |
Output is correct |
38 |
Correct |
4 ms |
4940 KB |
Output is correct |
39 |
Correct |
4 ms |
4940 KB |
Output is correct |
40 |
Correct |
4 ms |
4940 KB |
Output is correct |
41 |
Correct |
4 ms |
4940 KB |
Output is correct |
42 |
Correct |
4 ms |
4940 KB |
Output is correct |
43 |
Correct |
6 ms |
5452 KB |
Output is correct |
44 |
Correct |
8 ms |
5324 KB |
Output is correct |
45 |
Correct |
553 ms |
60120 KB |
Output is correct |
46 |
Correct |
768 ms |
84920 KB |
Output is correct |
47 |
Correct |
855 ms |
84928 KB |
Output is correct |
48 |
Correct |
4 ms |
4940 KB |
Output is correct |
49 |
Correct |
4 ms |
4940 KB |
Output is correct |
50 |
Correct |
4 ms |
4960 KB |
Output is correct |
51 |
Correct |
3 ms |
4940 KB |
Output is correct |
52 |
Correct |
4 ms |
4940 KB |
Output is correct |
53 |
Correct |
4 ms |
4940 KB |
Output is correct |
54 |
Correct |
4 ms |
4940 KB |
Output is correct |
55 |
Correct |
1184 ms |
107052 KB |
Output is correct |
56 |
Correct |
6 ms |
4940 KB |
Output is correct |
57 |
Correct |
10 ms |
5836 KB |
Output is correct |
58 |
Correct |
37 ms |
8048 KB |
Output is correct |
59 |
Correct |
17 ms |
6416 KB |
Output is correct |
60 |
Correct |
509 ms |
55892 KB |
Output is correct |
61 |
Correct |
739 ms |
73712 KB |
Output is correct |
62 |
Correct |
970 ms |
89224 KB |
Output is correct |
63 |
Correct |
1222 ms |
107040 KB |
Output is correct |
64 |
Correct |
4 ms |
4940 KB |
Output is correct |
65 |
Correct |
4 ms |
4940 KB |
Output is correct |
66 |
Correct |
4 ms |
4940 KB |
Output is correct |
67 |
Correct |
1167 ms |
147752 KB |
Output is correct |
68 |
Correct |
1300 ms |
135200 KB |
Output is correct |
69 |
Correct |
1282 ms |
140888 KB |
Output is correct |
70 |
Correct |
10 ms |
5836 KB |
Output is correct |
71 |
Correct |
12 ms |
6220 KB |
Output is correct |
72 |
Correct |
553 ms |
55348 KB |
Output is correct |
73 |
Correct |
873 ms |
80476 KB |
Output is correct |
74 |
Correct |
1182 ms |
105844 KB |
Output is correct |
75 |
Correct |
1399 ms |
116388 KB |
Output is correct |
76 |
Correct |
1240 ms |
147808 KB |
Output is correct |
77 |
Correct |
10 ms |
6092 KB |
Output is correct |
78 |
Correct |
11 ms |
6220 KB |
Output is correct |
79 |
Correct |
558 ms |
56756 KB |
Output is correct |
80 |
Correct |
854 ms |
82988 KB |
Output is correct |
81 |
Correct |
1313 ms |
108924 KB |
Output is correct |
82 |
Correct |
4 ms |
4940 KB |
Output is correct |
83 |
Correct |
6 ms |
4940 KB |
Output is correct |
84 |
Correct |
4 ms |
4940 KB |
Output is correct |
85 |
Correct |
1014 ms |
104832 KB |
Output is correct |
86 |
Correct |
1057 ms |
92040 KB |
Output is correct |
87 |
Correct |
1053 ms |
104560 KB |
Output is correct |
88 |
Correct |
1034 ms |
121692 KB |
Output is correct |
89 |
Correct |
234 ms |
22984 KB |
Output is correct |
90 |
Correct |
236 ms |
23180 KB |
Output is correct |
91 |
Correct |
200 ms |
23080 KB |
Output is correct |
92 |
Correct |
1039 ms |
122624 KB |
Output is correct |
93 |
Correct |
1065 ms |
122748 KB |
Output is correct |
94 |
Correct |
1562 ms |
122684 KB |
Output is correct |
95 |
Correct |
1481 ms |
122756 KB |
Output is correct |
96 |
Correct |
4 ms |
4940 KB |
Output is correct |
97 |
Correct |
60 ms |
11836 KB |
Output is correct |
98 |
Correct |
87 ms |
14020 KB |
Output is correct |
99 |
Correct |
1012 ms |
104740 KB |
Output is correct |
100 |
Correct |
18 ms |
6740 KB |
Output is correct |
101 |
Correct |
76 ms |
11288 KB |
Output is correct |
102 |
Correct |
115 ms |
15804 KB |
Output is correct |
103 |
Correct |
444 ms |
38352 KB |
Output is correct |
104 |
Correct |
574 ms |
50580 KB |
Output is correct |
105 |
Correct |
912 ms |
63192 KB |
Output is correct |
106 |
Correct |
966 ms |
75648 KB |
Output is correct |
107 |
Correct |
1214 ms |
88224 KB |
Output is correct |
108 |
Correct |
4 ms |
4940 KB |
Output is correct |
109 |
Correct |
4 ms |
4940 KB |
Output is correct |
110 |
Correct |
4 ms |
4940 KB |
Output is correct |
111 |
Correct |
4 ms |
4940 KB |
Output is correct |
112 |
Correct |
4 ms |
4940 KB |
Output is correct |
113 |
Correct |
4 ms |
4940 KB |
Output is correct |
114 |
Correct |
4 ms |
4940 KB |
Output is correct |
115 |
Correct |
4 ms |
4940 KB |
Output is correct |
116 |
Correct |
4 ms |
4940 KB |
Output is correct |
117 |
Correct |
4 ms |
4940 KB |
Output is correct |
118 |
Correct |
3 ms |
4940 KB |
Output is correct |
119 |
Correct |
6 ms |
5476 KB |
Output is correct |
120 |
Correct |
8 ms |
5452 KB |
Output is correct |
121 |
Correct |
547 ms |
60076 KB |
Output is correct |
122 |
Correct |
826 ms |
84936 KB |
Output is correct |
123 |
Correct |
889 ms |
85008 KB |
Output is correct |
124 |
Correct |
5 ms |
4940 KB |
Output is correct |
125 |
Correct |
4 ms |
4940 KB |
Output is correct |
126 |
Correct |
5 ms |
4940 KB |
Output is correct |
127 |
Correct |
1250 ms |
147704 KB |
Output is correct |
128 |
Correct |
1234 ms |
135288 KB |
Output is correct |
129 |
Correct |
1227 ms |
140900 KB |
Output is correct |
130 |
Correct |
10 ms |
5836 KB |
Output is correct |
131 |
Correct |
13 ms |
6160 KB |
Output is correct |
132 |
Correct |
642 ms |
55292 KB |
Output is correct |
133 |
Correct |
865 ms |
80428 KB |
Output is correct |
134 |
Correct |
1221 ms |
105648 KB |
Output is correct |
135 |
Correct |
1196 ms |
148216 KB |
Output is correct |
136 |
Correct |
1229 ms |
142100 KB |
Output is correct |
137 |
Correct |
1022 ms |
104612 KB |
Output is correct |
138 |
Correct |
1267 ms |
108224 KB |
Output is correct |
139 |
Correct |
1197 ms |
111896 KB |
Output is correct |
140 |
Correct |
4 ms |
4940 KB |
Output is correct |
141 |
Correct |
148 ms |
19936 KB |
Output is correct |
142 |
Correct |
34 ms |
9072 KB |
Output is correct |
143 |
Correct |
87 ms |
13764 KB |
Output is correct |
144 |
Correct |
155 ms |
18628 KB |
Output is correct |
145 |
Correct |
580 ms |
54068 KB |
Output is correct |
146 |
Correct |
754 ms |
66332 KB |
Output is correct |
147 |
Correct |
894 ms |
78592 KB |
Output is correct |
148 |
Correct |
1057 ms |
90776 KB |
Output is correct |
149 |
Correct |
1241 ms |
103344 KB |
Output is correct |
150 |
Correct |
1285 ms |
116572 KB |
Output is correct |
151 |
Correct |
1289 ms |
147796 KB |
Output is correct |
152 |
Correct |
10 ms |
6092 KB |
Output is correct |
153 |
Correct |
13 ms |
6228 KB |
Output is correct |
154 |
Correct |
538 ms |
56812 KB |
Output is correct |
155 |
Correct |
873 ms |
82984 KB |
Output is correct |
156 |
Correct |
1334 ms |
108896 KB |
Output is correct |
157 |
Correct |
4 ms |
4940 KB |
Output is correct |
158 |
Correct |
4 ms |
4940 KB |
Output is correct |
159 |
Correct |
4 ms |
4940 KB |
Output is correct |
160 |
Correct |
4 ms |
4940 KB |
Output is correct |
161 |
Correct |
1237 ms |
104476 KB |
Output is correct |
162 |
Correct |
983 ms |
104840 KB |
Output is correct |
163 |
Correct |
1028 ms |
99500 KB |
Output is correct |
164 |
Correct |
1043 ms |
99724 KB |
Output is correct |
165 |
Correct |
1068 ms |
102764 KB |
Output is correct |
166 |
Correct |
1201 ms |
103836 KB |
Output is correct |
167 |
Incorrect |
216 ms |
24660 KB |
a[4837] = 0 is not an odd integer |
168 |
Halted |
0 ms |
0 KB |
- |