#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include <bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
static char buf[1000 << 20];
void* operator new(size_t s) {
static size_t i = sizeof buf;
assert(s < i);
return (void*)&buf[i -= s];
}
void operator delete(void*) {}
const int UNTIL = 3000001;
vector<int> dx = {-1, 1, 0, 0}, dy = {0, 0, -1, 1};
int csqrt[UNTIL], fsqrt[UNTIL];
void init() {
csqrt[1] = fsqrt[1] = 1;
for (int i = 2; i < UNTIL; ++i) {
fsqrt[i] = fsqrt[i - 1];
while ((fsqrt[i] + 1) * (fsqrt[i] + 1) <= i) ++fsqrt[i];
csqrt[i] = fsqrt[i];
if (fsqrt[i] * fsqrt[i] < i) ++csqrt[i];
}
}
struct VEB {
int u, mn, mx, sz;
VEB *summary;
vector<VEB*> galaxy;
inline int high(int k) { return k / sz; }
inline int low(int k) { return k % sz; }
inline int index(int k, int kk) { return k * sz + kk; }
VEB(int u) : u(u) {
mn = INT_MAX, mx = INT_MIN;
if (u <= 2) summary = nullptr, galaxy.resize(0, nullptr);
else {
int ngalaxy = csqrt[u];
sz = (u + ngalaxy - 1) / ngalaxy;
summary = new VEB(ngalaxy);
galaxy.resize(ngalaxy, nullptr);
for (int i = 0; i < ngalaxy - 1; ++i) galaxy[i] = new VEB(sz);
galaxy[ngalaxy - 1] = new VEB(u - (ngalaxy - 1) * sz);
}
}
void insert(int x) {
if (mn == INT_MAX) mn = mx = x;
else {
if (x < mn) swap(x, mn);
if (x > mx) mx = x;
if (u <= 2) return;
int i = high(x), j = low(x);
if (galaxy[i]->mn == INT_MAX) summary->insert(i);
galaxy[i]->insert(j);
}
}
void erase(int x) {
if (mn == INT_MAX) return;
if (mn == mx) {
mn = INT_MAX, mx = INT_MIN;
return;
}
if (u <= 2) {
if (x != mx) mn = mx;
else if (x == mn) mn = INT_MAX, mx = INT_MIN;
else if (x == 0) mn = 1;
else mx = 0;
return;
}
if (x == mn) {
int i = summary->mn;
if (i == INT_MAX) {
mn = INT_MAX, mx = INT_MIN;
return;
}
x = mn = index(i, galaxy[i]->mn);
}
int i = high(x), j = low(x);
galaxy[i]->erase(j);
if (galaxy[i]->mn == INT_MAX) summary->erase(i);
if (x == mx) {
if (summary->mx == INT_MIN) mx = mn;
else {
i = summary->mx;
mx = index(i, galaxy[i]->mx);
}
}
}
int lower_bound(int x) {
if (x <= mn) return mn;
if (u <= 2) {
if (x <= mx) return mx;
return INT_MAX;
}
int i = high(x), j = low(x);
if (j <= galaxy[i]->mx) j = galaxy[i]->lower_bound(j);
else {
i = summary->lower_bound(i + 1);
j = galaxy[i]->mn;
}
return index(i, j);
}
};
VEB* build_veb(int u) {
VEB* root = new VEB(u);
for (int i = 0; i < u; ++i) root->insert(i);
return root;
}
struct Sustree {
int n, m;
vector<VEB*> has;
Sustree() {}
Sustree(int n, int m) : n(n), m(m), has(2 * n, nullptr) {}
inline void build() {
for (int i = 1; i < 2 * n; ++i) has[i] = build_veb(m + 1);
}
inline void upd(int x, int y) {
has[x += n]->erase(y);
for (; x > 1; x >>= 1)
if (has[x]->lower_bound(y) != y && has[x ^ 1]->lower_bound(y) != y)
has[x >> 1]->erase(y);
}
inline pii qry(int x1, int y1, int x2, int y2) {
x1 = max(x1, 0), y1 = max(y1, 0), x2 = min(x2, n - 1), y2 = min(y2, m - 1);
int l = x1, r = x2 + 1, idx = -1;
for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
if (l & 1) {
if (has[l]->lower_bound(y1) <= y2) {
idx = l;
break;
}
l++;
}
if (r & 1) {
--r;
if (has[r]->lower_bound(y1) <= y2) {
idx = r;
break;
}
}
}
if (idx < 0) return {-1, -1};
while (idx < n) {
idx <<= 1;
if (has[idx]->lower_bound(y1) > y2) ++idx;
}
return {idx - n, has[idx]->lower_bound(y1)};
}
};
int main() {
init();
ios_base::sync_with_stdio(false); cin.tie(NULL);
int r, c, n; cin >> r >> c >> n;
int sx, sy; cin >> sx >> sy; --sx, --sy;
int gx, gy; cin >> gx >> gy; --gx, --gy;
vector<string> arr(r);
for (int i = 0; i < r; ++i) cin >> arr[i];
if (r > c) {
vector<string> arr2(c);
for (int i = 0; i < r; ++i) {
for (int j = 0; j < c; ++j) {
arr2[j] += arr[i][j];
}
}
swap(arr, arr2);
swap(r, c);
swap(sx, sy);
swap(gx, gy);
}
// . = empty
// # = wall
Sustree sus(r, c); sus.build();
// cout << sus.qry(1, 0, 1, 0).first << endl;
// exit(0);
vector<vector<int>> dists(r, vector<int>(c, INT_MAX));
dists[sx][sy] = 0;
sus.upd(sx, sy);
vector<pii> q; q.push_back({sx, sy});
queue<pii> rq; for (pii _p : q) rq.push(_p);
while (rq.size()) {
pii front = rq.front(); rq.pop();
int xx = front.first, yy = front.second;
for (int d = 0; d < 4; ++d) {
int nx = xx + dx[d], ny = yy + dy[d];
if (nx < 0 || ny < 0 || nx >= r || ny >= c) continue;
if (dists[nx][ny] < INT_MAX || arr[nx][ny] == '#') continue;
rq.push({nx, ny});
q.push_back({nx, ny});
dists[nx][ny] = dists[xx][yy];
sus.upd(nx, ny);
}
}
while (q.size()) {
// cout << "part 1 " << endl;
vector<pii> nq;
for (pii p : q) {
// cout << p.first << ' ' << p.second << "s" << endl;
int x = p.first, y = p.second;
if (x > 0 && dists[x - 1][y] <= dists[x][y]) {
// query down:
int cur;
while ((cur = sus.qry(x + n, y - n + 1, x + n, y + n - 1).second) != -1) {
nq.push_back({x + n, cur});
dists[x + n][cur] = dists[x][y] + 1;
sus.upd(x + n, cur);
}
if (x + n - 1 < r && y - n >= 0 && dists[x + n - 1][y - n] == INT_MAX) {
nq.push_back({x + n - 1, y - n});
dists[x + n - 1][y - n] = dists[x][y] + 1;
sus.upd(x + n - 1, y - n);
}
if (x + n - 1 < r && y + n < c && dists[x + n - 1][y + n] == INT_MAX) {
nq.push_back({x + n - 1, y + n});
dists[x + n - 1][y + n] = dists[x][y] + 1;
sus.upd(x + n - 1, y + n);
}
} else if (y < r - 1 && dists[x][y + 1] <= dists[x][y]) {
// query left:
int cur;
while ((cur = sus.qry(x - n + 1, y - n, x + n - 1, y - n).first) != -1) {
nq.push_back({cur, y - n});
dists[cur][y - n] = dists[x][y] + 1;
sus.upd(cur, y - n);
}
if (y - n + 1 >= 0 && x - n >= 0 && dists[x - n][y - n + 1] == INT_MAX) {
nq.push_back({x - n, y - n + 1});
dists[x - n][y - n + 1] = dists[x][y] + 1;
sus.upd(x - n, y - n + 1);
}
if (y - n + 1 >= 0 && x + n < r && dists[x + n][y - n + 1] == INT_MAX) {
nq.push_back({x + n, y - n + 1});
dists[x + n][y - n + 1] = dists[x][y] + 1;
sus.upd(x + n, y - n + 1);
}
} else {
// query all:
// cout << p.first << ' ' << p.second << "m" << endl;
for (int i = -n; i <= n; i += 2 * n) {
int cx = x + i, cyl = y - n + 1, cyr = y + n - 1, cur;
while ((cur = sus.qry(cx, cyl, cx, cyr).second) != -1) {
nq.push_back({cx, cur});
dists[cx][cur] = dists[x][y] + 1;
sus.upd(cx, cur);
}
}
pii cur;
while ((cur = sus.qry(x - n + 1, y - n, x + n - 1, y + n)).first != -1) {
// cout << cur.first << ' ' << cur.second << endl;
int nx = cur.first, ny = cur.second;
nq.push_back({nx, ny});
dists[nx][ny] = dists[x][y] + 1;
sus.upd(nx, ny);
}
}
// cout << p.first << ' ' << p.second << "e" << endl;
}
queue<pii> rq; for (pii _p : nq) rq.push(_p);
while (rq.size()) {
pii front = rq.front(); rq.pop();
int xx = front.first, yy = front.second;
for (int d = 0; d < 4; ++d) {
int nx = xx + dx[d], ny = yy + dy[d];
if (nx < 0 || ny < 0 || nx >= r || ny >= c) continue;
if (dists[nx][ny] < INT_MAX || arr[nx][ny] == '#') continue;
rq.push({nx, ny});
nq.push_back({nx, ny});
dists[nx][ny] = dists[xx][yy];
sus.upd(nx, ny);
}
}
q = nq;
}
cout << dists[gx][gy] << '\n';
return 0;
}
Compilation message
Main.cpp:21:5: warning: built-in function 'csqrt' declared as non-function [-Wbuiltin-declaration-mismatch]
21 | int csqrt[UNTIL], fsqrt[UNTIL];
| ^~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
23764 KB |
Output is correct |
2 |
Correct |
17 ms |
23764 KB |
Output is correct |
3 |
Correct |
16 ms |
23944 KB |
Output is correct |
4 |
Correct |
16 ms |
24004 KB |
Output is correct |
5 |
Correct |
16 ms |
24012 KB |
Output is correct |
6 |
Correct |
16 ms |
23988 KB |
Output is correct |
7 |
Correct |
16 ms |
23872 KB |
Output is correct |
8 |
Correct |
16 ms |
24148 KB |
Output is correct |
9 |
Correct |
16 ms |
23764 KB |
Output is correct |
10 |
Correct |
16 ms |
23800 KB |
Output is correct |
11 |
Correct |
15 ms |
23792 KB |
Output is correct |
12 |
Correct |
16 ms |
23764 KB |
Output is correct |
13 |
Correct |
15 ms |
23852 KB |
Output is correct |
14 |
Correct |
16 ms |
23756 KB |
Output is correct |
15 |
Correct |
16 ms |
23836 KB |
Output is correct |
16 |
Correct |
16 ms |
23988 KB |
Output is correct |
17 |
Correct |
16 ms |
23904 KB |
Output is correct |
18 |
Correct |
16 ms |
24020 KB |
Output is correct |
19 |
Correct |
46 ms |
34900 KB |
Output is correct |
20 |
Correct |
34 ms |
50088 KB |
Output is correct |
21 |
Correct |
43 ms |
34376 KB |
Output is correct |
22 |
Correct |
49 ms |
34900 KB |
Output is correct |
23 |
Correct |
46 ms |
35020 KB |
Output is correct |
24 |
Correct |
27 ms |
30804 KB |
Output is correct |
25 |
Correct |
42 ms |
61596 KB |
Output is correct |
26 |
Correct |
51 ms |
34760 KB |
Output is correct |
27 |
Correct |
49 ms |
34620 KB |
Output is correct |
28 |
Correct |
41 ms |
34740 KB |
Output is correct |
29 |
Correct |
102 ms |
53692 KB |
Output is correct |
30 |
Correct |
42 ms |
37024 KB |
Output is correct |
31 |
Correct |
107 ms |
53152 KB |
Output is correct |
32 |
Correct |
119 ms |
53468 KB |
Output is correct |
33 |
Correct |
102 ms |
53964 KB |
Output is correct |
34 |
Correct |
55 ms |
42388 KB |
Output is correct |
35 |
Correct |
69 ms |
118496 KB |
Output is correct |
36 |
Correct |
112 ms |
53120 KB |
Output is correct |
37 |
Correct |
121 ms |
53136 KB |
Output is correct |
38 |
Correct |
97 ms |
53324 KB |
Output is correct |
39 |
Correct |
1426 ms |
340312 KB |
Output is correct |
40 |
Correct |
116 ms |
64820 KB |
Output is correct |
41 |
Correct |
64 ms |
60760 KB |
Output is correct |
42 |
Correct |
174 ms |
68632 KB |
Output is correct |
43 |
Correct |
122 ms |
91036 KB |
Output is correct |
44 |
Correct |
370 ms |
169776 KB |
Output is correct |
45 |
Correct |
418 ms |
213132 KB |
Output is correct |
46 |
Correct |
1234 ms |
336408 KB |
Output is correct |
47 |
Correct |
1462 ms |
339996 KB |
Output is correct |
48 |
Correct |
1326 ms |
344864 KB |
Output is correct |
49 |
Correct |
289 ms |
221908 KB |
Output is correct |
50 |
Correct |
641 ms |
918784 KB |
Output is correct |
51 |
Correct |
1834 ms |
340620 KB |
Output is correct |
52 |
Correct |
1628 ms |
341128 KB |
Output is correct |
53 |
Correct |
1341 ms |
341524 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
23764 KB |
Output is correct |
2 |
Correct |
15 ms |
23708 KB |
Output is correct |
3 |
Correct |
16 ms |
23764 KB |
Output is correct |
4 |
Correct |
16 ms |
23764 KB |
Output is correct |
5 |
Correct |
16 ms |
24020 KB |
Output is correct |
6 |
Correct |
16 ms |
23764 KB |
Output is correct |
7 |
Correct |
17 ms |
23764 KB |
Output is correct |
8 |
Correct |
17 ms |
23764 KB |
Output is correct |
9 |
Correct |
17 ms |
24000 KB |
Output is correct |
10 |
Correct |
16 ms |
23924 KB |
Output is correct |
11 |
Correct |
18 ms |
23908 KB |
Output is correct |
12 |
Correct |
16 ms |
23984 KB |
Output is correct |
13 |
Correct |
19 ms |
23892 KB |
Output is correct |
14 |
Correct |
15 ms |
23960 KB |
Output is correct |
15 |
Correct |
15 ms |
23836 KB |
Output is correct |
16 |
Correct |
15 ms |
24276 KB |
Output is correct |
17 |
Correct |
17 ms |
23952 KB |
Output is correct |
18 |
Correct |
16 ms |
23736 KB |
Output is correct |
19 |
Correct |
17 ms |
23948 KB |
Output is correct |
20 |
Correct |
15 ms |
23800 KB |
Output is correct |
21 |
Correct |
14 ms |
23736 KB |
Output is correct |
22 |
Correct |
15 ms |
23880 KB |
Output is correct |
23 |
Correct |
15 ms |
23764 KB |
Output is correct |
24 |
Correct |
15 ms |
23744 KB |
Output is correct |
25 |
Correct |
15 ms |
23764 KB |
Output is correct |
26 |
Correct |
15 ms |
23828 KB |
Output is correct |
27 |
Correct |
15 ms |
23856 KB |
Output is correct |
28 |
Correct |
15 ms |
23920 KB |
Output is correct |
29 |
Correct |
15 ms |
23764 KB |
Output is correct |
30 |
Correct |
15 ms |
23912 KB |
Output is correct |
31 |
Correct |
15 ms |
23900 KB |
Output is correct |
32 |
Correct |
16 ms |
24020 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
23680 KB |
Output is correct |
2 |
Correct |
16 ms |
23692 KB |
Output is correct |
3 |
Correct |
16 ms |
23796 KB |
Output is correct |
4 |
Correct |
15 ms |
23732 KB |
Output is correct |
5 |
Correct |
19 ms |
23704 KB |
Output is correct |
6 |
Correct |
15 ms |
23752 KB |
Output is correct |
7 |
Correct |
16 ms |
23936 KB |
Output is correct |
8 |
Correct |
16 ms |
23928 KB |
Output is correct |
9 |
Correct |
18 ms |
23972 KB |
Output is correct |
10 |
Correct |
16 ms |
23896 KB |
Output is correct |
11 |
Correct |
16 ms |
23940 KB |
Output is correct |
12 |
Correct |
16 ms |
23864 KB |
Output is correct |
13 |
Correct |
16 ms |
23768 KB |
Output is correct |
14 |
Correct |
16 ms |
23880 KB |
Output is correct |
15 |
Correct |
15 ms |
23744 KB |
Output is correct |
16 |
Correct |
16 ms |
23920 KB |
Output is correct |
17 |
Correct |
15 ms |
23768 KB |
Output is correct |
18 |
Correct |
17 ms |
23756 KB |
Output is correct |
19 |
Correct |
16 ms |
23764 KB |
Output is correct |
20 |
Correct |
16 ms |
23836 KB |
Output is correct |
21 |
Correct |
16 ms |
24012 KB |
Output is correct |
22 |
Correct |
16 ms |
23892 KB |
Output is correct |
23 |
Correct |
19 ms |
23976 KB |
Output is correct |
24 |
Correct |
20 ms |
24252 KB |
Output is correct |
25 |
Correct |
41 ms |
33240 KB |
Output is correct |
26 |
Correct |
51 ms |
34876 KB |
Output is correct |
27 |
Correct |
45 ms |
34376 KB |
Output is correct |
28 |
Correct |
46 ms |
34348 KB |
Output is correct |
29 |
Correct |
35 ms |
34852 KB |
Output is correct |
30 |
Correct |
36 ms |
34764 KB |
Output is correct |
31 |
Correct |
39 ms |
36660 KB |
Output is correct |
32 |
Correct |
53 ms |
34744 KB |
Output is correct |
33 |
Correct |
61 ms |
34732 KB |
Output is correct |
34 |
Correct |
128 ms |
52116 KB |
Output is correct |
35 |
Correct |
110 ms |
53072 KB |
Output is correct |
36 |
Correct |
96 ms |
53112 KB |
Output is correct |
37 |
Correct |
84 ms |
54336 KB |
Output is correct |
38 |
Correct |
71 ms |
54308 KB |
Output is correct |
39 |
Correct |
408 ms |
126184 KB |
Output is correct |
40 |
Correct |
1173 ms |
305300 KB |
Output is correct |
41 |
Correct |
1298 ms |
336440 KB |
Output is correct |
42 |
Correct |
1132 ms |
336448 KB |
Output is correct |
43 |
Correct |
660 ms |
348380 KB |
Output is correct |
44 |
Correct |
756 ms |
348432 KB |
Output is correct |
45 |
Correct |
993 ms |
372980 KB |
Output is correct |
46 |
Correct |
938 ms |
358304 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
23764 KB |
Output is correct |
2 |
Correct |
15 ms |
23708 KB |
Output is correct |
3 |
Correct |
16 ms |
23764 KB |
Output is correct |
4 |
Correct |
16 ms |
23764 KB |
Output is correct |
5 |
Correct |
16 ms |
24020 KB |
Output is correct |
6 |
Correct |
16 ms |
23764 KB |
Output is correct |
7 |
Correct |
17 ms |
23764 KB |
Output is correct |
8 |
Correct |
17 ms |
23764 KB |
Output is correct |
9 |
Correct |
17 ms |
24000 KB |
Output is correct |
10 |
Correct |
16 ms |
23924 KB |
Output is correct |
11 |
Correct |
18 ms |
23908 KB |
Output is correct |
12 |
Correct |
16 ms |
23984 KB |
Output is correct |
13 |
Correct |
19 ms |
23892 KB |
Output is correct |
14 |
Correct |
15 ms |
23960 KB |
Output is correct |
15 |
Correct |
15 ms |
23836 KB |
Output is correct |
16 |
Correct |
15 ms |
24276 KB |
Output is correct |
17 |
Correct |
17 ms |
23952 KB |
Output is correct |
18 |
Correct |
16 ms |
23736 KB |
Output is correct |
19 |
Correct |
17 ms |
23948 KB |
Output is correct |
20 |
Correct |
15 ms |
23800 KB |
Output is correct |
21 |
Correct |
14 ms |
23736 KB |
Output is correct |
22 |
Correct |
15 ms |
23880 KB |
Output is correct |
23 |
Correct |
15 ms |
23764 KB |
Output is correct |
24 |
Correct |
15 ms |
23744 KB |
Output is correct |
25 |
Correct |
15 ms |
23764 KB |
Output is correct |
26 |
Correct |
15 ms |
23828 KB |
Output is correct |
27 |
Correct |
15 ms |
23856 KB |
Output is correct |
28 |
Correct |
15 ms |
23920 KB |
Output is correct |
29 |
Correct |
15 ms |
23764 KB |
Output is correct |
30 |
Correct |
15 ms |
23912 KB |
Output is correct |
31 |
Correct |
15 ms |
23900 KB |
Output is correct |
32 |
Correct |
16 ms |
24020 KB |
Output is correct |
33 |
Correct |
59 ms |
34876 KB |
Output is correct |
34 |
Correct |
18 ms |
24304 KB |
Output is correct |
35 |
Correct |
20 ms |
25172 KB |
Output is correct |
36 |
Correct |
47 ms |
33240 KB |
Output is correct |
37 |
Correct |
39 ms |
50068 KB |
Output is correct |
38 |
Correct |
50 ms |
34948 KB |
Output is correct |
39 |
Correct |
44 ms |
34328 KB |
Output is correct |
40 |
Correct |
60 ms |
34888 KB |
Output is correct |
41 |
Correct |
48 ms |
34992 KB |
Output is correct |
42 |
Correct |
50 ms |
34272 KB |
Output is correct |
43 |
Correct |
41 ms |
34780 KB |
Output is correct |
44 |
Correct |
35 ms |
34816 KB |
Output is correct |
45 |
Correct |
26 ms |
30804 KB |
Output is correct |
46 |
Correct |
40 ms |
61548 KB |
Output is correct |
47 |
Correct |
35 ms |
37512 KB |
Output is correct |
48 |
Correct |
55 ms |
38692 KB |
Output is correct |
49 |
Correct |
48 ms |
40340 KB |
Output is correct |
50 |
Correct |
36 ms |
36684 KB |
Output is correct |
51 |
Correct |
40 ms |
36648 KB |
Output is correct |
52 |
Correct |
50 ms |
34764 KB |
Output is correct |
53 |
Correct |
52 ms |
34672 KB |
Output is correct |
54 |
Correct |
42 ms |
34720 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
23764 KB |
Output is correct |
2 |
Correct |
15 ms |
23708 KB |
Output is correct |
3 |
Correct |
16 ms |
23764 KB |
Output is correct |
4 |
Correct |
16 ms |
23764 KB |
Output is correct |
5 |
Correct |
16 ms |
24020 KB |
Output is correct |
6 |
Correct |
16 ms |
23764 KB |
Output is correct |
7 |
Correct |
17 ms |
23764 KB |
Output is correct |
8 |
Correct |
17 ms |
23764 KB |
Output is correct |
9 |
Correct |
17 ms |
24000 KB |
Output is correct |
10 |
Correct |
16 ms |
23924 KB |
Output is correct |
11 |
Correct |
18 ms |
23908 KB |
Output is correct |
12 |
Correct |
16 ms |
23984 KB |
Output is correct |
13 |
Correct |
19 ms |
23892 KB |
Output is correct |
14 |
Correct |
15 ms |
23960 KB |
Output is correct |
15 |
Correct |
15 ms |
23836 KB |
Output is correct |
16 |
Correct |
15 ms |
24276 KB |
Output is correct |
17 |
Correct |
17 ms |
23952 KB |
Output is correct |
18 |
Correct |
16 ms |
23736 KB |
Output is correct |
19 |
Correct |
17 ms |
23948 KB |
Output is correct |
20 |
Correct |
15 ms |
23800 KB |
Output is correct |
21 |
Correct |
14 ms |
23736 KB |
Output is correct |
22 |
Correct |
15 ms |
23880 KB |
Output is correct |
23 |
Correct |
15 ms |
23764 KB |
Output is correct |
24 |
Correct |
15 ms |
23744 KB |
Output is correct |
25 |
Correct |
15 ms |
23764 KB |
Output is correct |
26 |
Correct |
15 ms |
23828 KB |
Output is correct |
27 |
Correct |
15 ms |
23856 KB |
Output is correct |
28 |
Correct |
15 ms |
23920 KB |
Output is correct |
29 |
Correct |
15 ms |
23764 KB |
Output is correct |
30 |
Correct |
15 ms |
23912 KB |
Output is correct |
31 |
Correct |
15 ms |
23900 KB |
Output is correct |
32 |
Correct |
16 ms |
24020 KB |
Output is correct |
33 |
Correct |
59 ms |
34876 KB |
Output is correct |
34 |
Correct |
18 ms |
24304 KB |
Output is correct |
35 |
Correct |
20 ms |
25172 KB |
Output is correct |
36 |
Correct |
47 ms |
33240 KB |
Output is correct |
37 |
Correct |
39 ms |
50068 KB |
Output is correct |
38 |
Correct |
50 ms |
34948 KB |
Output is correct |
39 |
Correct |
44 ms |
34328 KB |
Output is correct |
40 |
Correct |
60 ms |
34888 KB |
Output is correct |
41 |
Correct |
48 ms |
34992 KB |
Output is correct |
42 |
Correct |
50 ms |
34272 KB |
Output is correct |
43 |
Correct |
41 ms |
34780 KB |
Output is correct |
44 |
Correct |
35 ms |
34816 KB |
Output is correct |
45 |
Correct |
26 ms |
30804 KB |
Output is correct |
46 |
Correct |
40 ms |
61548 KB |
Output is correct |
47 |
Correct |
35 ms |
37512 KB |
Output is correct |
48 |
Correct |
55 ms |
38692 KB |
Output is correct |
49 |
Correct |
48 ms |
40340 KB |
Output is correct |
50 |
Correct |
36 ms |
36684 KB |
Output is correct |
51 |
Correct |
40 ms |
36648 KB |
Output is correct |
52 |
Correct |
50 ms |
34764 KB |
Output is correct |
53 |
Correct |
52 ms |
34672 KB |
Output is correct |
54 |
Correct |
42 ms |
34720 KB |
Output is correct |
55 |
Correct |
113 ms |
53720 KB |
Output is correct |
56 |
Correct |
36 ms |
37016 KB |
Output is correct |
57 |
Correct |
108 ms |
52092 KB |
Output is correct |
58 |
Correct |
87 ms |
56740 KB |
Output is correct |
59 |
Correct |
118 ms |
53068 KB |
Output is correct |
60 |
Correct |
117 ms |
53476 KB |
Output is correct |
61 |
Correct |
107 ms |
53964 KB |
Output is correct |
62 |
Correct |
97 ms |
53176 KB |
Output is correct |
63 |
Correct |
73 ms |
54360 KB |
Output is correct |
64 |
Correct |
71 ms |
54384 KB |
Output is correct |
65 |
Correct |
43 ms |
42316 KB |
Output is correct |
66 |
Correct |
69 ms |
118552 KB |
Output is correct |
67 |
Correct |
72 ms |
58592 KB |
Output is correct |
68 |
Correct |
92 ms |
61848 KB |
Output is correct |
69 |
Correct |
95 ms |
60796 KB |
Output is correct |
70 |
Correct |
115 ms |
63872 KB |
Output is correct |
71 |
Correct |
89 ms |
56088 KB |
Output is correct |
72 |
Correct |
115 ms |
53076 KB |
Output is correct |
73 |
Correct |
126 ms |
53208 KB |
Output is correct |
74 |
Correct |
121 ms |
53276 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
23764 KB |
Output is correct |
2 |
Correct |
17 ms |
23764 KB |
Output is correct |
3 |
Correct |
16 ms |
23944 KB |
Output is correct |
4 |
Correct |
16 ms |
24004 KB |
Output is correct |
5 |
Correct |
16 ms |
24012 KB |
Output is correct |
6 |
Correct |
16 ms |
23988 KB |
Output is correct |
7 |
Correct |
16 ms |
23872 KB |
Output is correct |
8 |
Correct |
16 ms |
24148 KB |
Output is correct |
9 |
Correct |
16 ms |
23764 KB |
Output is correct |
10 |
Correct |
16 ms |
23800 KB |
Output is correct |
11 |
Correct |
15 ms |
23792 KB |
Output is correct |
12 |
Correct |
16 ms |
23764 KB |
Output is correct |
13 |
Correct |
15 ms |
23852 KB |
Output is correct |
14 |
Correct |
16 ms |
23756 KB |
Output is correct |
15 |
Correct |
16 ms |
23836 KB |
Output is correct |
16 |
Correct |
16 ms |
23988 KB |
Output is correct |
17 |
Correct |
16 ms |
23904 KB |
Output is correct |
18 |
Correct |
16 ms |
24020 KB |
Output is correct |
19 |
Correct |
46 ms |
34900 KB |
Output is correct |
20 |
Correct |
34 ms |
50088 KB |
Output is correct |
21 |
Correct |
43 ms |
34376 KB |
Output is correct |
22 |
Correct |
49 ms |
34900 KB |
Output is correct |
23 |
Correct |
46 ms |
35020 KB |
Output is correct |
24 |
Correct |
27 ms |
30804 KB |
Output is correct |
25 |
Correct |
42 ms |
61596 KB |
Output is correct |
26 |
Correct |
51 ms |
34760 KB |
Output is correct |
27 |
Correct |
49 ms |
34620 KB |
Output is correct |
28 |
Correct |
41 ms |
34740 KB |
Output is correct |
29 |
Correct |
102 ms |
53692 KB |
Output is correct |
30 |
Correct |
42 ms |
37024 KB |
Output is correct |
31 |
Correct |
107 ms |
53152 KB |
Output is correct |
32 |
Correct |
119 ms |
53468 KB |
Output is correct |
33 |
Correct |
102 ms |
53964 KB |
Output is correct |
34 |
Correct |
55 ms |
42388 KB |
Output is correct |
35 |
Correct |
69 ms |
118496 KB |
Output is correct |
36 |
Correct |
112 ms |
53120 KB |
Output is correct |
37 |
Correct |
121 ms |
53136 KB |
Output is correct |
38 |
Correct |
97 ms |
53324 KB |
Output is correct |
39 |
Correct |
1426 ms |
340312 KB |
Output is correct |
40 |
Correct |
116 ms |
64820 KB |
Output is correct |
41 |
Correct |
64 ms |
60760 KB |
Output is correct |
42 |
Correct |
174 ms |
68632 KB |
Output is correct |
43 |
Correct |
122 ms |
91036 KB |
Output is correct |
44 |
Correct |
370 ms |
169776 KB |
Output is correct |
45 |
Correct |
418 ms |
213132 KB |
Output is correct |
46 |
Correct |
1234 ms |
336408 KB |
Output is correct |
47 |
Correct |
1462 ms |
339996 KB |
Output is correct |
48 |
Correct |
1326 ms |
344864 KB |
Output is correct |
49 |
Correct |
289 ms |
221908 KB |
Output is correct |
50 |
Correct |
641 ms |
918784 KB |
Output is correct |
51 |
Correct |
1834 ms |
340620 KB |
Output is correct |
52 |
Correct |
1628 ms |
341128 KB |
Output is correct |
53 |
Correct |
1341 ms |
341524 KB |
Output is correct |
54 |
Correct |
15 ms |
23764 KB |
Output is correct |
55 |
Correct |
15 ms |
23708 KB |
Output is correct |
56 |
Correct |
16 ms |
23764 KB |
Output is correct |
57 |
Correct |
16 ms |
23764 KB |
Output is correct |
58 |
Correct |
16 ms |
24020 KB |
Output is correct |
59 |
Correct |
16 ms |
23764 KB |
Output is correct |
60 |
Correct |
17 ms |
23764 KB |
Output is correct |
61 |
Correct |
17 ms |
23764 KB |
Output is correct |
62 |
Correct |
17 ms |
24000 KB |
Output is correct |
63 |
Correct |
16 ms |
23924 KB |
Output is correct |
64 |
Correct |
18 ms |
23908 KB |
Output is correct |
65 |
Correct |
16 ms |
23984 KB |
Output is correct |
66 |
Correct |
19 ms |
23892 KB |
Output is correct |
67 |
Correct |
15 ms |
23960 KB |
Output is correct |
68 |
Correct |
15 ms |
23836 KB |
Output is correct |
69 |
Correct |
15 ms |
24276 KB |
Output is correct |
70 |
Correct |
17 ms |
23952 KB |
Output is correct |
71 |
Correct |
16 ms |
23736 KB |
Output is correct |
72 |
Correct |
17 ms |
23948 KB |
Output is correct |
73 |
Correct |
15 ms |
23800 KB |
Output is correct |
74 |
Correct |
14 ms |
23736 KB |
Output is correct |
75 |
Correct |
15 ms |
23880 KB |
Output is correct |
76 |
Correct |
15 ms |
23764 KB |
Output is correct |
77 |
Correct |
15 ms |
23744 KB |
Output is correct |
78 |
Correct |
15 ms |
23764 KB |
Output is correct |
79 |
Correct |
15 ms |
23828 KB |
Output is correct |
80 |
Correct |
15 ms |
23856 KB |
Output is correct |
81 |
Correct |
15 ms |
23920 KB |
Output is correct |
82 |
Correct |
15 ms |
23764 KB |
Output is correct |
83 |
Correct |
15 ms |
23912 KB |
Output is correct |
84 |
Correct |
15 ms |
23900 KB |
Output is correct |
85 |
Correct |
16 ms |
24020 KB |
Output is correct |
86 |
Correct |
16 ms |
23680 KB |
Output is correct |
87 |
Correct |
16 ms |
23692 KB |
Output is correct |
88 |
Correct |
16 ms |
23796 KB |
Output is correct |
89 |
Correct |
15 ms |
23732 KB |
Output is correct |
90 |
Correct |
19 ms |
23704 KB |
Output is correct |
91 |
Correct |
15 ms |
23752 KB |
Output is correct |
92 |
Correct |
16 ms |
23936 KB |
Output is correct |
93 |
Correct |
16 ms |
23928 KB |
Output is correct |
94 |
Correct |
18 ms |
23972 KB |
Output is correct |
95 |
Correct |
16 ms |
23896 KB |
Output is correct |
96 |
Correct |
16 ms |
23940 KB |
Output is correct |
97 |
Correct |
16 ms |
23864 KB |
Output is correct |
98 |
Correct |
16 ms |
23768 KB |
Output is correct |
99 |
Correct |
16 ms |
23880 KB |
Output is correct |
100 |
Correct |
15 ms |
23744 KB |
Output is correct |
101 |
Correct |
16 ms |
23920 KB |
Output is correct |
102 |
Correct |
15 ms |
23768 KB |
Output is correct |
103 |
Correct |
17 ms |
23756 KB |
Output is correct |
104 |
Correct |
16 ms |
23764 KB |
Output is correct |
105 |
Correct |
16 ms |
23836 KB |
Output is correct |
106 |
Correct |
16 ms |
24012 KB |
Output is correct |
107 |
Correct |
16 ms |
23892 KB |
Output is correct |
108 |
Correct |
19 ms |
23976 KB |
Output is correct |
109 |
Correct |
20 ms |
24252 KB |
Output is correct |
110 |
Correct |
41 ms |
33240 KB |
Output is correct |
111 |
Correct |
51 ms |
34876 KB |
Output is correct |
112 |
Correct |
45 ms |
34376 KB |
Output is correct |
113 |
Correct |
46 ms |
34348 KB |
Output is correct |
114 |
Correct |
35 ms |
34852 KB |
Output is correct |
115 |
Correct |
36 ms |
34764 KB |
Output is correct |
116 |
Correct |
39 ms |
36660 KB |
Output is correct |
117 |
Correct |
53 ms |
34744 KB |
Output is correct |
118 |
Correct |
61 ms |
34732 KB |
Output is correct |
119 |
Correct |
128 ms |
52116 KB |
Output is correct |
120 |
Correct |
110 ms |
53072 KB |
Output is correct |
121 |
Correct |
96 ms |
53112 KB |
Output is correct |
122 |
Correct |
84 ms |
54336 KB |
Output is correct |
123 |
Correct |
71 ms |
54308 KB |
Output is correct |
124 |
Correct |
408 ms |
126184 KB |
Output is correct |
125 |
Correct |
1173 ms |
305300 KB |
Output is correct |
126 |
Correct |
1298 ms |
336440 KB |
Output is correct |
127 |
Correct |
1132 ms |
336448 KB |
Output is correct |
128 |
Correct |
660 ms |
348380 KB |
Output is correct |
129 |
Correct |
756 ms |
348432 KB |
Output is correct |
130 |
Correct |
993 ms |
372980 KB |
Output is correct |
131 |
Correct |
938 ms |
358304 KB |
Output is correct |
132 |
Correct |
59 ms |
34876 KB |
Output is correct |
133 |
Correct |
18 ms |
24304 KB |
Output is correct |
134 |
Correct |
20 ms |
25172 KB |
Output is correct |
135 |
Correct |
47 ms |
33240 KB |
Output is correct |
136 |
Correct |
39 ms |
50068 KB |
Output is correct |
137 |
Correct |
50 ms |
34948 KB |
Output is correct |
138 |
Correct |
44 ms |
34328 KB |
Output is correct |
139 |
Correct |
60 ms |
34888 KB |
Output is correct |
140 |
Correct |
48 ms |
34992 KB |
Output is correct |
141 |
Correct |
50 ms |
34272 KB |
Output is correct |
142 |
Correct |
41 ms |
34780 KB |
Output is correct |
143 |
Correct |
35 ms |
34816 KB |
Output is correct |
144 |
Correct |
26 ms |
30804 KB |
Output is correct |
145 |
Correct |
40 ms |
61548 KB |
Output is correct |
146 |
Correct |
35 ms |
37512 KB |
Output is correct |
147 |
Correct |
55 ms |
38692 KB |
Output is correct |
148 |
Correct |
48 ms |
40340 KB |
Output is correct |
149 |
Correct |
36 ms |
36684 KB |
Output is correct |
150 |
Correct |
40 ms |
36648 KB |
Output is correct |
151 |
Correct |
50 ms |
34764 KB |
Output is correct |
152 |
Correct |
52 ms |
34672 KB |
Output is correct |
153 |
Correct |
42 ms |
34720 KB |
Output is correct |
154 |
Correct |
113 ms |
53720 KB |
Output is correct |
155 |
Correct |
36 ms |
37016 KB |
Output is correct |
156 |
Correct |
108 ms |
52092 KB |
Output is correct |
157 |
Correct |
87 ms |
56740 KB |
Output is correct |
158 |
Correct |
118 ms |
53068 KB |
Output is correct |
159 |
Correct |
117 ms |
53476 KB |
Output is correct |
160 |
Correct |
107 ms |
53964 KB |
Output is correct |
161 |
Correct |
97 ms |
53176 KB |
Output is correct |
162 |
Correct |
73 ms |
54360 KB |
Output is correct |
163 |
Correct |
71 ms |
54384 KB |
Output is correct |
164 |
Correct |
43 ms |
42316 KB |
Output is correct |
165 |
Correct |
69 ms |
118552 KB |
Output is correct |
166 |
Correct |
72 ms |
58592 KB |
Output is correct |
167 |
Correct |
92 ms |
61848 KB |
Output is correct |
168 |
Correct |
95 ms |
60796 KB |
Output is correct |
169 |
Correct |
115 ms |
63872 KB |
Output is correct |
170 |
Correct |
89 ms |
56088 KB |
Output is correct |
171 |
Correct |
115 ms |
53076 KB |
Output is correct |
172 |
Correct |
126 ms |
53208 KB |
Output is correct |
173 |
Correct |
121 ms |
53276 KB |
Output is correct |
174 |
Correct |
131 ms |
67280 KB |
Output is correct |
175 |
Correct |
190 ms |
109972 KB |
Output is correct |
176 |
Correct |
339 ms |
212308 KB |
Output is correct |
177 |
Correct |
539 ms |
222080 KB |
Output is correct |
178 |
Correct |
679 ms |
261412 KB |
Output is correct |
179 |
Correct |
689 ms |
300496 KB |
Output is correct |
180 |
Correct |
931 ms |
376408 KB |
Output is correct |
181 |
Correct |
1258 ms |
358852 KB |
Output is correct |
182 |
Correct |
1346 ms |
401964 KB |
Output is correct |
183 |
Correct |
891 ms |
296132 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
23764 KB |
Output is correct |
2 |
Correct |
17 ms |
23764 KB |
Output is correct |
3 |
Correct |
16 ms |
23944 KB |
Output is correct |
4 |
Correct |
16 ms |
24004 KB |
Output is correct |
5 |
Correct |
16 ms |
24012 KB |
Output is correct |
6 |
Correct |
16 ms |
23988 KB |
Output is correct |
7 |
Correct |
16 ms |
23872 KB |
Output is correct |
8 |
Correct |
16 ms |
24148 KB |
Output is correct |
9 |
Correct |
16 ms |
23764 KB |
Output is correct |
10 |
Correct |
16 ms |
23800 KB |
Output is correct |
11 |
Correct |
15 ms |
23792 KB |
Output is correct |
12 |
Correct |
16 ms |
23764 KB |
Output is correct |
13 |
Correct |
15 ms |
23852 KB |
Output is correct |
14 |
Correct |
16 ms |
23756 KB |
Output is correct |
15 |
Correct |
16 ms |
23836 KB |
Output is correct |
16 |
Correct |
16 ms |
23988 KB |
Output is correct |
17 |
Correct |
16 ms |
23904 KB |
Output is correct |
18 |
Correct |
16 ms |
24020 KB |
Output is correct |
19 |
Correct |
46 ms |
34900 KB |
Output is correct |
20 |
Correct |
34 ms |
50088 KB |
Output is correct |
21 |
Correct |
43 ms |
34376 KB |
Output is correct |
22 |
Correct |
49 ms |
34900 KB |
Output is correct |
23 |
Correct |
46 ms |
35020 KB |
Output is correct |
24 |
Correct |
27 ms |
30804 KB |
Output is correct |
25 |
Correct |
42 ms |
61596 KB |
Output is correct |
26 |
Correct |
51 ms |
34760 KB |
Output is correct |
27 |
Correct |
49 ms |
34620 KB |
Output is correct |
28 |
Correct |
41 ms |
34740 KB |
Output is correct |
29 |
Correct |
102 ms |
53692 KB |
Output is correct |
30 |
Correct |
42 ms |
37024 KB |
Output is correct |
31 |
Correct |
107 ms |
53152 KB |
Output is correct |
32 |
Correct |
119 ms |
53468 KB |
Output is correct |
33 |
Correct |
102 ms |
53964 KB |
Output is correct |
34 |
Correct |
55 ms |
42388 KB |
Output is correct |
35 |
Correct |
69 ms |
118496 KB |
Output is correct |
36 |
Correct |
112 ms |
53120 KB |
Output is correct |
37 |
Correct |
121 ms |
53136 KB |
Output is correct |
38 |
Correct |
97 ms |
53324 KB |
Output is correct |
39 |
Correct |
1426 ms |
340312 KB |
Output is correct |
40 |
Correct |
116 ms |
64820 KB |
Output is correct |
41 |
Correct |
64 ms |
60760 KB |
Output is correct |
42 |
Correct |
174 ms |
68632 KB |
Output is correct |
43 |
Correct |
122 ms |
91036 KB |
Output is correct |
44 |
Correct |
370 ms |
169776 KB |
Output is correct |
45 |
Correct |
418 ms |
213132 KB |
Output is correct |
46 |
Correct |
1234 ms |
336408 KB |
Output is correct |
47 |
Correct |
1462 ms |
339996 KB |
Output is correct |
48 |
Correct |
1326 ms |
344864 KB |
Output is correct |
49 |
Correct |
289 ms |
221908 KB |
Output is correct |
50 |
Correct |
641 ms |
918784 KB |
Output is correct |
51 |
Correct |
1834 ms |
340620 KB |
Output is correct |
52 |
Correct |
1628 ms |
341128 KB |
Output is correct |
53 |
Correct |
1341 ms |
341524 KB |
Output is correct |
54 |
Correct |
15 ms |
23764 KB |
Output is correct |
55 |
Correct |
15 ms |
23708 KB |
Output is correct |
56 |
Correct |
16 ms |
23764 KB |
Output is correct |
57 |
Correct |
16 ms |
23764 KB |
Output is correct |
58 |
Correct |
16 ms |
24020 KB |
Output is correct |
59 |
Correct |
16 ms |
23764 KB |
Output is correct |
60 |
Correct |
17 ms |
23764 KB |
Output is correct |
61 |
Correct |
17 ms |
23764 KB |
Output is correct |
62 |
Correct |
17 ms |
24000 KB |
Output is correct |
63 |
Correct |
16 ms |
23924 KB |
Output is correct |
64 |
Correct |
18 ms |
23908 KB |
Output is correct |
65 |
Correct |
16 ms |
23984 KB |
Output is correct |
66 |
Correct |
19 ms |
23892 KB |
Output is correct |
67 |
Correct |
15 ms |
23960 KB |
Output is correct |
68 |
Correct |
15 ms |
23836 KB |
Output is correct |
69 |
Correct |
15 ms |
24276 KB |
Output is correct |
70 |
Correct |
17 ms |
23952 KB |
Output is correct |
71 |
Correct |
16 ms |
23736 KB |
Output is correct |
72 |
Correct |
17 ms |
23948 KB |
Output is correct |
73 |
Correct |
15 ms |
23800 KB |
Output is correct |
74 |
Correct |
14 ms |
23736 KB |
Output is correct |
75 |
Correct |
15 ms |
23880 KB |
Output is correct |
76 |
Correct |
15 ms |
23764 KB |
Output is correct |
77 |
Correct |
15 ms |
23744 KB |
Output is correct |
78 |
Correct |
15 ms |
23764 KB |
Output is correct |
79 |
Correct |
15 ms |
23828 KB |
Output is correct |
80 |
Correct |
15 ms |
23856 KB |
Output is correct |
81 |
Correct |
15 ms |
23920 KB |
Output is correct |
82 |
Correct |
15 ms |
23764 KB |
Output is correct |
83 |
Correct |
15 ms |
23912 KB |
Output is correct |
84 |
Correct |
15 ms |
23900 KB |
Output is correct |
85 |
Correct |
16 ms |
24020 KB |
Output is correct |
86 |
Correct |
16 ms |
23680 KB |
Output is correct |
87 |
Correct |
16 ms |
23692 KB |
Output is correct |
88 |
Correct |
16 ms |
23796 KB |
Output is correct |
89 |
Correct |
15 ms |
23732 KB |
Output is correct |
90 |
Correct |
19 ms |
23704 KB |
Output is correct |
91 |
Correct |
15 ms |
23752 KB |
Output is correct |
92 |
Correct |
16 ms |
23936 KB |
Output is correct |
93 |
Correct |
16 ms |
23928 KB |
Output is correct |
94 |
Correct |
18 ms |
23972 KB |
Output is correct |
95 |
Correct |
16 ms |
23896 KB |
Output is correct |
96 |
Correct |
16 ms |
23940 KB |
Output is correct |
97 |
Correct |
16 ms |
23864 KB |
Output is correct |
98 |
Correct |
16 ms |
23768 KB |
Output is correct |
99 |
Correct |
16 ms |
23880 KB |
Output is correct |
100 |
Correct |
15 ms |
23744 KB |
Output is correct |
101 |
Correct |
16 ms |
23920 KB |
Output is correct |
102 |
Correct |
15 ms |
23768 KB |
Output is correct |
103 |
Correct |
17 ms |
23756 KB |
Output is correct |
104 |
Correct |
16 ms |
23764 KB |
Output is correct |
105 |
Correct |
16 ms |
23836 KB |
Output is correct |
106 |
Correct |
16 ms |
24012 KB |
Output is correct |
107 |
Correct |
16 ms |
23892 KB |
Output is correct |
108 |
Correct |
19 ms |
23976 KB |
Output is correct |
109 |
Correct |
20 ms |
24252 KB |
Output is correct |
110 |
Correct |
41 ms |
33240 KB |
Output is correct |
111 |
Correct |
51 ms |
34876 KB |
Output is correct |
112 |
Correct |
45 ms |
34376 KB |
Output is correct |
113 |
Correct |
46 ms |
34348 KB |
Output is correct |
114 |
Correct |
35 ms |
34852 KB |
Output is correct |
115 |
Correct |
36 ms |
34764 KB |
Output is correct |
116 |
Correct |
39 ms |
36660 KB |
Output is correct |
117 |
Correct |
53 ms |
34744 KB |
Output is correct |
118 |
Correct |
61 ms |
34732 KB |
Output is correct |
119 |
Correct |
128 ms |
52116 KB |
Output is correct |
120 |
Correct |
110 ms |
53072 KB |
Output is correct |
121 |
Correct |
96 ms |
53112 KB |
Output is correct |
122 |
Correct |
84 ms |
54336 KB |
Output is correct |
123 |
Correct |
71 ms |
54308 KB |
Output is correct |
124 |
Correct |
408 ms |
126184 KB |
Output is correct |
125 |
Correct |
1173 ms |
305300 KB |
Output is correct |
126 |
Correct |
1298 ms |
336440 KB |
Output is correct |
127 |
Correct |
1132 ms |
336448 KB |
Output is correct |
128 |
Correct |
660 ms |
348380 KB |
Output is correct |
129 |
Correct |
756 ms |
348432 KB |
Output is correct |
130 |
Correct |
993 ms |
372980 KB |
Output is correct |
131 |
Correct |
938 ms |
358304 KB |
Output is correct |
132 |
Correct |
59 ms |
34876 KB |
Output is correct |
133 |
Correct |
18 ms |
24304 KB |
Output is correct |
134 |
Correct |
20 ms |
25172 KB |
Output is correct |
135 |
Correct |
47 ms |
33240 KB |
Output is correct |
136 |
Correct |
39 ms |
50068 KB |
Output is correct |
137 |
Correct |
50 ms |
34948 KB |
Output is correct |
138 |
Correct |
44 ms |
34328 KB |
Output is correct |
139 |
Correct |
60 ms |
34888 KB |
Output is correct |
140 |
Correct |
48 ms |
34992 KB |
Output is correct |
141 |
Correct |
50 ms |
34272 KB |
Output is correct |
142 |
Correct |
41 ms |
34780 KB |
Output is correct |
143 |
Correct |
35 ms |
34816 KB |
Output is correct |
144 |
Correct |
26 ms |
30804 KB |
Output is correct |
145 |
Correct |
40 ms |
61548 KB |
Output is correct |
146 |
Correct |
35 ms |
37512 KB |
Output is correct |
147 |
Correct |
55 ms |
38692 KB |
Output is correct |
148 |
Correct |
48 ms |
40340 KB |
Output is correct |
149 |
Correct |
36 ms |
36684 KB |
Output is correct |
150 |
Correct |
40 ms |
36648 KB |
Output is correct |
151 |
Correct |
50 ms |
34764 KB |
Output is correct |
152 |
Correct |
52 ms |
34672 KB |
Output is correct |
153 |
Correct |
42 ms |
34720 KB |
Output is correct |
154 |
Correct |
113 ms |
53720 KB |
Output is correct |
155 |
Correct |
36 ms |
37016 KB |
Output is correct |
156 |
Correct |
108 ms |
52092 KB |
Output is correct |
157 |
Correct |
87 ms |
56740 KB |
Output is correct |
158 |
Correct |
118 ms |
53068 KB |
Output is correct |
159 |
Correct |
117 ms |
53476 KB |
Output is correct |
160 |
Correct |
107 ms |
53964 KB |
Output is correct |
161 |
Correct |
97 ms |
53176 KB |
Output is correct |
162 |
Correct |
73 ms |
54360 KB |
Output is correct |
163 |
Correct |
71 ms |
54384 KB |
Output is correct |
164 |
Correct |
43 ms |
42316 KB |
Output is correct |
165 |
Correct |
69 ms |
118552 KB |
Output is correct |
166 |
Correct |
72 ms |
58592 KB |
Output is correct |
167 |
Correct |
92 ms |
61848 KB |
Output is correct |
168 |
Correct |
95 ms |
60796 KB |
Output is correct |
169 |
Correct |
115 ms |
63872 KB |
Output is correct |
170 |
Correct |
89 ms |
56088 KB |
Output is correct |
171 |
Correct |
115 ms |
53076 KB |
Output is correct |
172 |
Correct |
126 ms |
53208 KB |
Output is correct |
173 |
Correct |
121 ms |
53276 KB |
Output is correct |
174 |
Correct |
131 ms |
67280 KB |
Output is correct |
175 |
Correct |
190 ms |
109972 KB |
Output is correct |
176 |
Correct |
339 ms |
212308 KB |
Output is correct |
177 |
Correct |
539 ms |
222080 KB |
Output is correct |
178 |
Correct |
679 ms |
261412 KB |
Output is correct |
179 |
Correct |
689 ms |
300496 KB |
Output is correct |
180 |
Correct |
931 ms |
376408 KB |
Output is correct |
181 |
Correct |
1258 ms |
358852 KB |
Output is correct |
182 |
Correct |
1346 ms |
401964 KB |
Output is correct |
183 |
Correct |
891 ms |
296132 KB |
Output is correct |
184 |
Execution timed out |
2074 ms |
653168 KB |
Time limit exceeded |
185 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
23764 KB |
Output is correct |
2 |
Correct |
17 ms |
23764 KB |
Output is correct |
3 |
Correct |
16 ms |
23944 KB |
Output is correct |
4 |
Correct |
16 ms |
24004 KB |
Output is correct |
5 |
Correct |
16 ms |
24012 KB |
Output is correct |
6 |
Correct |
16 ms |
23988 KB |
Output is correct |
7 |
Correct |
16 ms |
23872 KB |
Output is correct |
8 |
Correct |
16 ms |
24148 KB |
Output is correct |
9 |
Correct |
16 ms |
23764 KB |
Output is correct |
10 |
Correct |
16 ms |
23800 KB |
Output is correct |
11 |
Correct |
15 ms |
23792 KB |
Output is correct |
12 |
Correct |
16 ms |
23764 KB |
Output is correct |
13 |
Correct |
15 ms |
23852 KB |
Output is correct |
14 |
Correct |
16 ms |
23756 KB |
Output is correct |
15 |
Correct |
16 ms |
23836 KB |
Output is correct |
16 |
Correct |
16 ms |
23988 KB |
Output is correct |
17 |
Correct |
16 ms |
23904 KB |
Output is correct |
18 |
Correct |
16 ms |
24020 KB |
Output is correct |
19 |
Correct |
46 ms |
34900 KB |
Output is correct |
20 |
Correct |
34 ms |
50088 KB |
Output is correct |
21 |
Correct |
43 ms |
34376 KB |
Output is correct |
22 |
Correct |
49 ms |
34900 KB |
Output is correct |
23 |
Correct |
46 ms |
35020 KB |
Output is correct |
24 |
Correct |
27 ms |
30804 KB |
Output is correct |
25 |
Correct |
42 ms |
61596 KB |
Output is correct |
26 |
Correct |
51 ms |
34760 KB |
Output is correct |
27 |
Correct |
49 ms |
34620 KB |
Output is correct |
28 |
Correct |
41 ms |
34740 KB |
Output is correct |
29 |
Correct |
102 ms |
53692 KB |
Output is correct |
30 |
Correct |
42 ms |
37024 KB |
Output is correct |
31 |
Correct |
107 ms |
53152 KB |
Output is correct |
32 |
Correct |
119 ms |
53468 KB |
Output is correct |
33 |
Correct |
102 ms |
53964 KB |
Output is correct |
34 |
Correct |
55 ms |
42388 KB |
Output is correct |
35 |
Correct |
69 ms |
118496 KB |
Output is correct |
36 |
Correct |
112 ms |
53120 KB |
Output is correct |
37 |
Correct |
121 ms |
53136 KB |
Output is correct |
38 |
Correct |
97 ms |
53324 KB |
Output is correct |
39 |
Correct |
1426 ms |
340312 KB |
Output is correct |
40 |
Correct |
116 ms |
64820 KB |
Output is correct |
41 |
Correct |
64 ms |
60760 KB |
Output is correct |
42 |
Correct |
174 ms |
68632 KB |
Output is correct |
43 |
Correct |
122 ms |
91036 KB |
Output is correct |
44 |
Correct |
370 ms |
169776 KB |
Output is correct |
45 |
Correct |
418 ms |
213132 KB |
Output is correct |
46 |
Correct |
1234 ms |
336408 KB |
Output is correct |
47 |
Correct |
1462 ms |
339996 KB |
Output is correct |
48 |
Correct |
1326 ms |
344864 KB |
Output is correct |
49 |
Correct |
289 ms |
221908 KB |
Output is correct |
50 |
Correct |
641 ms |
918784 KB |
Output is correct |
51 |
Correct |
1834 ms |
340620 KB |
Output is correct |
52 |
Correct |
1628 ms |
341128 KB |
Output is correct |
53 |
Correct |
1341 ms |
341524 KB |
Output is correct |
54 |
Correct |
15 ms |
23764 KB |
Output is correct |
55 |
Correct |
15 ms |
23708 KB |
Output is correct |
56 |
Correct |
16 ms |
23764 KB |
Output is correct |
57 |
Correct |
16 ms |
23764 KB |
Output is correct |
58 |
Correct |
16 ms |
24020 KB |
Output is correct |
59 |
Correct |
16 ms |
23764 KB |
Output is correct |
60 |
Correct |
17 ms |
23764 KB |
Output is correct |
61 |
Correct |
17 ms |
23764 KB |
Output is correct |
62 |
Correct |
17 ms |
24000 KB |
Output is correct |
63 |
Correct |
16 ms |
23924 KB |
Output is correct |
64 |
Correct |
18 ms |
23908 KB |
Output is correct |
65 |
Correct |
16 ms |
23984 KB |
Output is correct |
66 |
Correct |
19 ms |
23892 KB |
Output is correct |
67 |
Correct |
15 ms |
23960 KB |
Output is correct |
68 |
Correct |
15 ms |
23836 KB |
Output is correct |
69 |
Correct |
15 ms |
24276 KB |
Output is correct |
70 |
Correct |
17 ms |
23952 KB |
Output is correct |
71 |
Correct |
16 ms |
23736 KB |
Output is correct |
72 |
Correct |
17 ms |
23948 KB |
Output is correct |
73 |
Correct |
15 ms |
23800 KB |
Output is correct |
74 |
Correct |
14 ms |
23736 KB |
Output is correct |
75 |
Correct |
15 ms |
23880 KB |
Output is correct |
76 |
Correct |
15 ms |
23764 KB |
Output is correct |
77 |
Correct |
15 ms |
23744 KB |
Output is correct |
78 |
Correct |
15 ms |
23764 KB |
Output is correct |
79 |
Correct |
15 ms |
23828 KB |
Output is correct |
80 |
Correct |
15 ms |
23856 KB |
Output is correct |
81 |
Correct |
15 ms |
23920 KB |
Output is correct |
82 |
Correct |
15 ms |
23764 KB |
Output is correct |
83 |
Correct |
15 ms |
23912 KB |
Output is correct |
84 |
Correct |
15 ms |
23900 KB |
Output is correct |
85 |
Correct |
16 ms |
24020 KB |
Output is correct |
86 |
Correct |
16 ms |
23680 KB |
Output is correct |
87 |
Correct |
16 ms |
23692 KB |
Output is correct |
88 |
Correct |
16 ms |
23796 KB |
Output is correct |
89 |
Correct |
15 ms |
23732 KB |
Output is correct |
90 |
Correct |
19 ms |
23704 KB |
Output is correct |
91 |
Correct |
15 ms |
23752 KB |
Output is correct |
92 |
Correct |
16 ms |
23936 KB |
Output is correct |
93 |
Correct |
16 ms |
23928 KB |
Output is correct |
94 |
Correct |
18 ms |
23972 KB |
Output is correct |
95 |
Correct |
16 ms |
23896 KB |
Output is correct |
96 |
Correct |
16 ms |
23940 KB |
Output is correct |
97 |
Correct |
16 ms |
23864 KB |
Output is correct |
98 |
Correct |
16 ms |
23768 KB |
Output is correct |
99 |
Correct |
16 ms |
23880 KB |
Output is correct |
100 |
Correct |
15 ms |
23744 KB |
Output is correct |
101 |
Correct |
16 ms |
23920 KB |
Output is correct |
102 |
Correct |
15 ms |
23768 KB |
Output is correct |
103 |
Correct |
17 ms |
23756 KB |
Output is correct |
104 |
Correct |
16 ms |
23764 KB |
Output is correct |
105 |
Correct |
16 ms |
23836 KB |
Output is correct |
106 |
Correct |
16 ms |
24012 KB |
Output is correct |
107 |
Correct |
16 ms |
23892 KB |
Output is correct |
108 |
Correct |
19 ms |
23976 KB |
Output is correct |
109 |
Correct |
20 ms |
24252 KB |
Output is correct |
110 |
Correct |
41 ms |
33240 KB |
Output is correct |
111 |
Correct |
51 ms |
34876 KB |
Output is correct |
112 |
Correct |
45 ms |
34376 KB |
Output is correct |
113 |
Correct |
46 ms |
34348 KB |
Output is correct |
114 |
Correct |
35 ms |
34852 KB |
Output is correct |
115 |
Correct |
36 ms |
34764 KB |
Output is correct |
116 |
Correct |
39 ms |
36660 KB |
Output is correct |
117 |
Correct |
53 ms |
34744 KB |
Output is correct |
118 |
Correct |
61 ms |
34732 KB |
Output is correct |
119 |
Correct |
128 ms |
52116 KB |
Output is correct |
120 |
Correct |
110 ms |
53072 KB |
Output is correct |
121 |
Correct |
96 ms |
53112 KB |
Output is correct |
122 |
Correct |
84 ms |
54336 KB |
Output is correct |
123 |
Correct |
71 ms |
54308 KB |
Output is correct |
124 |
Correct |
408 ms |
126184 KB |
Output is correct |
125 |
Correct |
1173 ms |
305300 KB |
Output is correct |
126 |
Correct |
1298 ms |
336440 KB |
Output is correct |
127 |
Correct |
1132 ms |
336448 KB |
Output is correct |
128 |
Correct |
660 ms |
348380 KB |
Output is correct |
129 |
Correct |
756 ms |
348432 KB |
Output is correct |
130 |
Correct |
993 ms |
372980 KB |
Output is correct |
131 |
Correct |
938 ms |
358304 KB |
Output is correct |
132 |
Correct |
59 ms |
34876 KB |
Output is correct |
133 |
Correct |
18 ms |
24304 KB |
Output is correct |
134 |
Correct |
20 ms |
25172 KB |
Output is correct |
135 |
Correct |
47 ms |
33240 KB |
Output is correct |
136 |
Correct |
39 ms |
50068 KB |
Output is correct |
137 |
Correct |
50 ms |
34948 KB |
Output is correct |
138 |
Correct |
44 ms |
34328 KB |
Output is correct |
139 |
Correct |
60 ms |
34888 KB |
Output is correct |
140 |
Correct |
48 ms |
34992 KB |
Output is correct |
141 |
Correct |
50 ms |
34272 KB |
Output is correct |
142 |
Correct |
41 ms |
34780 KB |
Output is correct |
143 |
Correct |
35 ms |
34816 KB |
Output is correct |
144 |
Correct |
26 ms |
30804 KB |
Output is correct |
145 |
Correct |
40 ms |
61548 KB |
Output is correct |
146 |
Correct |
35 ms |
37512 KB |
Output is correct |
147 |
Correct |
55 ms |
38692 KB |
Output is correct |
148 |
Correct |
48 ms |
40340 KB |
Output is correct |
149 |
Correct |
36 ms |
36684 KB |
Output is correct |
150 |
Correct |
40 ms |
36648 KB |
Output is correct |
151 |
Correct |
50 ms |
34764 KB |
Output is correct |
152 |
Correct |
52 ms |
34672 KB |
Output is correct |
153 |
Correct |
42 ms |
34720 KB |
Output is correct |
154 |
Correct |
113 ms |
53720 KB |
Output is correct |
155 |
Correct |
36 ms |
37016 KB |
Output is correct |
156 |
Correct |
108 ms |
52092 KB |
Output is correct |
157 |
Correct |
87 ms |
56740 KB |
Output is correct |
158 |
Correct |
118 ms |
53068 KB |
Output is correct |
159 |
Correct |
117 ms |
53476 KB |
Output is correct |
160 |
Correct |
107 ms |
53964 KB |
Output is correct |
161 |
Correct |
97 ms |
53176 KB |
Output is correct |
162 |
Correct |
73 ms |
54360 KB |
Output is correct |
163 |
Correct |
71 ms |
54384 KB |
Output is correct |
164 |
Correct |
43 ms |
42316 KB |
Output is correct |
165 |
Correct |
69 ms |
118552 KB |
Output is correct |
166 |
Correct |
72 ms |
58592 KB |
Output is correct |
167 |
Correct |
92 ms |
61848 KB |
Output is correct |
168 |
Correct |
95 ms |
60796 KB |
Output is correct |
169 |
Correct |
115 ms |
63872 KB |
Output is correct |
170 |
Correct |
89 ms |
56088 KB |
Output is correct |
171 |
Correct |
115 ms |
53076 KB |
Output is correct |
172 |
Correct |
126 ms |
53208 KB |
Output is correct |
173 |
Correct |
121 ms |
53276 KB |
Output is correct |
174 |
Correct |
131 ms |
67280 KB |
Output is correct |
175 |
Correct |
190 ms |
109972 KB |
Output is correct |
176 |
Correct |
339 ms |
212308 KB |
Output is correct |
177 |
Correct |
539 ms |
222080 KB |
Output is correct |
178 |
Correct |
679 ms |
261412 KB |
Output is correct |
179 |
Correct |
689 ms |
300496 KB |
Output is correct |
180 |
Correct |
931 ms |
376408 KB |
Output is correct |
181 |
Correct |
1258 ms |
358852 KB |
Output is correct |
182 |
Correct |
1346 ms |
401964 KB |
Output is correct |
183 |
Correct |
891 ms |
296132 KB |
Output is correct |
184 |
Execution timed out |
2074 ms |
653168 KB |
Time limit exceeded |
185 |
Halted |
0 ms |
0 KB |
- |