#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define pb emplace_back
#define AI(i) begin(i), end(i)
template<class T> bool chmin(T &a, T b) { return b < a && (a = b, true); }
template<class T> bool chmax(T &a, T b) { return a < b && (a = b, true); }
#ifdef KEV
#define DE(args...) kout("[ " + string(#args) + " ] = ", args)
void kout() { cerr << endl; }
template<class T, class ...U> void kout(T a, U ...b) { cerr << a << ' ', kout(b...); }
template<class T> void debug(T l, T r) { while (l != r) cerr << *l << " \n"[next(l)==r], ++l; }
#else
#define DE(...) 0
#define debug(...) 0
#endif
const int MAX_N = 300010;
const ll inf = 1ll << 55;
int n;
int x[MAX_N], y[MAX_N];
ll dp[MAX_N * 4];
vector<pair<int,int>> edge[MAX_N * 4];
int dis(int i, int j) { return abs(x[i]-x[j]) + abs(y[i]-y[j]); }
pair<int,int> adv(int i, int dir, int j) {
int a = x[i], b = y[i];
if (dir == 0) a += j;
if (dir == 1) b += j;
if (dir == 2) a -= j;
if (dir == 3) b -= j;
return make_pair(a, b);
}
int gid(int i, int dir) { return i * 4 + dir; }
int oid[MAX_N][2][2];
void init() {
int cnt = n * 4;
for (int i = 0;i < n;++i)
for (int j =0 ;j < 2;++j)
for (int k = 0;k < 2;++k)
oid[i][j][k] = cnt++;
map<int, vector<tuple<int,int,int>>> mp;
for (int i = 0;i < n;++i) {
mp[ x[i]-y[i] ].pb( x[i], y[i], i );
}
//
// // need to modify to add
// for (auto [_, vec] : mp) {
// sort(AI(vec));
// for (int i = 0;i+1 < vec.size();++i) {
// auto [x, y, id] = vec[i];
// auto [xx, yy, idd] = vec[i+1];
// edge[ gid(id, 0) ].pb( oid[ idd ][0][0], xx-x );
// edge[ gid(id, 1) ].pb( oid[ idd ][0][0], xx-x );
// edge[ oid[id][0][0] ].pb( oid[idd][0][0], xx-x );
//
// edge[ gid(idd, 2) ].pb( oid[id][0][1], xx-x );
// edge[ gid(idd, 3) ].pb( oid[id][0][1], xx-x );
// edge[ oid[idd][0][1] ].pb( oid[id][0][1], xx-x );
// }
//
// for (int i = 0;i < vec.size();++i) {
// auto [x, y, id] = vec[i];
// edge[ oid[id][0][0] ].pb(
// }
// }
// mp.clear();
// for (int i = 0;i < n;++i) {
// mp[ x[i]+y[i] ].pb( x[i], y[i], i );
// }
//
// for (auto [_, vec] : mp) {
// sort(AI(vec));
// for (int i = 0;i+1 < vec.size();++i) {
// auto [x, y, id] = vec[i];
// auto [xx, yy, idd] = vec[i+1];
// edge[ gid(id, 0) ].pb( oid[ idd ][0][0], xx-x );
// edge[ oid[id][0][0] ].pb( oid[idd][0][0], xx-x );
//
// edge[ gid(idd, 2) ].pb( oid[id][0][1], xx-x );
// edge[ oid[idd][0][1] ].pb( oid[id][0][1], xx-x );
// }
// }
for (int i = 0;i < n;++i)
for (int j = i+1;j < n;++j) {
for (int k = 0;k < 4;++k)
for (int l = 0;l < 4;++l) {
int h = dis(i, j) / 2;
if (adv(i, k, h) == adv(j, l, h)) {
int a = i * 4 + k, b = j * 4 + l;
edge[a].pb(b, h);
edge[b].pb(a, h);
}
}
}
}
int solve(int d) {
fill(dp, dp + n * 4 * 2, inf);
//priority_queue<pair<ll,ll>, vector<pair<ll,ll>>, greater<pair<ll,ll>>> pq;
queue<pair<ll,ll>> pq;
auto upd = [&](int id, ll t) {
if (chmin(dp[id], t))
pq.emplace(t, id);
};
upd(d, 0);
while (pq.size()) {
//auto [t, id] = pq.top(); pq.pop();
auto [t, id] = pq.front(); pq.pop();
if (t != dp[id]) continue;
if (id < n * 4) for (auto [u, w] : edge[id]) {
if (w >= t)
upd(u, w);
}
else for (auto [u, w] : edge[id]) {
upd(u, w + t);
}
}
int res = 0;
for (int i = 0;i < n;++i) {
ll d = inf;
for (int j = 0;j < 4;++j)
chmin(d, dp[i * 4 + j]);
if (d < inf) ++res;
}
return res;
}
int32_t main() {
ios_base::sync_with_stdio(0), cin.tie(0);
cin >> n;
for (int i = 0;i < n;++i) cin >> x[i] >> y[i], x[i] *= 2, y[i] *= 2;
init();
int res = 1;
for (int i = 0;i < 4;++i)
chmax(res, solve(i));
cout << res << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
28456 KB |
Output is correct |
2 |
Correct |
16 ms |
28492 KB |
Output is correct |
3 |
Correct |
19 ms |
28392 KB |
Output is correct |
4 |
Correct |
16 ms |
28488 KB |
Output is correct |
5 |
Correct |
16 ms |
28416 KB |
Output is correct |
6 |
Correct |
16 ms |
28408 KB |
Output is correct |
7 |
Correct |
18 ms |
28492 KB |
Output is correct |
8 |
Correct |
19 ms |
28492 KB |
Output is correct |
9 |
Correct |
18 ms |
28492 KB |
Output is correct |
10 |
Correct |
19 ms |
28492 KB |
Output is correct |
11 |
Correct |
16 ms |
28504 KB |
Output is correct |
12 |
Correct |
20 ms |
28504 KB |
Output is correct |
13 |
Correct |
16 ms |
28492 KB |
Output is correct |
14 |
Correct |
16 ms |
28500 KB |
Output is correct |
15 |
Correct |
16 ms |
28408 KB |
Output is correct |
16 |
Correct |
16 ms |
28508 KB |
Output is correct |
17 |
Correct |
18 ms |
28428 KB |
Output is correct |
18 |
Correct |
19 ms |
28492 KB |
Output is correct |
19 |
Correct |
18 ms |
28492 KB |
Output is correct |
20 |
Correct |
17 ms |
28492 KB |
Output is correct |
21 |
Correct |
16 ms |
28492 KB |
Output is correct |
22 |
Correct |
17 ms |
28488 KB |
Output is correct |
23 |
Correct |
18 ms |
28492 KB |
Output is correct |
24 |
Correct |
18 ms |
28508 KB |
Output is correct |
25 |
Correct |
21 ms |
28476 KB |
Output is correct |
26 |
Correct |
18 ms |
28508 KB |
Output is correct |
27 |
Correct |
16 ms |
28480 KB |
Output is correct |
28 |
Correct |
16 ms |
28428 KB |
Output is correct |
29 |
Correct |
16 ms |
28456 KB |
Output is correct |
30 |
Correct |
19 ms |
28520 KB |
Output is correct |
31 |
Correct |
18 ms |
28472 KB |
Output is correct |
32 |
Correct |
16 ms |
28492 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
28456 KB |
Output is correct |
2 |
Correct |
16 ms |
28492 KB |
Output is correct |
3 |
Correct |
19 ms |
28392 KB |
Output is correct |
4 |
Correct |
16 ms |
28488 KB |
Output is correct |
5 |
Correct |
16 ms |
28416 KB |
Output is correct |
6 |
Correct |
16 ms |
28408 KB |
Output is correct |
7 |
Correct |
18 ms |
28492 KB |
Output is correct |
8 |
Correct |
19 ms |
28492 KB |
Output is correct |
9 |
Correct |
18 ms |
28492 KB |
Output is correct |
10 |
Correct |
19 ms |
28492 KB |
Output is correct |
11 |
Correct |
16 ms |
28504 KB |
Output is correct |
12 |
Correct |
20 ms |
28504 KB |
Output is correct |
13 |
Correct |
16 ms |
28492 KB |
Output is correct |
14 |
Correct |
16 ms |
28500 KB |
Output is correct |
15 |
Correct |
16 ms |
28408 KB |
Output is correct |
16 |
Correct |
16 ms |
28508 KB |
Output is correct |
17 |
Correct |
18 ms |
28428 KB |
Output is correct |
18 |
Correct |
19 ms |
28492 KB |
Output is correct |
19 |
Correct |
18 ms |
28492 KB |
Output is correct |
20 |
Correct |
17 ms |
28492 KB |
Output is correct |
21 |
Correct |
16 ms |
28492 KB |
Output is correct |
22 |
Correct |
17 ms |
28488 KB |
Output is correct |
23 |
Correct |
18 ms |
28492 KB |
Output is correct |
24 |
Correct |
18 ms |
28508 KB |
Output is correct |
25 |
Correct |
21 ms |
28476 KB |
Output is correct |
26 |
Correct |
18 ms |
28508 KB |
Output is correct |
27 |
Correct |
16 ms |
28480 KB |
Output is correct |
28 |
Correct |
16 ms |
28428 KB |
Output is correct |
29 |
Correct |
16 ms |
28456 KB |
Output is correct |
30 |
Correct |
19 ms |
28520 KB |
Output is correct |
31 |
Correct |
18 ms |
28472 KB |
Output is correct |
32 |
Correct |
16 ms |
28492 KB |
Output is correct |
33 |
Correct |
16 ms |
28500 KB |
Output is correct |
34 |
Correct |
17 ms |
28524 KB |
Output is correct |
35 |
Correct |
17 ms |
28500 KB |
Output is correct |
36 |
Correct |
17 ms |
28492 KB |
Output is correct |
37 |
Correct |
17 ms |
28492 KB |
Output is correct |
38 |
Correct |
21 ms |
28500 KB |
Output is correct |
39 |
Correct |
18 ms |
28492 KB |
Output is correct |
40 |
Correct |
18 ms |
28468 KB |
Output is correct |
41 |
Correct |
19 ms |
28500 KB |
Output is correct |
42 |
Correct |
17 ms |
28500 KB |
Output is correct |
43 |
Correct |
20 ms |
28492 KB |
Output is correct |
44 |
Correct |
17 ms |
28492 KB |
Output is correct |
45 |
Correct |
16 ms |
28620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
28428 KB |
Output is correct |
2 |
Correct |
17 ms |
28444 KB |
Output is correct |
3 |
Correct |
18 ms |
28492 KB |
Output is correct |
4 |
Correct |
19 ms |
28508 KB |
Output is correct |
5 |
Correct |
18 ms |
28492 KB |
Output is correct |
6 |
Correct |
17 ms |
28704 KB |
Output is correct |
7 |
Correct |
17 ms |
28748 KB |
Output is correct |
8 |
Correct |
17 ms |
28760 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
28456 KB |
Output is correct |
2 |
Correct |
16 ms |
28492 KB |
Output is correct |
3 |
Correct |
19 ms |
28392 KB |
Output is correct |
4 |
Correct |
16 ms |
28488 KB |
Output is correct |
5 |
Correct |
16 ms |
28416 KB |
Output is correct |
6 |
Correct |
16 ms |
28408 KB |
Output is correct |
7 |
Correct |
18 ms |
28492 KB |
Output is correct |
8 |
Correct |
19 ms |
28492 KB |
Output is correct |
9 |
Correct |
18 ms |
28492 KB |
Output is correct |
10 |
Correct |
19 ms |
28492 KB |
Output is correct |
11 |
Correct |
16 ms |
28504 KB |
Output is correct |
12 |
Correct |
20 ms |
28504 KB |
Output is correct |
13 |
Correct |
16 ms |
28492 KB |
Output is correct |
14 |
Correct |
16 ms |
28500 KB |
Output is correct |
15 |
Correct |
16 ms |
28408 KB |
Output is correct |
16 |
Correct |
16 ms |
28508 KB |
Output is correct |
17 |
Correct |
18 ms |
28428 KB |
Output is correct |
18 |
Correct |
19 ms |
28492 KB |
Output is correct |
19 |
Correct |
18 ms |
28492 KB |
Output is correct |
20 |
Correct |
17 ms |
28492 KB |
Output is correct |
21 |
Correct |
16 ms |
28492 KB |
Output is correct |
22 |
Correct |
17 ms |
28488 KB |
Output is correct |
23 |
Correct |
18 ms |
28492 KB |
Output is correct |
24 |
Correct |
18 ms |
28508 KB |
Output is correct |
25 |
Correct |
21 ms |
28476 KB |
Output is correct |
26 |
Correct |
18 ms |
28508 KB |
Output is correct |
27 |
Correct |
16 ms |
28480 KB |
Output is correct |
28 |
Correct |
16 ms |
28428 KB |
Output is correct |
29 |
Correct |
16 ms |
28456 KB |
Output is correct |
30 |
Correct |
19 ms |
28520 KB |
Output is correct |
31 |
Correct |
18 ms |
28472 KB |
Output is correct |
32 |
Correct |
16 ms |
28492 KB |
Output is correct |
33 |
Correct |
16 ms |
28500 KB |
Output is correct |
34 |
Correct |
17 ms |
28524 KB |
Output is correct |
35 |
Correct |
17 ms |
28500 KB |
Output is correct |
36 |
Correct |
17 ms |
28492 KB |
Output is correct |
37 |
Correct |
17 ms |
28492 KB |
Output is correct |
38 |
Correct |
21 ms |
28500 KB |
Output is correct |
39 |
Correct |
18 ms |
28492 KB |
Output is correct |
40 |
Correct |
18 ms |
28468 KB |
Output is correct |
41 |
Correct |
19 ms |
28500 KB |
Output is correct |
42 |
Correct |
17 ms |
28500 KB |
Output is correct |
43 |
Correct |
20 ms |
28492 KB |
Output is correct |
44 |
Correct |
17 ms |
28492 KB |
Output is correct |
45 |
Correct |
16 ms |
28620 KB |
Output is correct |
46 |
Correct |
16 ms |
28428 KB |
Output is correct |
47 |
Correct |
17 ms |
28444 KB |
Output is correct |
48 |
Correct |
18 ms |
28492 KB |
Output is correct |
49 |
Correct |
19 ms |
28508 KB |
Output is correct |
50 |
Correct |
18 ms |
28492 KB |
Output is correct |
51 |
Correct |
17 ms |
28704 KB |
Output is correct |
52 |
Correct |
17 ms |
28748 KB |
Output is correct |
53 |
Correct |
17 ms |
28760 KB |
Output is correct |
54 |
Correct |
16 ms |
28492 KB |
Output is correct |
55 |
Correct |
16 ms |
28492 KB |
Output is correct |
56 |
Correct |
17 ms |
28504 KB |
Output is correct |
57 |
Correct |
16 ms |
28496 KB |
Output is correct |
58 |
Correct |
20 ms |
28760 KB |
Output is correct |
59 |
Correct |
17 ms |
28472 KB |
Output is correct |
60 |
Correct |
20 ms |
28492 KB |
Output is correct |
61 |
Correct |
19 ms |
28492 KB |
Output is correct |
62 |
Correct |
20 ms |
28492 KB |
Output is correct |
63 |
Correct |
17 ms |
28564 KB |
Output is correct |
64 |
Correct |
20 ms |
28492 KB |
Output is correct |
65 |
Correct |
22 ms |
28492 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
28456 KB |
Output is correct |
2 |
Correct |
16 ms |
28492 KB |
Output is correct |
3 |
Correct |
19 ms |
28392 KB |
Output is correct |
4 |
Correct |
16 ms |
28488 KB |
Output is correct |
5 |
Correct |
16 ms |
28416 KB |
Output is correct |
6 |
Correct |
16 ms |
28408 KB |
Output is correct |
7 |
Correct |
18 ms |
28492 KB |
Output is correct |
8 |
Correct |
19 ms |
28492 KB |
Output is correct |
9 |
Correct |
18 ms |
28492 KB |
Output is correct |
10 |
Correct |
19 ms |
28492 KB |
Output is correct |
11 |
Correct |
16 ms |
28504 KB |
Output is correct |
12 |
Correct |
20 ms |
28504 KB |
Output is correct |
13 |
Correct |
16 ms |
28492 KB |
Output is correct |
14 |
Correct |
16 ms |
28500 KB |
Output is correct |
15 |
Correct |
16 ms |
28408 KB |
Output is correct |
16 |
Correct |
16 ms |
28508 KB |
Output is correct |
17 |
Correct |
18 ms |
28428 KB |
Output is correct |
18 |
Correct |
19 ms |
28492 KB |
Output is correct |
19 |
Correct |
18 ms |
28492 KB |
Output is correct |
20 |
Correct |
17 ms |
28492 KB |
Output is correct |
21 |
Correct |
16 ms |
28492 KB |
Output is correct |
22 |
Correct |
17 ms |
28488 KB |
Output is correct |
23 |
Correct |
18 ms |
28492 KB |
Output is correct |
24 |
Correct |
18 ms |
28508 KB |
Output is correct |
25 |
Correct |
21 ms |
28476 KB |
Output is correct |
26 |
Correct |
18 ms |
28508 KB |
Output is correct |
27 |
Correct |
16 ms |
28480 KB |
Output is correct |
28 |
Correct |
16 ms |
28428 KB |
Output is correct |
29 |
Correct |
16 ms |
28456 KB |
Output is correct |
30 |
Correct |
19 ms |
28520 KB |
Output is correct |
31 |
Correct |
18 ms |
28472 KB |
Output is correct |
32 |
Correct |
16 ms |
28492 KB |
Output is correct |
33 |
Correct |
16 ms |
28500 KB |
Output is correct |
34 |
Correct |
17 ms |
28524 KB |
Output is correct |
35 |
Correct |
17 ms |
28500 KB |
Output is correct |
36 |
Correct |
17 ms |
28492 KB |
Output is correct |
37 |
Correct |
17 ms |
28492 KB |
Output is correct |
38 |
Correct |
21 ms |
28500 KB |
Output is correct |
39 |
Correct |
18 ms |
28492 KB |
Output is correct |
40 |
Correct |
18 ms |
28468 KB |
Output is correct |
41 |
Correct |
19 ms |
28500 KB |
Output is correct |
42 |
Correct |
17 ms |
28500 KB |
Output is correct |
43 |
Correct |
20 ms |
28492 KB |
Output is correct |
44 |
Correct |
17 ms |
28492 KB |
Output is correct |
45 |
Correct |
16 ms |
28620 KB |
Output is correct |
46 |
Correct |
16 ms |
28428 KB |
Output is correct |
47 |
Correct |
17 ms |
28444 KB |
Output is correct |
48 |
Correct |
18 ms |
28492 KB |
Output is correct |
49 |
Correct |
19 ms |
28508 KB |
Output is correct |
50 |
Correct |
18 ms |
28492 KB |
Output is correct |
51 |
Correct |
17 ms |
28704 KB |
Output is correct |
52 |
Correct |
17 ms |
28748 KB |
Output is correct |
53 |
Correct |
17 ms |
28760 KB |
Output is correct |
54 |
Correct |
16 ms |
28492 KB |
Output is correct |
55 |
Correct |
16 ms |
28492 KB |
Output is correct |
56 |
Correct |
17 ms |
28504 KB |
Output is correct |
57 |
Correct |
16 ms |
28496 KB |
Output is correct |
58 |
Correct |
20 ms |
28760 KB |
Output is correct |
59 |
Correct |
17 ms |
28472 KB |
Output is correct |
60 |
Correct |
20 ms |
28492 KB |
Output is correct |
61 |
Correct |
19 ms |
28492 KB |
Output is correct |
62 |
Correct |
20 ms |
28492 KB |
Output is correct |
63 |
Correct |
17 ms |
28564 KB |
Output is correct |
64 |
Correct |
20 ms |
28492 KB |
Output is correct |
65 |
Correct |
22 ms |
28492 KB |
Output is correct |
66 |
Correct |
498 ms |
29200 KB |
Output is correct |
67 |
Correct |
517 ms |
29116 KB |
Output is correct |
68 |
Correct |
427 ms |
29084 KB |
Output is correct |
69 |
Correct |
510 ms |
34140 KB |
Output is correct |
70 |
Correct |
488 ms |
30756 KB |
Output is correct |
71 |
Correct |
496 ms |
30152 KB |
Output is correct |
72 |
Correct |
468 ms |
29304 KB |
Output is correct |
73 |
Correct |
426 ms |
29088 KB |
Output is correct |
74 |
Correct |
897 ms |
221132 KB |
Output is correct |
75 |
Correct |
1043 ms |
220852 KB |
Output is correct |
76 |
Correct |
475 ms |
34732 KB |
Output is correct |
77 |
Correct |
535 ms |
41696 KB |
Output is correct |
78 |
Correct |
514 ms |
34160 KB |
Output is correct |
79 |
Correct |
531 ms |
35136 KB |
Output is correct |
80 |
Correct |
442 ms |
29316 KB |
Output is correct |
81 |
Correct |
486 ms |
29136 KB |
Output is correct |
82 |
Correct |
752 ms |
128332 KB |
Output is correct |
83 |
Correct |
726 ms |
128292 KB |
Output is correct |
84 |
Correct |
634 ms |
78436 KB |
Output is correct |
85 |
Correct |
506 ms |
38740 KB |
Output is correct |
86 |
Correct |
521 ms |
37440 KB |
Output is correct |
87 |
Correct |
494 ms |
54264 KB |
Output is correct |
88 |
Correct |
811 ms |
215304 KB |
Output is correct |
89 |
Correct |
466 ms |
29188 KB |
Output is correct |
90 |
Correct |
484 ms |
29220 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
28456 KB |
Output is correct |
2 |
Correct |
16 ms |
28492 KB |
Output is correct |
3 |
Correct |
19 ms |
28392 KB |
Output is correct |
4 |
Correct |
16 ms |
28488 KB |
Output is correct |
5 |
Correct |
16 ms |
28416 KB |
Output is correct |
6 |
Correct |
16 ms |
28408 KB |
Output is correct |
7 |
Correct |
18 ms |
28492 KB |
Output is correct |
8 |
Correct |
19 ms |
28492 KB |
Output is correct |
9 |
Correct |
18 ms |
28492 KB |
Output is correct |
10 |
Correct |
19 ms |
28492 KB |
Output is correct |
11 |
Correct |
16 ms |
28504 KB |
Output is correct |
12 |
Correct |
20 ms |
28504 KB |
Output is correct |
13 |
Correct |
16 ms |
28492 KB |
Output is correct |
14 |
Correct |
16 ms |
28500 KB |
Output is correct |
15 |
Correct |
16 ms |
28408 KB |
Output is correct |
16 |
Correct |
16 ms |
28508 KB |
Output is correct |
17 |
Correct |
18 ms |
28428 KB |
Output is correct |
18 |
Correct |
19 ms |
28492 KB |
Output is correct |
19 |
Correct |
18 ms |
28492 KB |
Output is correct |
20 |
Correct |
17 ms |
28492 KB |
Output is correct |
21 |
Correct |
16 ms |
28492 KB |
Output is correct |
22 |
Correct |
17 ms |
28488 KB |
Output is correct |
23 |
Correct |
18 ms |
28492 KB |
Output is correct |
24 |
Correct |
18 ms |
28508 KB |
Output is correct |
25 |
Correct |
21 ms |
28476 KB |
Output is correct |
26 |
Correct |
18 ms |
28508 KB |
Output is correct |
27 |
Correct |
16 ms |
28480 KB |
Output is correct |
28 |
Correct |
16 ms |
28428 KB |
Output is correct |
29 |
Correct |
16 ms |
28456 KB |
Output is correct |
30 |
Correct |
19 ms |
28520 KB |
Output is correct |
31 |
Correct |
18 ms |
28472 KB |
Output is correct |
32 |
Correct |
16 ms |
28492 KB |
Output is correct |
33 |
Correct |
16 ms |
28500 KB |
Output is correct |
34 |
Correct |
17 ms |
28524 KB |
Output is correct |
35 |
Correct |
17 ms |
28500 KB |
Output is correct |
36 |
Correct |
17 ms |
28492 KB |
Output is correct |
37 |
Correct |
17 ms |
28492 KB |
Output is correct |
38 |
Correct |
21 ms |
28500 KB |
Output is correct |
39 |
Correct |
18 ms |
28492 KB |
Output is correct |
40 |
Correct |
18 ms |
28468 KB |
Output is correct |
41 |
Correct |
19 ms |
28500 KB |
Output is correct |
42 |
Correct |
17 ms |
28500 KB |
Output is correct |
43 |
Correct |
20 ms |
28492 KB |
Output is correct |
44 |
Correct |
17 ms |
28492 KB |
Output is correct |
45 |
Correct |
16 ms |
28620 KB |
Output is correct |
46 |
Correct |
16 ms |
28428 KB |
Output is correct |
47 |
Correct |
17 ms |
28444 KB |
Output is correct |
48 |
Correct |
18 ms |
28492 KB |
Output is correct |
49 |
Correct |
19 ms |
28508 KB |
Output is correct |
50 |
Correct |
18 ms |
28492 KB |
Output is correct |
51 |
Correct |
17 ms |
28704 KB |
Output is correct |
52 |
Correct |
17 ms |
28748 KB |
Output is correct |
53 |
Correct |
17 ms |
28760 KB |
Output is correct |
54 |
Correct |
16 ms |
28492 KB |
Output is correct |
55 |
Correct |
16 ms |
28492 KB |
Output is correct |
56 |
Correct |
17 ms |
28504 KB |
Output is correct |
57 |
Correct |
16 ms |
28496 KB |
Output is correct |
58 |
Correct |
20 ms |
28760 KB |
Output is correct |
59 |
Correct |
17 ms |
28472 KB |
Output is correct |
60 |
Correct |
20 ms |
28492 KB |
Output is correct |
61 |
Correct |
19 ms |
28492 KB |
Output is correct |
62 |
Correct |
20 ms |
28492 KB |
Output is correct |
63 |
Correct |
17 ms |
28564 KB |
Output is correct |
64 |
Correct |
20 ms |
28492 KB |
Output is correct |
65 |
Correct |
22 ms |
28492 KB |
Output is correct |
66 |
Execution timed out |
5038 ms |
37788 KB |
Time limit exceeded |
67 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
28456 KB |
Output is correct |
2 |
Correct |
16 ms |
28492 KB |
Output is correct |
3 |
Correct |
19 ms |
28392 KB |
Output is correct |
4 |
Correct |
16 ms |
28488 KB |
Output is correct |
5 |
Correct |
16 ms |
28416 KB |
Output is correct |
6 |
Correct |
16 ms |
28408 KB |
Output is correct |
7 |
Correct |
18 ms |
28492 KB |
Output is correct |
8 |
Correct |
19 ms |
28492 KB |
Output is correct |
9 |
Correct |
18 ms |
28492 KB |
Output is correct |
10 |
Correct |
19 ms |
28492 KB |
Output is correct |
11 |
Correct |
16 ms |
28504 KB |
Output is correct |
12 |
Correct |
20 ms |
28504 KB |
Output is correct |
13 |
Correct |
16 ms |
28492 KB |
Output is correct |
14 |
Correct |
16 ms |
28500 KB |
Output is correct |
15 |
Correct |
16 ms |
28408 KB |
Output is correct |
16 |
Correct |
16 ms |
28508 KB |
Output is correct |
17 |
Correct |
18 ms |
28428 KB |
Output is correct |
18 |
Correct |
19 ms |
28492 KB |
Output is correct |
19 |
Correct |
18 ms |
28492 KB |
Output is correct |
20 |
Correct |
17 ms |
28492 KB |
Output is correct |
21 |
Correct |
16 ms |
28492 KB |
Output is correct |
22 |
Correct |
17 ms |
28488 KB |
Output is correct |
23 |
Correct |
18 ms |
28492 KB |
Output is correct |
24 |
Correct |
18 ms |
28508 KB |
Output is correct |
25 |
Correct |
21 ms |
28476 KB |
Output is correct |
26 |
Correct |
18 ms |
28508 KB |
Output is correct |
27 |
Correct |
16 ms |
28480 KB |
Output is correct |
28 |
Correct |
16 ms |
28428 KB |
Output is correct |
29 |
Correct |
16 ms |
28456 KB |
Output is correct |
30 |
Correct |
19 ms |
28520 KB |
Output is correct |
31 |
Correct |
18 ms |
28472 KB |
Output is correct |
32 |
Correct |
16 ms |
28492 KB |
Output is correct |
33 |
Correct |
16 ms |
28500 KB |
Output is correct |
34 |
Correct |
17 ms |
28524 KB |
Output is correct |
35 |
Correct |
17 ms |
28500 KB |
Output is correct |
36 |
Correct |
17 ms |
28492 KB |
Output is correct |
37 |
Correct |
17 ms |
28492 KB |
Output is correct |
38 |
Correct |
21 ms |
28500 KB |
Output is correct |
39 |
Correct |
18 ms |
28492 KB |
Output is correct |
40 |
Correct |
18 ms |
28468 KB |
Output is correct |
41 |
Correct |
19 ms |
28500 KB |
Output is correct |
42 |
Correct |
17 ms |
28500 KB |
Output is correct |
43 |
Correct |
20 ms |
28492 KB |
Output is correct |
44 |
Correct |
17 ms |
28492 KB |
Output is correct |
45 |
Correct |
16 ms |
28620 KB |
Output is correct |
46 |
Correct |
16 ms |
28428 KB |
Output is correct |
47 |
Correct |
17 ms |
28444 KB |
Output is correct |
48 |
Correct |
18 ms |
28492 KB |
Output is correct |
49 |
Correct |
19 ms |
28508 KB |
Output is correct |
50 |
Correct |
18 ms |
28492 KB |
Output is correct |
51 |
Correct |
17 ms |
28704 KB |
Output is correct |
52 |
Correct |
17 ms |
28748 KB |
Output is correct |
53 |
Correct |
17 ms |
28760 KB |
Output is correct |
54 |
Correct |
16 ms |
28492 KB |
Output is correct |
55 |
Correct |
16 ms |
28492 KB |
Output is correct |
56 |
Correct |
17 ms |
28504 KB |
Output is correct |
57 |
Correct |
16 ms |
28496 KB |
Output is correct |
58 |
Correct |
20 ms |
28760 KB |
Output is correct |
59 |
Correct |
17 ms |
28472 KB |
Output is correct |
60 |
Correct |
20 ms |
28492 KB |
Output is correct |
61 |
Correct |
19 ms |
28492 KB |
Output is correct |
62 |
Correct |
20 ms |
28492 KB |
Output is correct |
63 |
Correct |
17 ms |
28564 KB |
Output is correct |
64 |
Correct |
20 ms |
28492 KB |
Output is correct |
65 |
Correct |
22 ms |
28492 KB |
Output is correct |
66 |
Correct |
498 ms |
29200 KB |
Output is correct |
67 |
Correct |
517 ms |
29116 KB |
Output is correct |
68 |
Correct |
427 ms |
29084 KB |
Output is correct |
69 |
Correct |
510 ms |
34140 KB |
Output is correct |
70 |
Correct |
488 ms |
30756 KB |
Output is correct |
71 |
Correct |
496 ms |
30152 KB |
Output is correct |
72 |
Correct |
468 ms |
29304 KB |
Output is correct |
73 |
Correct |
426 ms |
29088 KB |
Output is correct |
74 |
Correct |
897 ms |
221132 KB |
Output is correct |
75 |
Correct |
1043 ms |
220852 KB |
Output is correct |
76 |
Correct |
475 ms |
34732 KB |
Output is correct |
77 |
Correct |
535 ms |
41696 KB |
Output is correct |
78 |
Correct |
514 ms |
34160 KB |
Output is correct |
79 |
Correct |
531 ms |
35136 KB |
Output is correct |
80 |
Correct |
442 ms |
29316 KB |
Output is correct |
81 |
Correct |
486 ms |
29136 KB |
Output is correct |
82 |
Correct |
752 ms |
128332 KB |
Output is correct |
83 |
Correct |
726 ms |
128292 KB |
Output is correct |
84 |
Correct |
634 ms |
78436 KB |
Output is correct |
85 |
Correct |
506 ms |
38740 KB |
Output is correct |
86 |
Correct |
521 ms |
37440 KB |
Output is correct |
87 |
Correct |
494 ms |
54264 KB |
Output is correct |
88 |
Correct |
811 ms |
215304 KB |
Output is correct |
89 |
Correct |
466 ms |
29188 KB |
Output is correct |
90 |
Correct |
484 ms |
29220 KB |
Output is correct |
91 |
Execution timed out |
5038 ms |
37788 KB |
Time limit exceeded |
92 |
Halted |
0 ms |
0 KB |
- |