#include "parks.h"
// #pragma GCC optimize("trapv")
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef long long ll;
typedef vector<signed> vi32;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef unordered_set<ll> si;
typedef pair<int, int> ii;
typedef tuple<int, int, int> iii;
typedef vector<ii> vii;
typedef set<iii> siii;
// typedef unordered_set<ii> sii;
typedef vector<vii> vvii;
#define pb push_back
#define loop(x, i) for (int i = 0; i < x; i++)
#define ALL(x) begin(x), end(x)
#define sz(x) (int)x.size()
vii adj = {{-2, 0}, {2, 0}, {0, 2}, {0, -2}};
vector<si> benchPoints(4); // neighbour count
ll MX = 200'004;
ll toInt(ii p)
{
auto [b, c] = p;
return MX * b + c;
}
void addNeighbour(ll x, ll y, int dif = 1)
{
if (benchPoints[1].count(toInt({x, y})))
{
benchPoints[1].erase(toInt({x, y}));
if (dif == 1)
{
benchPoints[2].insert(toInt({x, y}));
}
}
else if (benchPoints[2].count(toInt({x, y})))
{
benchPoints[2].erase(toInt({x, y}));
benchPoints[2 + dif].insert(toInt({x, y}));
}
else if (benchPoints[3].count(toInt({x, y})))
{
benchPoints[3].erase(toInt({x, y}));
if (dif == 1)
throw;
benchPoints[2].insert(toInt({x, y}));
}
else if (dif == 1)
{
benchPoints[1].insert(toInt({x, y}));
}
}
int construct_roads(vi xs, vi ys)
{
unordered_map<ll, int> fountains;
unordered_map<ll, int> roads;
// unordered_set<ii> gotBench;
int n = sz(xs);
loop(n, i)
{
fountains[toInt({xs[i], ys[i]})] = i;
}
vb vis(n);
vi u, v, a, b;
a = b = vi(n - 1);
int visCnt = 1;
auto dfs = [&](auto &&self, int i) -> void
{
int x = xs[i], y = ys[i];
for (const auto &[dx, dy] : adj)
{
ii pos = {x + dx, y + dy};
if (fountains.count(toInt(pos)))
{
int j = fountains[toInt(pos)];
if (vis[j])
continue;
if (dx != 0)
{
roads[toInt({x + dx / 2, y})] = sz(u);
addNeighbour(x + dx / 2, y + 1);
addNeighbour(x + dx / 2, y - 1);
}
else
{
roads[toInt({x, y + dy / 2})] = sz(u);
addNeighbour(x + 1, y + dy / 2);
addNeighbour(x - 1, y + dy / 2);
}
u.pb(i);
v.pb(j);
vis[j] = 1;
visCnt++;
self(self, j);
}
}
};
vis[0] = 1;
dfs(dfs, 0);
if (visCnt != n)
return 0;
assert(sz(u) == n - 1);
for (int benchesBuilt = 0; benchesBuilt < sz(u); benchesBuilt++)
{
ll x = -1, y = -1;
for (int i = 1; i <= 3; i++)
{
if (!benchPoints[i].empty())
{
ll pr = *benchPoints[i].begin();
x = pr / MX, y = pr % MX;
benchPoints[i].erase(benchPoints[i].begin());
break;
}
}
if (x == -1)
break;
ii loc;
if (roads.count(toInt({x + 1, y})))
{
loc = {x + 1, y};
addNeighbour(x + 2, y, -1);
}
else if (roads.count(toInt({x - 1, y})))
{
loc = {x - 1, y};
addNeighbour(x - 2, y, -1);
}
else if (roads.count(toInt({x, y + 1})))
{
loc = {x, y + 1};
addNeighbour(x, y + 2, -1);
}
else if (roads.count(toInt({x, y - 1})))
{
loc = {x, y - 1};
addNeighbour(x, y - 2, -1);
}
else
throw;
int ix = roads[toInt(loc)];
roads.erase(toInt(loc));
a[ix] = x;
b[ix] = y;
}
build(u, v, a, b);
return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
436 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
103 ms |
33836 KB |
Output is correct |
10 |
Correct |
11 ms |
3672 KB |
Output is correct |
11 |
Correct |
53 ms |
18544 KB |
Output is correct |
12 |
Correct |
18 ms |
5240 KB |
Output is correct |
13 |
Correct |
20 ms |
11628 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
83 ms |
28820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
436 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
103 ms |
33836 KB |
Output is correct |
10 |
Correct |
11 ms |
3672 KB |
Output is correct |
11 |
Correct |
53 ms |
18544 KB |
Output is correct |
12 |
Correct |
18 ms |
5240 KB |
Output is correct |
13 |
Correct |
20 ms |
11628 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
83 ms |
28820 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
344 KB |
Output is correct |
21 |
Correct |
1 ms |
620 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
252 ms |
59120 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
604 KB |
Output is correct |
26 |
Correct |
1 ms |
860 KB |
Output is correct |
27 |
Correct |
1 ms |
604 KB |
Output is correct |
28 |
Correct |
119 ms |
23352 KB |
Output is correct |
29 |
Correct |
144 ms |
33224 KB |
Output is correct |
30 |
Correct |
167 ms |
45628 KB |
Output is correct |
31 |
Correct |
287 ms |
56800 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
2 ms |
704 KB |
Output is correct |
44 |
Correct |
1 ms |
600 KB |
Output is correct |
45 |
Correct |
144 ms |
26584 KB |
Output is correct |
46 |
Correct |
178 ms |
39376 KB |
Output is correct |
47 |
Correct |
206 ms |
38808 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
436 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
103 ms |
33836 KB |
Output is correct |
10 |
Correct |
11 ms |
3672 KB |
Output is correct |
11 |
Correct |
53 ms |
18544 KB |
Output is correct |
12 |
Correct |
18 ms |
5240 KB |
Output is correct |
13 |
Correct |
20 ms |
11628 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
83 ms |
28820 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
344 KB |
Output is correct |
21 |
Correct |
1 ms |
620 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
252 ms |
59120 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
604 KB |
Output is correct |
26 |
Correct |
1 ms |
860 KB |
Output is correct |
27 |
Correct |
1 ms |
604 KB |
Output is correct |
28 |
Correct |
119 ms |
23352 KB |
Output is correct |
29 |
Correct |
144 ms |
33224 KB |
Output is correct |
30 |
Correct |
167 ms |
45628 KB |
Output is correct |
31 |
Correct |
287 ms |
56800 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
2 ms |
704 KB |
Output is correct |
44 |
Correct |
1 ms |
600 KB |
Output is correct |
45 |
Correct |
144 ms |
26584 KB |
Output is correct |
46 |
Correct |
178 ms |
39376 KB |
Output is correct |
47 |
Correct |
206 ms |
38808 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
1 ms |
348 KB |
Output is correct |
50 |
Correct |
1 ms |
344 KB |
Output is correct |
51 |
Correct |
1 ms |
604 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
600 KB |
Output is correct |
55 |
Correct |
346 ms |
53992 KB |
Output is correct |
56 |
Correct |
1 ms |
344 KB |
Output is correct |
57 |
Correct |
3 ms |
860 KB |
Output is correct |
58 |
Correct |
8 ms |
2140 KB |
Output is correct |
59 |
Correct |
5 ms |
1372 KB |
Output is correct |
60 |
Correct |
132 ms |
29896 KB |
Output is correct |
61 |
Correct |
161 ms |
38832 KB |
Output is correct |
62 |
Correct |
233 ms |
44788 KB |
Output is correct |
63 |
Correct |
305 ms |
53108 KB |
Output is correct |
64 |
Correct |
1 ms |
344 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
259 ms |
63664 KB |
Output is correct |
68 |
Correct |
250 ms |
62512 KB |
Output is correct |
69 |
Correct |
250 ms |
65024 KB |
Output is correct |
70 |
Correct |
3 ms |
856 KB |
Output is correct |
71 |
Correct |
4 ms |
1116 KB |
Output is correct |
72 |
Correct |
116 ms |
22908 KB |
Output is correct |
73 |
Correct |
211 ms |
37060 KB |
Output is correct |
74 |
Correct |
394 ms |
46216 KB |
Output is correct |
75 |
Correct |
367 ms |
57328 KB |
Output is correct |
76 |
Correct |
269 ms |
69364 KB |
Output is correct |
77 |
Correct |
4 ms |
1112 KB |
Output is correct |
78 |
Correct |
4 ms |
1628 KB |
Output is correct |
79 |
Correct |
144 ms |
25496 KB |
Output is correct |
80 |
Correct |
247 ms |
38632 KB |
Output is correct |
81 |
Correct |
361 ms |
51864 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
436 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
103 ms |
33836 KB |
Output is correct |
10 |
Correct |
11 ms |
3672 KB |
Output is correct |
11 |
Correct |
53 ms |
18544 KB |
Output is correct |
12 |
Correct |
18 ms |
5240 KB |
Output is correct |
13 |
Correct |
20 ms |
11628 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
83 ms |
28820 KB |
Output is correct |
17 |
Correct |
1 ms |
344 KB |
Output is correct |
18 |
Correct |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
264 ms |
61532 KB |
Output is correct |
21 |
Correct |
259 ms |
56556 KB |
Output is correct |
22 |
Correct |
291 ms |
53744 KB |
Output is correct |
23 |
Correct |
254 ms |
47996 KB |
Output is correct |
24 |
Correct |
52 ms |
15744 KB |
Output is correct |
25 |
Correct |
63 ms |
15708 KB |
Output is correct |
26 |
Correct |
76 ms |
15852 KB |
Output is correct |
27 |
Correct |
293 ms |
45952 KB |
Output is correct |
28 |
Correct |
267 ms |
45952 KB |
Output is correct |
29 |
Correct |
294 ms |
45952 KB |
Output is correct |
30 |
Correct |
303 ms |
45948 KB |
Output is correct |
31 |
Correct |
1 ms |
764 KB |
Output is correct |
32 |
Correct |
24 ms |
3676 KB |
Output is correct |
33 |
Correct |
38 ms |
8392 KB |
Output is correct |
34 |
Correct |
238 ms |
57504 KB |
Output is correct |
35 |
Correct |
8 ms |
1628 KB |
Output is correct |
36 |
Correct |
29 ms |
5476 KB |
Output is correct |
37 |
Correct |
50 ms |
9500 KB |
Output is correct |
38 |
Correct |
138 ms |
14432 KB |
Output is correct |
39 |
Correct |
182 ms |
20840 KB |
Output is correct |
40 |
Correct |
213 ms |
25796 KB |
Output is correct |
41 |
Correct |
227 ms |
29632 KB |
Output is correct |
42 |
Correct |
335 ms |
36660 KB |
Output is correct |
43 |
Correct |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
1 ms |
348 KB |
Output is correct |
47 |
Correct |
1 ms |
348 KB |
Output is correct |
48 |
Correct |
1 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
432 KB |
Output is correct |
50 |
Correct |
1 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
1 ms |
604 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
2 ms |
600 KB |
Output is correct |
55 |
Correct |
2 ms |
860 KB |
Output is correct |
56 |
Correct |
146 ms |
26708 KB |
Output is correct |
57 |
Correct |
202 ms |
39368 KB |
Output is correct |
58 |
Correct |
217 ms |
38804 KB |
Output is correct |
59 |
Correct |
1 ms |
344 KB |
Output is correct |
60 |
Correct |
1 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
290 ms |
63600 KB |
Output is correct |
63 |
Correct |
291 ms |
62660 KB |
Output is correct |
64 |
Correct |
228 ms |
65336 KB |
Output is correct |
65 |
Correct |
2 ms |
860 KB |
Output is correct |
66 |
Correct |
5 ms |
1372 KB |
Output is correct |
67 |
Correct |
145 ms |
23072 KB |
Output is correct |
68 |
Correct |
241 ms |
37160 KB |
Output is correct |
69 |
Correct |
347 ms |
46136 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
436 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
103 ms |
33836 KB |
Output is correct |
10 |
Correct |
11 ms |
3672 KB |
Output is correct |
11 |
Correct |
53 ms |
18544 KB |
Output is correct |
12 |
Correct |
18 ms |
5240 KB |
Output is correct |
13 |
Correct |
20 ms |
11628 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
83 ms |
28820 KB |
Output is correct |
17 |
Correct |
332 ms |
69828 KB |
Output is correct |
18 |
Correct |
381 ms |
67528 KB |
Output is correct |
19 |
Correct |
263 ms |
61996 KB |
Output is correct |
20 |
Correct |
267 ms |
53432 KB |
Output is correct |
21 |
Correct |
282 ms |
46992 KB |
Output is correct |
22 |
Correct |
1 ms |
344 KB |
Output is correct |
23 |
Correct |
60 ms |
7052 KB |
Output is correct |
24 |
Correct |
11 ms |
3416 KB |
Output is correct |
25 |
Correct |
42 ms |
7640 KB |
Output is correct |
26 |
Correct |
47 ms |
11464 KB |
Output is correct |
27 |
Correct |
131 ms |
24260 KB |
Output is correct |
28 |
Correct |
201 ms |
30660 KB |
Output is correct |
29 |
Correct |
250 ms |
36496 KB |
Output is correct |
30 |
Correct |
294 ms |
44924 KB |
Output is correct |
31 |
Correct |
310 ms |
48872 KB |
Output is correct |
32 |
Correct |
317 ms |
57300 KB |
Output is correct |
33 |
Correct |
218 ms |
69320 KB |
Output is correct |
34 |
Correct |
3 ms |
1116 KB |
Output is correct |
35 |
Correct |
4 ms |
1628 KB |
Output is correct |
36 |
Correct |
115 ms |
25420 KB |
Output is correct |
37 |
Correct |
215 ms |
38452 KB |
Output is correct |
38 |
Correct |
266 ms |
51872 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
436 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
103 ms |
33836 KB |
Output is correct |
10 |
Correct |
11 ms |
3672 KB |
Output is correct |
11 |
Correct |
53 ms |
18544 KB |
Output is correct |
12 |
Correct |
18 ms |
5240 KB |
Output is correct |
13 |
Correct |
20 ms |
11628 KB |
Output is correct |
14 |
Correct |
1 ms |
604 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
83 ms |
28820 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
344 KB |
Output is correct |
21 |
Correct |
1 ms |
620 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
252 ms |
59120 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
604 KB |
Output is correct |
26 |
Correct |
1 ms |
860 KB |
Output is correct |
27 |
Correct |
1 ms |
604 KB |
Output is correct |
28 |
Correct |
119 ms |
23352 KB |
Output is correct |
29 |
Correct |
144 ms |
33224 KB |
Output is correct |
30 |
Correct |
167 ms |
45628 KB |
Output is correct |
31 |
Correct |
287 ms |
56800 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
2 ms |
704 KB |
Output is correct |
44 |
Correct |
1 ms |
600 KB |
Output is correct |
45 |
Correct |
144 ms |
26584 KB |
Output is correct |
46 |
Correct |
178 ms |
39376 KB |
Output is correct |
47 |
Correct |
206 ms |
38808 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
1 ms |
348 KB |
Output is correct |
50 |
Correct |
1 ms |
344 KB |
Output is correct |
51 |
Correct |
1 ms |
604 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
600 KB |
Output is correct |
55 |
Correct |
346 ms |
53992 KB |
Output is correct |
56 |
Correct |
1 ms |
344 KB |
Output is correct |
57 |
Correct |
3 ms |
860 KB |
Output is correct |
58 |
Correct |
8 ms |
2140 KB |
Output is correct |
59 |
Correct |
5 ms |
1372 KB |
Output is correct |
60 |
Correct |
132 ms |
29896 KB |
Output is correct |
61 |
Correct |
161 ms |
38832 KB |
Output is correct |
62 |
Correct |
233 ms |
44788 KB |
Output is correct |
63 |
Correct |
305 ms |
53108 KB |
Output is correct |
64 |
Correct |
1 ms |
344 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
259 ms |
63664 KB |
Output is correct |
68 |
Correct |
250 ms |
62512 KB |
Output is correct |
69 |
Correct |
250 ms |
65024 KB |
Output is correct |
70 |
Correct |
3 ms |
856 KB |
Output is correct |
71 |
Correct |
4 ms |
1116 KB |
Output is correct |
72 |
Correct |
116 ms |
22908 KB |
Output is correct |
73 |
Correct |
211 ms |
37060 KB |
Output is correct |
74 |
Correct |
394 ms |
46216 KB |
Output is correct |
75 |
Correct |
367 ms |
57328 KB |
Output is correct |
76 |
Correct |
269 ms |
69364 KB |
Output is correct |
77 |
Correct |
4 ms |
1112 KB |
Output is correct |
78 |
Correct |
4 ms |
1628 KB |
Output is correct |
79 |
Correct |
144 ms |
25496 KB |
Output is correct |
80 |
Correct |
247 ms |
38632 KB |
Output is correct |
81 |
Correct |
361 ms |
51864 KB |
Output is correct |
82 |
Correct |
1 ms |
344 KB |
Output is correct |
83 |
Correct |
1 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
264 ms |
61532 KB |
Output is correct |
86 |
Correct |
259 ms |
56556 KB |
Output is correct |
87 |
Correct |
291 ms |
53744 KB |
Output is correct |
88 |
Correct |
254 ms |
47996 KB |
Output is correct |
89 |
Correct |
52 ms |
15744 KB |
Output is correct |
90 |
Correct |
63 ms |
15708 KB |
Output is correct |
91 |
Correct |
76 ms |
15852 KB |
Output is correct |
92 |
Correct |
293 ms |
45952 KB |
Output is correct |
93 |
Correct |
267 ms |
45952 KB |
Output is correct |
94 |
Correct |
294 ms |
45952 KB |
Output is correct |
95 |
Correct |
303 ms |
45948 KB |
Output is correct |
96 |
Correct |
1 ms |
764 KB |
Output is correct |
97 |
Correct |
24 ms |
3676 KB |
Output is correct |
98 |
Correct |
38 ms |
8392 KB |
Output is correct |
99 |
Correct |
238 ms |
57504 KB |
Output is correct |
100 |
Correct |
8 ms |
1628 KB |
Output is correct |
101 |
Correct |
29 ms |
5476 KB |
Output is correct |
102 |
Correct |
50 ms |
9500 KB |
Output is correct |
103 |
Correct |
138 ms |
14432 KB |
Output is correct |
104 |
Correct |
182 ms |
20840 KB |
Output is correct |
105 |
Correct |
213 ms |
25796 KB |
Output is correct |
106 |
Correct |
227 ms |
29632 KB |
Output is correct |
107 |
Correct |
335 ms |
36660 KB |
Output is correct |
108 |
Correct |
1 ms |
348 KB |
Output is correct |
109 |
Correct |
1 ms |
348 KB |
Output is correct |
110 |
Correct |
0 ms |
348 KB |
Output is correct |
111 |
Correct |
1 ms |
348 KB |
Output is correct |
112 |
Correct |
1 ms |
348 KB |
Output is correct |
113 |
Correct |
1 ms |
348 KB |
Output is correct |
114 |
Correct |
0 ms |
432 KB |
Output is correct |
115 |
Correct |
1 ms |
348 KB |
Output is correct |
116 |
Correct |
0 ms |
348 KB |
Output is correct |
117 |
Correct |
1 ms |
604 KB |
Output is correct |
118 |
Correct |
0 ms |
348 KB |
Output is correct |
119 |
Correct |
2 ms |
600 KB |
Output is correct |
120 |
Correct |
2 ms |
860 KB |
Output is correct |
121 |
Correct |
146 ms |
26708 KB |
Output is correct |
122 |
Correct |
202 ms |
39368 KB |
Output is correct |
123 |
Correct |
217 ms |
38804 KB |
Output is correct |
124 |
Correct |
1 ms |
344 KB |
Output is correct |
125 |
Correct |
1 ms |
348 KB |
Output is correct |
126 |
Correct |
0 ms |
348 KB |
Output is correct |
127 |
Correct |
290 ms |
63600 KB |
Output is correct |
128 |
Correct |
291 ms |
62660 KB |
Output is correct |
129 |
Correct |
228 ms |
65336 KB |
Output is correct |
130 |
Correct |
2 ms |
860 KB |
Output is correct |
131 |
Correct |
5 ms |
1372 KB |
Output is correct |
132 |
Correct |
145 ms |
23072 KB |
Output is correct |
133 |
Correct |
241 ms |
37160 KB |
Output is correct |
134 |
Correct |
347 ms |
46136 KB |
Output is correct |
135 |
Correct |
332 ms |
69828 KB |
Output is correct |
136 |
Correct |
381 ms |
67528 KB |
Output is correct |
137 |
Correct |
263 ms |
61996 KB |
Output is correct |
138 |
Correct |
267 ms |
53432 KB |
Output is correct |
139 |
Correct |
282 ms |
46992 KB |
Output is correct |
140 |
Correct |
1 ms |
344 KB |
Output is correct |
141 |
Correct |
60 ms |
7052 KB |
Output is correct |
142 |
Correct |
11 ms |
3416 KB |
Output is correct |
143 |
Correct |
42 ms |
7640 KB |
Output is correct |
144 |
Correct |
47 ms |
11464 KB |
Output is correct |
145 |
Correct |
131 ms |
24260 KB |
Output is correct |
146 |
Correct |
201 ms |
30660 KB |
Output is correct |
147 |
Correct |
250 ms |
36496 KB |
Output is correct |
148 |
Correct |
294 ms |
44924 KB |
Output is correct |
149 |
Correct |
310 ms |
48872 KB |
Output is correct |
150 |
Correct |
317 ms |
57300 KB |
Output is correct |
151 |
Correct |
218 ms |
69320 KB |
Output is correct |
152 |
Correct |
3 ms |
1116 KB |
Output is correct |
153 |
Correct |
4 ms |
1628 KB |
Output is correct |
154 |
Correct |
115 ms |
25420 KB |
Output is correct |
155 |
Correct |
215 ms |
38452 KB |
Output is correct |
156 |
Correct |
266 ms |
51872 KB |
Output is correct |
157 |
Correct |
1 ms |
348 KB |
Output is correct |
158 |
Correct |
1 ms |
440 KB |
Output is correct |
159 |
Correct |
0 ms |
604 KB |
Output is correct |
160 |
Correct |
1 ms |
348 KB |
Output is correct |
161 |
Correct |
255 ms |
50812 KB |
Output is correct |
162 |
Correct |
209 ms |
53972 KB |
Output is correct |
163 |
Correct |
231 ms |
46580 KB |
Output is correct |
164 |
Correct |
223 ms |
46200 KB |
Output is correct |
165 |
Correct |
268 ms |
60464 KB |
Output is correct |
166 |
Correct |
305 ms |
61308 KB |
Output is correct |
167 |
Incorrect |
52 ms |
10088 KB |
a[4194] = 0 is not an odd integer |
168 |
Halted |
0 ms |
0 KB |
- |