#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include <bits/stdc++.h>
using namespace std;
#ifndef WAIMAI
#include "parks.h"
#endif
#ifdef WAIMAI
#define debug(HEHE...) cout << "[" << #HEHE << "] : ", dout(HEHE)
void dout() {cout << '\n';}
template<typename T, typename...U>
void dout(T t, U...u) {cout << t << (sizeof...(u) ? ", " : ""), dout(u...);}
#else
#define debug(...) 7122
#endif
#define ll long long
#define Waimai ios::sync_with_stdio(false), cin.tie(0)
#define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
#define pb emplace_back
#define F first
#define S second
#ifdef WAIMAI
void build(vector<int> u, vector<int> v, vector<int> a, vector<int> b);
#endif
const int SIZE = 2e5 + 5;
int to[SIZE], h[SIZE];
int dsu(int x) {
return x == to[x] ? x : (to[x] = dsu(to[x]));
}
void merge(int a, int b) {
a = dsu(a), b = dsu(b);
if (a == b) return;
if (h[a] < h[b]) swap(a, b);
to[b] = a;
h[a] += (h[a] == h[b]);
}
int construct_roads(vector<int> x, vector<int> y) {
int n = x.size();
map<pair<int, int>, int> mp;
FOR (i, 0, n - 1) mp[{x[i], y[i]}] = i;
vector<pair<int, int>> e;
FOR (i, 0, n - 1) {
if (mp.count({x[i] + 2, y[i]})) {
int j = mp[{x[i] + 2, y[i]}];
e.pb(i, j);
}
if (mp.count({x[i], y[i] + 2})) {
int j = mp[{x[i], y[i] + 2}];
e.pb(i, j);
}
}
sort(e.begin(), e.end(), [&](auto l, auto r) {
return make_tuple(x[l.F], x[l.S], y[l.F], y[l.S]) < make_tuple(x[r.F], x[r.S], y[r.F], y[r.S]);
});
vector<int> u, v, mx, my;
set<pair<int, int>> s;
iota(to, to + n, 0);
for (auto [a, b] : e) if (dsu(a) != dsu(b)) {
debug(a, b, x[a], y[a], x[b], y[b]);
if (x[a] == x[b]) {
int cx = x[a] + ((x[a] + y[a]) % 4 ? 1 : -1);
int cy = (y[a] + y[b]) / 2;
if (!s.count({cx, cy})) {
s.emplace(cx, cy);
merge(a, b);
u.pb(a), v.pb(b);
mx.pb(cx), my.pb(cy);
}
} else {
int cx = (x[a] + x[b]) / 2;
int cy = y[a] + ((x[a] + y[a]) % 4 ? -1 : 1);
if (!s.count({cx, cy})) {
s.emplace(cx, cy);
merge(a, b);
u.pb(a), v.pb(b);
mx.pb(cx), my.pb(cy);
}
}
}
if (u.size() != n - 1) return 0;
build(u, v, mx, my);
return 1;
}
#ifdef WAIMAI
static void check(bool cond, string message) {
if (!cond) {
printf("%s\n", message.c_str());
fclose(stdout);
exit(0);
}
}
static int n;
static bool build_called;
static int m;
static vector<int> _u, _v, _a, _b;
void build(vector<int> u, vector<int> v, vector<int> a, vector<int> b) {
check(!build_called, "build is called more than once");
build_called = true;
m = u.size();
check(int(v.size()) == m, "u.size() != v.size()");
check(int(a.size()) == m, "u.size() != a.size()");
check(int(b.size()) == m, "u.size() != b.size()");
_u = u;
_v = v;
_a = a;
_b = b;
}
int main() {
assert(scanf("%d", &n) == 1);
vector<int> x(n), y(n);
for (int i = 0; i < n; i++) {
assert(scanf("%d%d", &x[i], &y[i]) == 2);
}
fclose(stdin);
build_called = false;
const int possible = construct_roads(x, y);
check(possible == 0 || possible == 1, "Invalid return value of construct_roads()");
if (possible == 1) {
check(build_called, "construct_roads() returned 1 without calling build()");
} else {
check(!build_called, "construct_roads() called build() but returned 0");
}
printf("%d\n", possible);
if (possible == 1) {
printf("%d\n", m);
for (int j = 0; j < m; j++) {
printf("%d %d %d %d\n", _u[j], _v[j], _a[j], _b[j]);
}
}
fclose(stdout);
return 0;
}
#endif
Compilation message
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:16:20: warning: statement has no effect [-Wunused-value]
16 | #define debug(...) 7122
| ^~~~
parks.cpp:66:9: note: in expansion of macro 'debug'
66 | debug(a, b, x[a], y[a], x[b], y[b]);
| ^~~~~
parks.cpp:87:18: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
87 | if (u.size() != n - 1) return 0;
| ~~~~~~~~~^~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
148 ms |
20264 KB |
Output is correct |
10 |
Correct |
9 ms |
2404 KB |
Output is correct |
11 |
Correct |
66 ms |
10884 KB |
Output is correct |
12 |
Correct |
14 ms |
3484 KB |
Output is correct |
13 |
Correct |
40 ms |
7452 KB |
Output is correct |
14 |
Correct |
1 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
138 ms |
20116 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
148 ms |
20264 KB |
Output is correct |
10 |
Correct |
9 ms |
2404 KB |
Output is correct |
11 |
Correct |
66 ms |
10884 KB |
Output is correct |
12 |
Correct |
14 ms |
3484 KB |
Output is correct |
13 |
Correct |
40 ms |
7452 KB |
Output is correct |
14 |
Correct |
1 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
138 ms |
20116 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
312 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
397 ms |
40148 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
468 KB |
Output is correct |
26 |
Correct |
3 ms |
724 KB |
Output is correct |
27 |
Correct |
4 ms |
980 KB |
Output is correct |
28 |
Correct |
125 ms |
16144 KB |
Output is correct |
29 |
Correct |
213 ms |
24232 KB |
Output is correct |
30 |
Correct |
279 ms |
32380 KB |
Output is correct |
31 |
Correct |
399 ms |
40212 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
308 KB |
Output is correct |
40 |
Correct |
0 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
2 ms |
596 KB |
Output is correct |
44 |
Correct |
3 ms |
724 KB |
Output is correct |
45 |
Correct |
149 ms |
20572 KB |
Output is correct |
46 |
Correct |
243 ms |
30380 KB |
Output is correct |
47 |
Correct |
255 ms |
30336 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
148 ms |
20264 KB |
Output is correct |
10 |
Correct |
9 ms |
2404 KB |
Output is correct |
11 |
Correct |
66 ms |
10884 KB |
Output is correct |
12 |
Correct |
14 ms |
3484 KB |
Output is correct |
13 |
Correct |
40 ms |
7452 KB |
Output is correct |
14 |
Correct |
1 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
138 ms |
20116 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
312 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
397 ms |
40148 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
468 KB |
Output is correct |
26 |
Correct |
3 ms |
724 KB |
Output is correct |
27 |
Correct |
4 ms |
980 KB |
Output is correct |
28 |
Correct |
125 ms |
16144 KB |
Output is correct |
29 |
Correct |
213 ms |
24232 KB |
Output is correct |
30 |
Correct |
279 ms |
32380 KB |
Output is correct |
31 |
Correct |
399 ms |
40212 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
308 KB |
Output is correct |
40 |
Correct |
0 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
2 ms |
596 KB |
Output is correct |
44 |
Correct |
3 ms |
724 KB |
Output is correct |
45 |
Correct |
149 ms |
20572 KB |
Output is correct |
46 |
Correct |
243 ms |
30380 KB |
Output is correct |
47 |
Correct |
255 ms |
30336 KB |
Output is correct |
48 |
Correct |
1 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
212 KB |
Output is correct |
50 |
Correct |
0 ms |
212 KB |
Output is correct |
51 |
Correct |
0 ms |
212 KB |
Output is correct |
52 |
Correct |
0 ms |
304 KB |
Output is correct |
53 |
Correct |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
408 ms |
39972 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
2 ms |
704 KB |
Output is correct |
58 |
Correct |
9 ms |
1520 KB |
Output is correct |
59 |
Correct |
10 ms |
2008 KB |
Output is correct |
60 |
Correct |
165 ms |
20056 KB |
Output is correct |
61 |
Correct |
240 ms |
28212 KB |
Output is correct |
62 |
Correct |
313 ms |
33436 KB |
Output is correct |
63 |
Correct |
414 ms |
40124 KB |
Output is correct |
64 |
Correct |
0 ms |
212 KB |
Output is correct |
65 |
Correct |
1 ms |
308 KB |
Output is correct |
66 |
Correct |
0 ms |
212 KB |
Output is correct |
67 |
Correct |
355 ms |
40152 KB |
Output is correct |
68 |
Correct |
341 ms |
40208 KB |
Output is correct |
69 |
Correct |
322 ms |
39948 KB |
Output is correct |
70 |
Correct |
4 ms |
852 KB |
Output is correct |
71 |
Correct |
7 ms |
1556 KB |
Output is correct |
72 |
Correct |
145 ms |
20380 KB |
Output is correct |
73 |
Correct |
268 ms |
31116 KB |
Output is correct |
74 |
Correct |
361 ms |
40932 KB |
Output is correct |
75 |
Correct |
394 ms |
40048 KB |
Output is correct |
76 |
Correct |
329 ms |
40076 KB |
Output is correct |
77 |
Correct |
5 ms |
1108 KB |
Output is correct |
78 |
Correct |
8 ms |
1876 KB |
Output is correct |
79 |
Correct |
147 ms |
20360 KB |
Output is correct |
80 |
Correct |
245 ms |
31208 KB |
Output is correct |
81 |
Correct |
365 ms |
40964 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
148 ms |
20264 KB |
Output is correct |
10 |
Correct |
9 ms |
2404 KB |
Output is correct |
11 |
Correct |
66 ms |
10884 KB |
Output is correct |
12 |
Correct |
14 ms |
3484 KB |
Output is correct |
13 |
Correct |
40 ms |
7452 KB |
Output is correct |
14 |
Correct |
1 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
138 ms |
20116 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
329 ms |
41872 KB |
Output is correct |
21 |
Correct |
335 ms |
41380 KB |
Output is correct |
22 |
Correct |
362 ms |
41468 KB |
Output is correct |
23 |
Correct |
306 ms |
34968 KB |
Output is correct |
24 |
Correct |
186 ms |
18380 KB |
Output is correct |
25 |
Correct |
332 ms |
33312 KB |
Output is correct |
26 |
Correct |
287 ms |
33332 KB |
Output is correct |
27 |
Correct |
329 ms |
40060 KB |
Output is correct |
28 |
Correct |
341 ms |
40660 KB |
Output is correct |
29 |
Correct |
393 ms |
40048 KB |
Output is correct |
30 |
Correct |
377 ms |
40648 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
18 ms |
3460 KB |
Output is correct |
33 |
Correct |
69 ms |
9768 KB |
Output is correct |
34 |
Correct |
327 ms |
41948 KB |
Output is correct |
35 |
Correct |
10 ms |
2004 KB |
Output is correct |
36 |
Correct |
62 ms |
8800 KB |
Output is correct |
37 |
Correct |
134 ms |
17272 KB |
Output is correct |
38 |
Correct |
126 ms |
17472 KB |
Output is correct |
39 |
Correct |
189 ms |
23472 KB |
Output is correct |
40 |
Correct |
232 ms |
30784 KB |
Output is correct |
41 |
Correct |
327 ms |
36520 KB |
Output is correct |
42 |
Correct |
374 ms |
42632 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
1 ms |
212 KB |
Output is correct |
45 |
Correct |
0 ms |
312 KB |
Output is correct |
46 |
Correct |
1 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 |
212 KB |
Output is correct |
51 |
Correct |
0 ms |
308 KB |
Output is correct |
52 |
Correct |
0 ms |
212 KB |
Output is correct |
53 |
Correct |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
2 ms |
596 KB |
Output is correct |
55 |
Correct |
3 ms |
724 KB |
Output is correct |
56 |
Correct |
146 ms |
20540 KB |
Output is correct |
57 |
Correct |
229 ms |
30376 KB |
Output is correct |
58 |
Correct |
221 ms |
30264 KB |
Output is correct |
59 |
Correct |
1 ms |
212 KB |
Output is correct |
60 |
Correct |
1 ms |
212 KB |
Output is correct |
61 |
Correct |
1 ms |
212 KB |
Output is correct |
62 |
Correct |
306 ms |
40120 KB |
Output is correct |
63 |
Correct |
335 ms |
40116 KB |
Output is correct |
64 |
Correct |
341 ms |
39896 KB |
Output is correct |
65 |
Correct |
4 ms |
1084 KB |
Output is correct |
66 |
Correct |
7 ms |
1588 KB |
Output is correct |
67 |
Correct |
146 ms |
20312 KB |
Output is correct |
68 |
Correct |
240 ms |
31116 KB |
Output is correct |
69 |
Correct |
340 ms |
40920 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
148 ms |
20264 KB |
Output is correct |
10 |
Correct |
9 ms |
2404 KB |
Output is correct |
11 |
Correct |
66 ms |
10884 KB |
Output is correct |
12 |
Correct |
14 ms |
3484 KB |
Output is correct |
13 |
Correct |
40 ms |
7452 KB |
Output is correct |
14 |
Correct |
1 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
138 ms |
20116 KB |
Output is correct |
17 |
Correct |
330 ms |
40856 KB |
Output is correct |
18 |
Correct |
338 ms |
41116 KB |
Output is correct |
19 |
Correct |
350 ms |
41460 KB |
Output is correct |
20 |
Correct |
363 ms |
39124 KB |
Output is correct |
21 |
Correct |
306 ms |
35220 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
50 ms |
7180 KB |
Output is correct |
24 |
Correct |
22 ms |
3672 KB |
Output is correct |
25 |
Correct |
90 ms |
12756 KB |
Output is correct |
26 |
Correct |
170 ms |
20808 KB |
Output is correct |
27 |
Correct |
166 ms |
21348 KB |
Output is correct |
28 |
Correct |
211 ms |
26824 KB |
Output is correct |
29 |
Correct |
290 ms |
32664 KB |
Output is correct |
30 |
Correct |
339 ms |
37112 KB |
Output is correct |
31 |
Correct |
424 ms |
42664 KB |
Output is correct |
32 |
Correct |
391 ms |
40244 KB |
Output is correct |
33 |
Correct |
311 ms |
40088 KB |
Output is correct |
34 |
Correct |
5 ms |
1108 KB |
Output is correct |
35 |
Correct |
8 ms |
1876 KB |
Output is correct |
36 |
Correct |
147 ms |
20312 KB |
Output is correct |
37 |
Correct |
272 ms |
31224 KB |
Output is correct |
38 |
Correct |
361 ms |
40892 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
148 ms |
20264 KB |
Output is correct |
10 |
Correct |
9 ms |
2404 KB |
Output is correct |
11 |
Correct |
66 ms |
10884 KB |
Output is correct |
12 |
Correct |
14 ms |
3484 KB |
Output is correct |
13 |
Correct |
40 ms |
7452 KB |
Output is correct |
14 |
Correct |
1 ms |
468 KB |
Output is correct |
15 |
Correct |
2 ms |
596 KB |
Output is correct |
16 |
Correct |
138 ms |
20116 KB |
Output is correct |
17 |
Correct |
0 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
312 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
397 ms |
40148 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
2 ms |
468 KB |
Output is correct |
26 |
Correct |
3 ms |
724 KB |
Output is correct |
27 |
Correct |
4 ms |
980 KB |
Output is correct |
28 |
Correct |
125 ms |
16144 KB |
Output is correct |
29 |
Correct |
213 ms |
24232 KB |
Output is correct |
30 |
Correct |
279 ms |
32380 KB |
Output is correct |
31 |
Correct |
399 ms |
40212 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
1 ms |
212 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
308 KB |
Output is correct |
40 |
Correct |
0 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
2 ms |
596 KB |
Output is correct |
44 |
Correct |
3 ms |
724 KB |
Output is correct |
45 |
Correct |
149 ms |
20572 KB |
Output is correct |
46 |
Correct |
243 ms |
30380 KB |
Output is correct |
47 |
Correct |
255 ms |
30336 KB |
Output is correct |
48 |
Correct |
1 ms |
212 KB |
Output is correct |
49 |
Correct |
0 ms |
212 KB |
Output is correct |
50 |
Correct |
0 ms |
212 KB |
Output is correct |
51 |
Correct |
0 ms |
212 KB |
Output is correct |
52 |
Correct |
0 ms |
304 KB |
Output is correct |
53 |
Correct |
0 ms |
212 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
408 ms |
39972 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
2 ms |
704 KB |
Output is correct |
58 |
Correct |
9 ms |
1520 KB |
Output is correct |
59 |
Correct |
10 ms |
2008 KB |
Output is correct |
60 |
Correct |
165 ms |
20056 KB |
Output is correct |
61 |
Correct |
240 ms |
28212 KB |
Output is correct |
62 |
Correct |
313 ms |
33436 KB |
Output is correct |
63 |
Correct |
414 ms |
40124 KB |
Output is correct |
64 |
Correct |
0 ms |
212 KB |
Output is correct |
65 |
Correct |
1 ms |
308 KB |
Output is correct |
66 |
Correct |
0 ms |
212 KB |
Output is correct |
67 |
Correct |
355 ms |
40152 KB |
Output is correct |
68 |
Correct |
341 ms |
40208 KB |
Output is correct |
69 |
Correct |
322 ms |
39948 KB |
Output is correct |
70 |
Correct |
4 ms |
852 KB |
Output is correct |
71 |
Correct |
7 ms |
1556 KB |
Output is correct |
72 |
Correct |
145 ms |
20380 KB |
Output is correct |
73 |
Correct |
268 ms |
31116 KB |
Output is correct |
74 |
Correct |
361 ms |
40932 KB |
Output is correct |
75 |
Correct |
394 ms |
40048 KB |
Output is correct |
76 |
Correct |
329 ms |
40076 KB |
Output is correct |
77 |
Correct |
5 ms |
1108 KB |
Output is correct |
78 |
Correct |
8 ms |
1876 KB |
Output is correct |
79 |
Correct |
147 ms |
20360 KB |
Output is correct |
80 |
Correct |
245 ms |
31208 KB |
Output is correct |
81 |
Correct |
365 ms |
40964 KB |
Output is correct |
82 |
Correct |
1 ms |
212 KB |
Output is correct |
83 |
Correct |
0 ms |
212 KB |
Output is correct |
84 |
Correct |
0 ms |
212 KB |
Output is correct |
85 |
Correct |
329 ms |
41872 KB |
Output is correct |
86 |
Correct |
335 ms |
41380 KB |
Output is correct |
87 |
Correct |
362 ms |
41468 KB |
Output is correct |
88 |
Correct |
306 ms |
34968 KB |
Output is correct |
89 |
Correct |
186 ms |
18380 KB |
Output is correct |
90 |
Correct |
332 ms |
33312 KB |
Output is correct |
91 |
Correct |
287 ms |
33332 KB |
Output is correct |
92 |
Correct |
329 ms |
40060 KB |
Output is correct |
93 |
Correct |
341 ms |
40660 KB |
Output is correct |
94 |
Correct |
393 ms |
40048 KB |
Output is correct |
95 |
Correct |
377 ms |
40648 KB |
Output is correct |
96 |
Correct |
0 ms |
212 KB |
Output is correct |
97 |
Correct |
18 ms |
3460 KB |
Output is correct |
98 |
Correct |
69 ms |
9768 KB |
Output is correct |
99 |
Correct |
327 ms |
41948 KB |
Output is correct |
100 |
Correct |
10 ms |
2004 KB |
Output is correct |
101 |
Correct |
62 ms |
8800 KB |
Output is correct |
102 |
Correct |
134 ms |
17272 KB |
Output is correct |
103 |
Correct |
126 ms |
17472 KB |
Output is correct |
104 |
Correct |
189 ms |
23472 KB |
Output is correct |
105 |
Correct |
232 ms |
30784 KB |
Output is correct |
106 |
Correct |
327 ms |
36520 KB |
Output is correct |
107 |
Correct |
374 ms |
42632 KB |
Output is correct |
108 |
Correct |
1 ms |
212 KB |
Output is correct |
109 |
Correct |
1 ms |
212 KB |
Output is correct |
110 |
Correct |
0 ms |
312 KB |
Output is correct |
111 |
Correct |
1 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 |
212 KB |
Output is correct |
116 |
Correct |
0 ms |
308 KB |
Output is correct |
117 |
Correct |
0 ms |
212 KB |
Output is correct |
118 |
Correct |
0 ms |
212 KB |
Output is correct |
119 |
Correct |
2 ms |
596 KB |
Output is correct |
120 |
Correct |
3 ms |
724 KB |
Output is correct |
121 |
Correct |
146 ms |
20540 KB |
Output is correct |
122 |
Correct |
229 ms |
30376 KB |
Output is correct |
123 |
Correct |
221 ms |
30264 KB |
Output is correct |
124 |
Correct |
1 ms |
212 KB |
Output is correct |
125 |
Correct |
1 ms |
212 KB |
Output is correct |
126 |
Correct |
1 ms |
212 KB |
Output is correct |
127 |
Correct |
306 ms |
40120 KB |
Output is correct |
128 |
Correct |
335 ms |
40116 KB |
Output is correct |
129 |
Correct |
341 ms |
39896 KB |
Output is correct |
130 |
Correct |
4 ms |
1084 KB |
Output is correct |
131 |
Correct |
7 ms |
1588 KB |
Output is correct |
132 |
Correct |
146 ms |
20312 KB |
Output is correct |
133 |
Correct |
240 ms |
31116 KB |
Output is correct |
134 |
Correct |
340 ms |
40920 KB |
Output is correct |
135 |
Correct |
330 ms |
40856 KB |
Output is correct |
136 |
Correct |
338 ms |
41116 KB |
Output is correct |
137 |
Correct |
350 ms |
41460 KB |
Output is correct |
138 |
Correct |
363 ms |
39124 KB |
Output is correct |
139 |
Correct |
306 ms |
35220 KB |
Output is correct |
140 |
Correct |
0 ms |
212 KB |
Output is correct |
141 |
Correct |
50 ms |
7180 KB |
Output is correct |
142 |
Correct |
22 ms |
3672 KB |
Output is correct |
143 |
Correct |
90 ms |
12756 KB |
Output is correct |
144 |
Correct |
170 ms |
20808 KB |
Output is correct |
145 |
Correct |
166 ms |
21348 KB |
Output is correct |
146 |
Correct |
211 ms |
26824 KB |
Output is correct |
147 |
Correct |
290 ms |
32664 KB |
Output is correct |
148 |
Correct |
339 ms |
37112 KB |
Output is correct |
149 |
Correct |
424 ms |
42664 KB |
Output is correct |
150 |
Correct |
391 ms |
40244 KB |
Output is correct |
151 |
Correct |
311 ms |
40088 KB |
Output is correct |
152 |
Correct |
5 ms |
1108 KB |
Output is correct |
153 |
Correct |
8 ms |
1876 KB |
Output is correct |
154 |
Correct |
147 ms |
20312 KB |
Output is correct |
155 |
Correct |
272 ms |
31224 KB |
Output is correct |
156 |
Correct |
361 ms |
40892 KB |
Output is correct |
157 |
Correct |
1 ms |
212 KB |
Output is correct |
158 |
Correct |
0 ms |
304 KB |
Output is correct |
159 |
Correct |
0 ms |
212 KB |
Output is correct |
160 |
Correct |
0 ms |
212 KB |
Output is correct |
161 |
Correct |
466 ms |
40880 KB |
Output is correct |
162 |
Correct |
339 ms |
41848 KB |
Output is correct |
163 |
Correct |
343 ms |
41640 KB |
Output is correct |
164 |
Correct |
348 ms |
41628 KB |
Output is correct |
165 |
Correct |
373 ms |
41304 KB |
Output is correct |
166 |
Correct |
411 ms |
40852 KB |
Output is correct |
167 |
Correct |
72 ms |
10064 KB |
Output is correct |
168 |
Correct |
40 ms |
5580 KB |
Output is correct |
169 |
Correct |
121 ms |
14660 KB |
Output is correct |
170 |
Correct |
255 ms |
27304 KB |
Output is correct |
171 |
Correct |
357 ms |
35820 KB |
Output is correct |
172 |
Correct |
185 ms |
21288 KB |
Output is correct |
173 |
Correct |
242 ms |
25572 KB |
Output is correct |
174 |
Correct |
294 ms |
30724 KB |
Output is correct |
175 |
Correct |
339 ms |
33984 KB |
Output is correct |
176 |
Correct |
373 ms |
38344 KB |
Output is correct |
177 |
Correct |
423 ms |
42480 KB |
Output is correct |