#include <bits/stdc++.h>
using namespace std;
const int dx[] = {1, 0, -1, 0},
dy[] = {0, 1, 0, -1};
struct DSU {
vector<int> id;
DSU(int n) : id(n, -1) {}
int root(int u) { return id[u] < 0 ? u : id[u] = root(id[u]); }
void add(int u, int v) {
u = root(u); v = root(v);
if (u == v) return;
id[v] = u;
}
};
int32_t main() {
cin.tie(0)->sync_with_stdio(0);
int r, c, n; cin >> r >> c >> n;
int Sr, Sc; cin >> Sr >> Sc;
int Gr, Gc; cin >> Gr >> Gc;
bool reverse = false;
if (r < c) {
swap(r, c);
swap(Sr, Sc);
swap(Gr, Gc);
reverse = true;
}
vector<vector<char>> a(r + 10, vector<char>(c + 10));
if (!reverse) {
for (int i = 1; i <= r; ++i) {
for (int j = 1; j <= c; ++j) cin >> a[i][j];
}
} else {
for (int i = 1; i <= c; ++i) {
for (int j = 1; j <= r; ++j) cin >> a[j][i];
}
}
auto in = [&](int x, int y) { return 1 <= x && x <= r && 1 <= y && y <= c; };
vector<DSU> R(r + 10, DSU(c + 10));
vector<DSU> C(c + 10, DSU(r + 10));
vector<vector<int>> f(r + 10, vector<int>(c + 10, 1'000'000'000));
using T = tuple<int, int, int>;
deque<T> q({tie(f[Sr][Sc] = 0, Sr, Sc)});
while (q.size()) {
auto [d, x, y] = q.front(); q.pop_front();
if (d != f[x][y]) continue;
auto add = [&](int nX, int nY, int w) {
if (f[nX][nY] > d + w) {
if (w) q.emplace_back(f[nX][nY] = d + w, nX, nY);
else q.emplace_front(f[nX][nY] = d + w, nX, nY);
}
};
for (int t = 0; t < 4; ++t) {
int nX = x + dx[t], nY = y + dy[t];
if (!in(nX, nY) || a[nX][nY] == '#') continue;
add(nX, nY, 0);
}
{ //add a fricking regtangle
int stX = max(1, x - n + 1), edX = min(r, x + n - 1);
int stY = max(1, y - n), edY = min(c, y + n);
for (int h = stX; h <= edX; h = C[stY].root(h)) {
add(h, stY, 1);
for (int i = R[h].root(stY); i < edY; i = R[h].root(i)) {
R[h].add(R[h].root(i) + 1, R[h].root(i));
add(h, R[h].root(i), 1);
}
if (R[h].root(stY) - stY >= 2 * n + 1 || R[h].root(stY) == c) C[stY].add(h + 1, h);
h += 1;
}
}
{ //add 2 fricking strips due to the rectangle is not the fucking square
int stX = max(1, x - n), edX = min(r, x + n);
int stY = max(1, y - n + 1), edY = min(c, y + n - 1);
for (int type = 0; type < 2; ++type) {
int h = (!type ? stX : edX);
add(h, stY, 1);
for (int i = R[h].root(stY); i < edY; i = R[h].root(i)) {
R[h].add(R[h].root(i) + 1, R[h].root(i));
add(h, R[h].root(i), 1);
}
if (R[h].root(stY) - stY >= 2 * n + 1 || R[h].root(stY) == c) C[stY].add(h + 1, h);
}
}
}
cout << f[Gr][Gc] << "\n";
cerr << 1.0 * clock() / CLOCKS_PER_SEC << "\n";
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
1 ms |
512 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
760 KB |
Output is correct |
8 |
Correct |
1 ms |
592 KB |
Output is correct |
9 |
Correct |
1 ms |
336 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
11 |
Correct |
1 ms |
336 KB |
Output is correct |
12 |
Correct |
1 ms |
336 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Correct |
1 ms |
336 KB |
Output is correct |
16 |
Correct |
1 ms |
504 KB |
Output is correct |
17 |
Correct |
1 ms |
336 KB |
Output is correct |
18 |
Correct |
1 ms |
336 KB |
Output is correct |
19 |
Correct |
6 ms |
1360 KB |
Output is correct |
20 |
Correct |
14 ms |
12952 KB |
Output is correct |
21 |
Correct |
5 ms |
1616 KB |
Output is correct |
22 |
Correct |
8 ms |
1104 KB |
Output is correct |
23 |
Correct |
4 ms |
1192 KB |
Output is correct |
24 |
Correct |
17 ms |
16620 KB |
Output is correct |
25 |
Correct |
17 ms |
16740 KB |
Output is correct |
26 |
Correct |
8 ms |
1360 KB |
Output is correct |
27 |
Correct |
8 ms |
1104 KB |
Output is correct |
28 |
Correct |
5 ms |
1104 KB |
Output is correct |
29 |
Correct |
13 ms |
2652 KB |
Output is correct |
30 |
Correct |
12 ms |
8784 KB |
Output is correct |
31 |
Correct |
11 ms |
3480 KB |
Output is correct |
32 |
Correct |
18 ms |
2384 KB |
Output is correct |
33 |
Correct |
11 ms |
2384 KB |
Output is correct |
34 |
Correct |
39 ms |
40952 KB |
Output is correct |
35 |
Correct |
40 ms |
40964 KB |
Output is correct |
36 |
Correct |
23 ms |
2384 KB |
Output is correct |
37 |
Correct |
23 ms |
2396 KB |
Output is correct |
38 |
Correct |
12 ms |
2384 KB |
Output is correct |
39 |
Correct |
141 ms |
21304 KB |
Output is correct |
40 |
Correct |
24 ms |
5124 KB |
Output is correct |
41 |
Correct |
51 ms |
50292 KB |
Output is correct |
42 |
Correct |
25 ms |
3408 KB |
Output is correct |
43 |
Correct |
47 ms |
33900 KB |
Output is correct |
44 |
Correct |
110 ms |
40040 KB |
Output is correct |
45 |
Correct |
113 ms |
51156 KB |
Output is correct |
46 |
Correct |
131 ms |
30300 KB |
Output is correct |
47 |
Correct |
209 ms |
20044 KB |
Output is correct |
48 |
Correct |
134 ms |
20024 KB |
Output is correct |
49 |
Correct |
369 ms |
405564 KB |
Output is correct |
50 |
Correct |
370 ms |
406520 KB |
Output is correct |
51 |
Correct |
197 ms |
20360 KB |
Output is correct |
52 |
Correct |
204 ms |
20040 KB |
Output is correct |
53 |
Correct |
147 ms |
20044 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
1 ms |
412 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
336 KB |
Output is correct |
8 |
Correct |
1 ms |
336 KB |
Output is correct |
9 |
Correct |
1 ms |
504 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
11 |
Correct |
1 ms |
336 KB |
Output is correct |
12 |
Correct |
1 ms |
336 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
1 ms |
648 KB |
Output is correct |
17 |
Correct |
1 ms |
592 KB |
Output is correct |
18 |
Correct |
1 ms |
336 KB |
Output is correct |
19 |
Correct |
1 ms |
336 KB |
Output is correct |
20 |
Correct |
1 ms |
336 KB |
Output is correct |
21 |
Correct |
1 ms |
452 KB |
Output is correct |
22 |
Correct |
1 ms |
336 KB |
Output is correct |
23 |
Correct |
1 ms |
336 KB |
Output is correct |
24 |
Correct |
1 ms |
336 KB |
Output is correct |
25 |
Correct |
1 ms |
336 KB |
Output is correct |
26 |
Correct |
1 ms |
336 KB |
Output is correct |
27 |
Correct |
1 ms |
336 KB |
Output is correct |
28 |
Correct |
1 ms |
336 KB |
Output is correct |
29 |
Correct |
1 ms |
336 KB |
Output is correct |
30 |
Correct |
1 ms |
336 KB |
Output is correct |
31 |
Correct |
1 ms |
336 KB |
Output is correct |
32 |
Correct |
1 ms |
336 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
524 KB |
Output is correct |
5 |
Correct |
1 ms |
336 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
336 KB |
Output is correct |
8 |
Correct |
1 ms |
336 KB |
Output is correct |
9 |
Correct |
1 ms |
336 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
11 |
Correct |
1 ms |
336 KB |
Output is correct |
12 |
Correct |
1 ms |
592 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Correct |
1 ms |
336 KB |
Output is correct |
16 |
Correct |
1 ms |
568 KB |
Output is correct |
17 |
Correct |
1 ms |
336 KB |
Output is correct |
18 |
Correct |
1 ms |
336 KB |
Output is correct |
19 |
Correct |
1 ms |
336 KB |
Output is correct |
20 |
Correct |
1 ms |
336 KB |
Output is correct |
21 |
Correct |
1 ms |
336 KB |
Output is correct |
22 |
Correct |
1 ms |
336 KB |
Output is correct |
23 |
Correct |
1 ms |
504 KB |
Output is correct |
24 |
Correct |
1 ms |
336 KB |
Output is correct |
25 |
Correct |
6 ms |
1120 KB |
Output is correct |
26 |
Correct |
9 ms |
2128 KB |
Output is correct |
27 |
Correct |
5 ms |
1752 KB |
Output is correct |
28 |
Correct |
6 ms |
2556 KB |
Output is correct |
29 |
Correct |
7 ms |
1872 KB |
Output is correct |
30 |
Correct |
7 ms |
1872 KB |
Output is correct |
31 |
Correct |
7 ms |
1528 KB |
Output is correct |
32 |
Correct |
9 ms |
1444 KB |
Output is correct |
33 |
Correct |
9 ms |
1360 KB |
Output is correct |
34 |
Correct |
22 ms |
3688 KB |
Output is correct |
35 |
Correct |
10 ms |
3408 KB |
Output is correct |
36 |
Correct |
13 ms |
5200 KB |
Output is correct |
37 |
Correct |
18 ms |
4176 KB |
Output is correct |
38 |
Correct |
12 ms |
4176 KB |
Output is correct |
39 |
Correct |
74 ms |
12616 KB |
Output is correct |
40 |
Correct |
243 ms |
38556 KB |
Output is correct |
41 |
Correct |
127 ms |
29236 KB |
Output is correct |
42 |
Correct |
148 ms |
48156 KB |
Output is correct |
43 |
Correct |
171 ms |
38200 KB |
Output is correct |
44 |
Correct |
114 ms |
38724 KB |
Output is correct |
45 |
Correct |
209 ms |
44192 KB |
Output is correct |
46 |
Correct |
204 ms |
42148 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
1 ms |
412 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
336 KB |
Output is correct |
8 |
Correct |
1 ms |
336 KB |
Output is correct |
9 |
Correct |
1 ms |
504 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
11 |
Correct |
1 ms |
336 KB |
Output is correct |
12 |
Correct |
1 ms |
336 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
1 ms |
648 KB |
Output is correct |
17 |
Correct |
1 ms |
592 KB |
Output is correct |
18 |
Correct |
1 ms |
336 KB |
Output is correct |
19 |
Correct |
1 ms |
336 KB |
Output is correct |
20 |
Correct |
1 ms |
336 KB |
Output is correct |
21 |
Correct |
1 ms |
452 KB |
Output is correct |
22 |
Correct |
1 ms |
336 KB |
Output is correct |
23 |
Correct |
1 ms |
336 KB |
Output is correct |
24 |
Correct |
1 ms |
336 KB |
Output is correct |
25 |
Correct |
1 ms |
336 KB |
Output is correct |
26 |
Correct |
1 ms |
336 KB |
Output is correct |
27 |
Correct |
1 ms |
336 KB |
Output is correct |
28 |
Correct |
1 ms |
336 KB |
Output is correct |
29 |
Correct |
1 ms |
336 KB |
Output is correct |
30 |
Correct |
1 ms |
336 KB |
Output is correct |
31 |
Correct |
1 ms |
336 KB |
Output is correct |
32 |
Correct |
1 ms |
336 KB |
Output is correct |
33 |
Correct |
6 ms |
1104 KB |
Output is correct |
34 |
Correct |
1 ms |
336 KB |
Output is correct |
35 |
Correct |
2 ms |
848 KB |
Output is correct |
36 |
Correct |
7 ms |
1104 KB |
Output is correct |
37 |
Correct |
15 ms |
12956 KB |
Output is correct |
38 |
Correct |
11 ms |
2064 KB |
Output is correct |
39 |
Correct |
5 ms |
1616 KB |
Output is correct |
40 |
Correct |
8 ms |
1360 KB |
Output is correct |
41 |
Correct |
4 ms |
1104 KB |
Output is correct |
42 |
Correct |
6 ms |
2384 KB |
Output is correct |
43 |
Correct |
7 ms |
1872 KB |
Output is correct |
44 |
Correct |
6 ms |
1872 KB |
Output is correct |
45 |
Correct |
18 ms |
16740 KB |
Output is correct |
46 |
Correct |
26 ms |
16688 KB |
Output is correct |
47 |
Correct |
19 ms |
8744 KB |
Output is correct |
48 |
Correct |
11 ms |
2128 KB |
Output is correct |
49 |
Correct |
8 ms |
1616 KB |
Output is correct |
50 |
Correct |
10 ms |
1496 KB |
Output is correct |
51 |
Correct |
7 ms |
1532 KB |
Output is correct |
52 |
Correct |
8 ms |
1360 KB |
Output is correct |
53 |
Correct |
8 ms |
1360 KB |
Output is correct |
54 |
Correct |
5 ms |
1528 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
1 ms |
412 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
336 KB |
Output is correct |
8 |
Correct |
1 ms |
336 KB |
Output is correct |
9 |
Correct |
1 ms |
504 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
11 |
Correct |
1 ms |
336 KB |
Output is correct |
12 |
Correct |
1 ms |
336 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
1 ms |
648 KB |
Output is correct |
17 |
Correct |
1 ms |
592 KB |
Output is correct |
18 |
Correct |
1 ms |
336 KB |
Output is correct |
19 |
Correct |
1 ms |
336 KB |
Output is correct |
20 |
Correct |
1 ms |
336 KB |
Output is correct |
21 |
Correct |
1 ms |
452 KB |
Output is correct |
22 |
Correct |
1 ms |
336 KB |
Output is correct |
23 |
Correct |
1 ms |
336 KB |
Output is correct |
24 |
Correct |
1 ms |
336 KB |
Output is correct |
25 |
Correct |
1 ms |
336 KB |
Output is correct |
26 |
Correct |
1 ms |
336 KB |
Output is correct |
27 |
Correct |
1 ms |
336 KB |
Output is correct |
28 |
Correct |
1 ms |
336 KB |
Output is correct |
29 |
Correct |
1 ms |
336 KB |
Output is correct |
30 |
Correct |
1 ms |
336 KB |
Output is correct |
31 |
Correct |
1 ms |
336 KB |
Output is correct |
32 |
Correct |
1 ms |
336 KB |
Output is correct |
33 |
Correct |
6 ms |
1104 KB |
Output is correct |
34 |
Correct |
1 ms |
336 KB |
Output is correct |
35 |
Correct |
2 ms |
848 KB |
Output is correct |
36 |
Correct |
7 ms |
1104 KB |
Output is correct |
37 |
Correct |
15 ms |
12956 KB |
Output is correct |
38 |
Correct |
11 ms |
2064 KB |
Output is correct |
39 |
Correct |
5 ms |
1616 KB |
Output is correct |
40 |
Correct |
8 ms |
1360 KB |
Output is correct |
41 |
Correct |
4 ms |
1104 KB |
Output is correct |
42 |
Correct |
6 ms |
2384 KB |
Output is correct |
43 |
Correct |
7 ms |
1872 KB |
Output is correct |
44 |
Correct |
6 ms |
1872 KB |
Output is correct |
45 |
Correct |
18 ms |
16740 KB |
Output is correct |
46 |
Correct |
26 ms |
16688 KB |
Output is correct |
47 |
Correct |
19 ms |
8744 KB |
Output is correct |
48 |
Correct |
11 ms |
2128 KB |
Output is correct |
49 |
Correct |
8 ms |
1616 KB |
Output is correct |
50 |
Correct |
10 ms |
1496 KB |
Output is correct |
51 |
Correct |
7 ms |
1532 KB |
Output is correct |
52 |
Correct |
8 ms |
1360 KB |
Output is correct |
53 |
Correct |
8 ms |
1360 KB |
Output is correct |
54 |
Correct |
5 ms |
1528 KB |
Output is correct |
55 |
Correct |
14 ms |
2640 KB |
Output is correct |
56 |
Correct |
14 ms |
8784 KB |
Output is correct |
57 |
Correct |
21 ms |
3676 KB |
Output is correct |
58 |
Correct |
26 ms |
4688 KB |
Output is correct |
59 |
Correct |
11 ms |
3408 KB |
Output is correct |
60 |
Correct |
24 ms |
2640 KB |
Output is correct |
61 |
Correct |
12 ms |
2384 KB |
Output is correct |
62 |
Correct |
13 ms |
5412 KB |
Output is correct |
63 |
Correct |
15 ms |
4348 KB |
Output is correct |
64 |
Correct |
12 ms |
4176 KB |
Output is correct |
65 |
Correct |
41 ms |
40964 KB |
Output is correct |
66 |
Correct |
41 ms |
40964 KB |
Output is correct |
67 |
Correct |
37 ms |
21048 KB |
Output is correct |
68 |
Correct |
16 ms |
4176 KB |
Output is correct |
69 |
Correct |
15 ms |
3588 KB |
Output is correct |
70 |
Correct |
15 ms |
3152 KB |
Output is correct |
71 |
Correct |
14 ms |
3164 KB |
Output is correct |
72 |
Correct |
19 ms |
2384 KB |
Output is correct |
73 |
Correct |
19 ms |
2384 KB |
Output is correct |
74 |
Correct |
11 ms |
2384 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
1 ms |
512 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
760 KB |
Output is correct |
8 |
Correct |
1 ms |
592 KB |
Output is correct |
9 |
Correct |
1 ms |
336 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
11 |
Correct |
1 ms |
336 KB |
Output is correct |
12 |
Correct |
1 ms |
336 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Correct |
1 ms |
336 KB |
Output is correct |
16 |
Correct |
1 ms |
504 KB |
Output is correct |
17 |
Correct |
1 ms |
336 KB |
Output is correct |
18 |
Correct |
1 ms |
336 KB |
Output is correct |
19 |
Correct |
6 ms |
1360 KB |
Output is correct |
20 |
Correct |
14 ms |
12952 KB |
Output is correct |
21 |
Correct |
5 ms |
1616 KB |
Output is correct |
22 |
Correct |
8 ms |
1104 KB |
Output is correct |
23 |
Correct |
4 ms |
1192 KB |
Output is correct |
24 |
Correct |
17 ms |
16620 KB |
Output is correct |
25 |
Correct |
17 ms |
16740 KB |
Output is correct |
26 |
Correct |
8 ms |
1360 KB |
Output is correct |
27 |
Correct |
8 ms |
1104 KB |
Output is correct |
28 |
Correct |
5 ms |
1104 KB |
Output is correct |
29 |
Correct |
13 ms |
2652 KB |
Output is correct |
30 |
Correct |
12 ms |
8784 KB |
Output is correct |
31 |
Correct |
11 ms |
3480 KB |
Output is correct |
32 |
Correct |
18 ms |
2384 KB |
Output is correct |
33 |
Correct |
11 ms |
2384 KB |
Output is correct |
34 |
Correct |
39 ms |
40952 KB |
Output is correct |
35 |
Correct |
40 ms |
40964 KB |
Output is correct |
36 |
Correct |
23 ms |
2384 KB |
Output is correct |
37 |
Correct |
23 ms |
2396 KB |
Output is correct |
38 |
Correct |
12 ms |
2384 KB |
Output is correct |
39 |
Correct |
141 ms |
21304 KB |
Output is correct |
40 |
Correct |
24 ms |
5124 KB |
Output is correct |
41 |
Correct |
51 ms |
50292 KB |
Output is correct |
42 |
Correct |
25 ms |
3408 KB |
Output is correct |
43 |
Correct |
47 ms |
33900 KB |
Output is correct |
44 |
Correct |
110 ms |
40040 KB |
Output is correct |
45 |
Correct |
113 ms |
51156 KB |
Output is correct |
46 |
Correct |
131 ms |
30300 KB |
Output is correct |
47 |
Correct |
209 ms |
20044 KB |
Output is correct |
48 |
Correct |
134 ms |
20024 KB |
Output is correct |
49 |
Correct |
369 ms |
405564 KB |
Output is correct |
50 |
Correct |
370 ms |
406520 KB |
Output is correct |
51 |
Correct |
197 ms |
20360 KB |
Output is correct |
52 |
Correct |
204 ms |
20040 KB |
Output is correct |
53 |
Correct |
147 ms |
20044 KB |
Output is correct |
54 |
Correct |
1 ms |
336 KB |
Output is correct |
55 |
Correct |
1 ms |
336 KB |
Output is correct |
56 |
Correct |
1 ms |
336 KB |
Output is correct |
57 |
Correct |
1 ms |
336 KB |
Output is correct |
58 |
Correct |
1 ms |
412 KB |
Output is correct |
59 |
Correct |
1 ms |
336 KB |
Output is correct |
60 |
Correct |
1 ms |
336 KB |
Output is correct |
61 |
Correct |
1 ms |
336 KB |
Output is correct |
62 |
Correct |
1 ms |
504 KB |
Output is correct |
63 |
Correct |
1 ms |
336 KB |
Output is correct |
64 |
Correct |
1 ms |
336 KB |
Output is correct |
65 |
Correct |
1 ms |
336 KB |
Output is correct |
66 |
Correct |
1 ms |
336 KB |
Output is correct |
67 |
Correct |
1 ms |
336 KB |
Output is correct |
68 |
Correct |
1 ms |
604 KB |
Output is correct |
69 |
Correct |
1 ms |
648 KB |
Output is correct |
70 |
Correct |
1 ms |
592 KB |
Output is correct |
71 |
Correct |
1 ms |
336 KB |
Output is correct |
72 |
Correct |
1 ms |
336 KB |
Output is correct |
73 |
Correct |
1 ms |
336 KB |
Output is correct |
74 |
Correct |
1 ms |
452 KB |
Output is correct |
75 |
Correct |
1 ms |
336 KB |
Output is correct |
76 |
Correct |
1 ms |
336 KB |
Output is correct |
77 |
Correct |
1 ms |
336 KB |
Output is correct |
78 |
Correct |
1 ms |
336 KB |
Output is correct |
79 |
Correct |
1 ms |
336 KB |
Output is correct |
80 |
Correct |
1 ms |
336 KB |
Output is correct |
81 |
Correct |
1 ms |
336 KB |
Output is correct |
82 |
Correct |
1 ms |
336 KB |
Output is correct |
83 |
Correct |
1 ms |
336 KB |
Output is correct |
84 |
Correct |
1 ms |
336 KB |
Output is correct |
85 |
Correct |
1 ms |
336 KB |
Output is correct |
86 |
Correct |
1 ms |
336 KB |
Output is correct |
87 |
Correct |
1 ms |
336 KB |
Output is correct |
88 |
Correct |
1 ms |
336 KB |
Output is correct |
89 |
Correct |
1 ms |
524 KB |
Output is correct |
90 |
Correct |
1 ms |
336 KB |
Output is correct |
91 |
Correct |
1 ms |
336 KB |
Output is correct |
92 |
Correct |
1 ms |
336 KB |
Output is correct |
93 |
Correct |
1 ms |
336 KB |
Output is correct |
94 |
Correct |
1 ms |
336 KB |
Output is correct |
95 |
Correct |
1 ms |
336 KB |
Output is correct |
96 |
Correct |
1 ms |
336 KB |
Output is correct |
97 |
Correct |
1 ms |
592 KB |
Output is correct |
98 |
Correct |
1 ms |
336 KB |
Output is correct |
99 |
Correct |
1 ms |
336 KB |
Output is correct |
100 |
Correct |
1 ms |
336 KB |
Output is correct |
101 |
Correct |
1 ms |
568 KB |
Output is correct |
102 |
Correct |
1 ms |
336 KB |
Output is correct |
103 |
Correct |
1 ms |
336 KB |
Output is correct |
104 |
Correct |
1 ms |
336 KB |
Output is correct |
105 |
Correct |
1 ms |
336 KB |
Output is correct |
106 |
Correct |
1 ms |
336 KB |
Output is correct |
107 |
Correct |
1 ms |
336 KB |
Output is correct |
108 |
Correct |
1 ms |
504 KB |
Output is correct |
109 |
Correct |
1 ms |
336 KB |
Output is correct |
110 |
Correct |
6 ms |
1120 KB |
Output is correct |
111 |
Correct |
9 ms |
2128 KB |
Output is correct |
112 |
Correct |
5 ms |
1752 KB |
Output is correct |
113 |
Correct |
6 ms |
2556 KB |
Output is correct |
114 |
Correct |
7 ms |
1872 KB |
Output is correct |
115 |
Correct |
7 ms |
1872 KB |
Output is correct |
116 |
Correct |
7 ms |
1528 KB |
Output is correct |
117 |
Correct |
9 ms |
1444 KB |
Output is correct |
118 |
Correct |
9 ms |
1360 KB |
Output is correct |
119 |
Correct |
22 ms |
3688 KB |
Output is correct |
120 |
Correct |
10 ms |
3408 KB |
Output is correct |
121 |
Correct |
13 ms |
5200 KB |
Output is correct |
122 |
Correct |
18 ms |
4176 KB |
Output is correct |
123 |
Correct |
12 ms |
4176 KB |
Output is correct |
124 |
Correct |
74 ms |
12616 KB |
Output is correct |
125 |
Correct |
243 ms |
38556 KB |
Output is correct |
126 |
Correct |
127 ms |
29236 KB |
Output is correct |
127 |
Correct |
148 ms |
48156 KB |
Output is correct |
128 |
Correct |
171 ms |
38200 KB |
Output is correct |
129 |
Correct |
114 ms |
38724 KB |
Output is correct |
130 |
Correct |
209 ms |
44192 KB |
Output is correct |
131 |
Correct |
204 ms |
42148 KB |
Output is correct |
132 |
Correct |
6 ms |
1104 KB |
Output is correct |
133 |
Correct |
1 ms |
336 KB |
Output is correct |
134 |
Correct |
2 ms |
848 KB |
Output is correct |
135 |
Correct |
7 ms |
1104 KB |
Output is correct |
136 |
Correct |
15 ms |
12956 KB |
Output is correct |
137 |
Correct |
11 ms |
2064 KB |
Output is correct |
138 |
Correct |
5 ms |
1616 KB |
Output is correct |
139 |
Correct |
8 ms |
1360 KB |
Output is correct |
140 |
Correct |
4 ms |
1104 KB |
Output is correct |
141 |
Correct |
6 ms |
2384 KB |
Output is correct |
142 |
Correct |
7 ms |
1872 KB |
Output is correct |
143 |
Correct |
6 ms |
1872 KB |
Output is correct |
144 |
Correct |
18 ms |
16740 KB |
Output is correct |
145 |
Correct |
26 ms |
16688 KB |
Output is correct |
146 |
Correct |
19 ms |
8744 KB |
Output is correct |
147 |
Correct |
11 ms |
2128 KB |
Output is correct |
148 |
Correct |
8 ms |
1616 KB |
Output is correct |
149 |
Correct |
10 ms |
1496 KB |
Output is correct |
150 |
Correct |
7 ms |
1532 KB |
Output is correct |
151 |
Correct |
8 ms |
1360 KB |
Output is correct |
152 |
Correct |
8 ms |
1360 KB |
Output is correct |
153 |
Correct |
5 ms |
1528 KB |
Output is correct |
154 |
Correct |
14 ms |
2640 KB |
Output is correct |
155 |
Correct |
14 ms |
8784 KB |
Output is correct |
156 |
Correct |
21 ms |
3676 KB |
Output is correct |
157 |
Correct |
26 ms |
4688 KB |
Output is correct |
158 |
Correct |
11 ms |
3408 KB |
Output is correct |
159 |
Correct |
24 ms |
2640 KB |
Output is correct |
160 |
Correct |
12 ms |
2384 KB |
Output is correct |
161 |
Correct |
13 ms |
5412 KB |
Output is correct |
162 |
Correct |
15 ms |
4348 KB |
Output is correct |
163 |
Correct |
12 ms |
4176 KB |
Output is correct |
164 |
Correct |
41 ms |
40964 KB |
Output is correct |
165 |
Correct |
41 ms |
40964 KB |
Output is correct |
166 |
Correct |
37 ms |
21048 KB |
Output is correct |
167 |
Correct |
16 ms |
4176 KB |
Output is correct |
168 |
Correct |
15 ms |
3588 KB |
Output is correct |
169 |
Correct |
15 ms |
3152 KB |
Output is correct |
170 |
Correct |
14 ms |
3164 KB |
Output is correct |
171 |
Correct |
19 ms |
2384 KB |
Output is correct |
172 |
Correct |
19 ms |
2384 KB |
Output is correct |
173 |
Correct |
11 ms |
2384 KB |
Output is correct |
174 |
Correct |
35 ms |
6664 KB |
Output is correct |
175 |
Correct |
40 ms |
6396 KB |
Output is correct |
176 |
Correct |
121 ms |
71012 KB |
Output is correct |
177 |
Correct |
124 ms |
24444 KB |
Output is correct |
178 |
Correct |
168 ms |
25932 KB |
Output is correct |
179 |
Correct |
140 ms |
29380 KB |
Output is correct |
180 |
Correct |
139 ms |
24392 KB |
Output is correct |
181 |
Correct |
156 ms |
24648 KB |
Output is correct |
182 |
Correct |
142 ms |
22864 KB |
Output is correct |
183 |
Correct |
148 ms |
30408 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
1 ms |
512 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
760 KB |
Output is correct |
8 |
Correct |
1 ms |
592 KB |
Output is correct |
9 |
Correct |
1 ms |
336 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
11 |
Correct |
1 ms |
336 KB |
Output is correct |
12 |
Correct |
1 ms |
336 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Correct |
1 ms |
336 KB |
Output is correct |
16 |
Correct |
1 ms |
504 KB |
Output is correct |
17 |
Correct |
1 ms |
336 KB |
Output is correct |
18 |
Correct |
1 ms |
336 KB |
Output is correct |
19 |
Correct |
6 ms |
1360 KB |
Output is correct |
20 |
Correct |
14 ms |
12952 KB |
Output is correct |
21 |
Correct |
5 ms |
1616 KB |
Output is correct |
22 |
Correct |
8 ms |
1104 KB |
Output is correct |
23 |
Correct |
4 ms |
1192 KB |
Output is correct |
24 |
Correct |
17 ms |
16620 KB |
Output is correct |
25 |
Correct |
17 ms |
16740 KB |
Output is correct |
26 |
Correct |
8 ms |
1360 KB |
Output is correct |
27 |
Correct |
8 ms |
1104 KB |
Output is correct |
28 |
Correct |
5 ms |
1104 KB |
Output is correct |
29 |
Correct |
13 ms |
2652 KB |
Output is correct |
30 |
Correct |
12 ms |
8784 KB |
Output is correct |
31 |
Correct |
11 ms |
3480 KB |
Output is correct |
32 |
Correct |
18 ms |
2384 KB |
Output is correct |
33 |
Correct |
11 ms |
2384 KB |
Output is correct |
34 |
Correct |
39 ms |
40952 KB |
Output is correct |
35 |
Correct |
40 ms |
40964 KB |
Output is correct |
36 |
Correct |
23 ms |
2384 KB |
Output is correct |
37 |
Correct |
23 ms |
2396 KB |
Output is correct |
38 |
Correct |
12 ms |
2384 KB |
Output is correct |
39 |
Correct |
141 ms |
21304 KB |
Output is correct |
40 |
Correct |
24 ms |
5124 KB |
Output is correct |
41 |
Correct |
51 ms |
50292 KB |
Output is correct |
42 |
Correct |
25 ms |
3408 KB |
Output is correct |
43 |
Correct |
47 ms |
33900 KB |
Output is correct |
44 |
Correct |
110 ms |
40040 KB |
Output is correct |
45 |
Correct |
113 ms |
51156 KB |
Output is correct |
46 |
Correct |
131 ms |
30300 KB |
Output is correct |
47 |
Correct |
209 ms |
20044 KB |
Output is correct |
48 |
Correct |
134 ms |
20024 KB |
Output is correct |
49 |
Correct |
369 ms |
405564 KB |
Output is correct |
50 |
Correct |
370 ms |
406520 KB |
Output is correct |
51 |
Correct |
197 ms |
20360 KB |
Output is correct |
52 |
Correct |
204 ms |
20040 KB |
Output is correct |
53 |
Correct |
147 ms |
20044 KB |
Output is correct |
54 |
Correct |
1 ms |
336 KB |
Output is correct |
55 |
Correct |
1 ms |
336 KB |
Output is correct |
56 |
Correct |
1 ms |
336 KB |
Output is correct |
57 |
Correct |
1 ms |
336 KB |
Output is correct |
58 |
Correct |
1 ms |
412 KB |
Output is correct |
59 |
Correct |
1 ms |
336 KB |
Output is correct |
60 |
Correct |
1 ms |
336 KB |
Output is correct |
61 |
Correct |
1 ms |
336 KB |
Output is correct |
62 |
Correct |
1 ms |
504 KB |
Output is correct |
63 |
Correct |
1 ms |
336 KB |
Output is correct |
64 |
Correct |
1 ms |
336 KB |
Output is correct |
65 |
Correct |
1 ms |
336 KB |
Output is correct |
66 |
Correct |
1 ms |
336 KB |
Output is correct |
67 |
Correct |
1 ms |
336 KB |
Output is correct |
68 |
Correct |
1 ms |
604 KB |
Output is correct |
69 |
Correct |
1 ms |
648 KB |
Output is correct |
70 |
Correct |
1 ms |
592 KB |
Output is correct |
71 |
Correct |
1 ms |
336 KB |
Output is correct |
72 |
Correct |
1 ms |
336 KB |
Output is correct |
73 |
Correct |
1 ms |
336 KB |
Output is correct |
74 |
Correct |
1 ms |
452 KB |
Output is correct |
75 |
Correct |
1 ms |
336 KB |
Output is correct |
76 |
Correct |
1 ms |
336 KB |
Output is correct |
77 |
Correct |
1 ms |
336 KB |
Output is correct |
78 |
Correct |
1 ms |
336 KB |
Output is correct |
79 |
Correct |
1 ms |
336 KB |
Output is correct |
80 |
Correct |
1 ms |
336 KB |
Output is correct |
81 |
Correct |
1 ms |
336 KB |
Output is correct |
82 |
Correct |
1 ms |
336 KB |
Output is correct |
83 |
Correct |
1 ms |
336 KB |
Output is correct |
84 |
Correct |
1 ms |
336 KB |
Output is correct |
85 |
Correct |
1 ms |
336 KB |
Output is correct |
86 |
Correct |
1 ms |
336 KB |
Output is correct |
87 |
Correct |
1 ms |
336 KB |
Output is correct |
88 |
Correct |
1 ms |
336 KB |
Output is correct |
89 |
Correct |
1 ms |
524 KB |
Output is correct |
90 |
Correct |
1 ms |
336 KB |
Output is correct |
91 |
Correct |
1 ms |
336 KB |
Output is correct |
92 |
Correct |
1 ms |
336 KB |
Output is correct |
93 |
Correct |
1 ms |
336 KB |
Output is correct |
94 |
Correct |
1 ms |
336 KB |
Output is correct |
95 |
Correct |
1 ms |
336 KB |
Output is correct |
96 |
Correct |
1 ms |
336 KB |
Output is correct |
97 |
Correct |
1 ms |
592 KB |
Output is correct |
98 |
Correct |
1 ms |
336 KB |
Output is correct |
99 |
Correct |
1 ms |
336 KB |
Output is correct |
100 |
Correct |
1 ms |
336 KB |
Output is correct |
101 |
Correct |
1 ms |
568 KB |
Output is correct |
102 |
Correct |
1 ms |
336 KB |
Output is correct |
103 |
Correct |
1 ms |
336 KB |
Output is correct |
104 |
Correct |
1 ms |
336 KB |
Output is correct |
105 |
Correct |
1 ms |
336 KB |
Output is correct |
106 |
Correct |
1 ms |
336 KB |
Output is correct |
107 |
Correct |
1 ms |
336 KB |
Output is correct |
108 |
Correct |
1 ms |
504 KB |
Output is correct |
109 |
Correct |
1 ms |
336 KB |
Output is correct |
110 |
Correct |
6 ms |
1120 KB |
Output is correct |
111 |
Correct |
9 ms |
2128 KB |
Output is correct |
112 |
Correct |
5 ms |
1752 KB |
Output is correct |
113 |
Correct |
6 ms |
2556 KB |
Output is correct |
114 |
Correct |
7 ms |
1872 KB |
Output is correct |
115 |
Correct |
7 ms |
1872 KB |
Output is correct |
116 |
Correct |
7 ms |
1528 KB |
Output is correct |
117 |
Correct |
9 ms |
1444 KB |
Output is correct |
118 |
Correct |
9 ms |
1360 KB |
Output is correct |
119 |
Correct |
22 ms |
3688 KB |
Output is correct |
120 |
Correct |
10 ms |
3408 KB |
Output is correct |
121 |
Correct |
13 ms |
5200 KB |
Output is correct |
122 |
Correct |
18 ms |
4176 KB |
Output is correct |
123 |
Correct |
12 ms |
4176 KB |
Output is correct |
124 |
Correct |
74 ms |
12616 KB |
Output is correct |
125 |
Correct |
243 ms |
38556 KB |
Output is correct |
126 |
Correct |
127 ms |
29236 KB |
Output is correct |
127 |
Correct |
148 ms |
48156 KB |
Output is correct |
128 |
Correct |
171 ms |
38200 KB |
Output is correct |
129 |
Correct |
114 ms |
38724 KB |
Output is correct |
130 |
Correct |
209 ms |
44192 KB |
Output is correct |
131 |
Correct |
204 ms |
42148 KB |
Output is correct |
132 |
Correct |
6 ms |
1104 KB |
Output is correct |
133 |
Correct |
1 ms |
336 KB |
Output is correct |
134 |
Correct |
2 ms |
848 KB |
Output is correct |
135 |
Correct |
7 ms |
1104 KB |
Output is correct |
136 |
Correct |
15 ms |
12956 KB |
Output is correct |
137 |
Correct |
11 ms |
2064 KB |
Output is correct |
138 |
Correct |
5 ms |
1616 KB |
Output is correct |
139 |
Correct |
8 ms |
1360 KB |
Output is correct |
140 |
Correct |
4 ms |
1104 KB |
Output is correct |
141 |
Correct |
6 ms |
2384 KB |
Output is correct |
142 |
Correct |
7 ms |
1872 KB |
Output is correct |
143 |
Correct |
6 ms |
1872 KB |
Output is correct |
144 |
Correct |
18 ms |
16740 KB |
Output is correct |
145 |
Correct |
26 ms |
16688 KB |
Output is correct |
146 |
Correct |
19 ms |
8744 KB |
Output is correct |
147 |
Correct |
11 ms |
2128 KB |
Output is correct |
148 |
Correct |
8 ms |
1616 KB |
Output is correct |
149 |
Correct |
10 ms |
1496 KB |
Output is correct |
150 |
Correct |
7 ms |
1532 KB |
Output is correct |
151 |
Correct |
8 ms |
1360 KB |
Output is correct |
152 |
Correct |
8 ms |
1360 KB |
Output is correct |
153 |
Correct |
5 ms |
1528 KB |
Output is correct |
154 |
Correct |
14 ms |
2640 KB |
Output is correct |
155 |
Correct |
14 ms |
8784 KB |
Output is correct |
156 |
Correct |
21 ms |
3676 KB |
Output is correct |
157 |
Correct |
26 ms |
4688 KB |
Output is correct |
158 |
Correct |
11 ms |
3408 KB |
Output is correct |
159 |
Correct |
24 ms |
2640 KB |
Output is correct |
160 |
Correct |
12 ms |
2384 KB |
Output is correct |
161 |
Correct |
13 ms |
5412 KB |
Output is correct |
162 |
Correct |
15 ms |
4348 KB |
Output is correct |
163 |
Correct |
12 ms |
4176 KB |
Output is correct |
164 |
Correct |
41 ms |
40964 KB |
Output is correct |
165 |
Correct |
41 ms |
40964 KB |
Output is correct |
166 |
Correct |
37 ms |
21048 KB |
Output is correct |
167 |
Correct |
16 ms |
4176 KB |
Output is correct |
168 |
Correct |
15 ms |
3588 KB |
Output is correct |
169 |
Correct |
15 ms |
3152 KB |
Output is correct |
170 |
Correct |
14 ms |
3164 KB |
Output is correct |
171 |
Correct |
19 ms |
2384 KB |
Output is correct |
172 |
Correct |
19 ms |
2384 KB |
Output is correct |
173 |
Correct |
11 ms |
2384 KB |
Output is correct |
174 |
Correct |
35 ms |
6664 KB |
Output is correct |
175 |
Correct |
40 ms |
6396 KB |
Output is correct |
176 |
Correct |
121 ms |
71012 KB |
Output is correct |
177 |
Correct |
124 ms |
24444 KB |
Output is correct |
178 |
Correct |
168 ms |
25932 KB |
Output is correct |
179 |
Correct |
140 ms |
29380 KB |
Output is correct |
180 |
Correct |
139 ms |
24392 KB |
Output is correct |
181 |
Correct |
156 ms |
24648 KB |
Output is correct |
182 |
Correct |
142 ms |
22864 KB |
Output is correct |
183 |
Correct |
148 ms |
30408 KB |
Output is correct |
184 |
Correct |
280 ms |
39240 KB |
Output is correct |
185 |
Correct |
167 ms |
33560 KB |
Output is correct |
186 |
Correct |
309 ms |
48876 KB |
Output is correct |
187 |
Correct |
234 ms |
31560 KB |
Output is correct |
188 |
Correct |
286 ms |
59644 KB |
Output is correct |
189 |
Correct |
383 ms |
39400 KB |
Output is correct |
190 |
Correct |
296 ms |
40776 KB |
Output is correct |
191 |
Correct |
292 ms |
93772 KB |
Output is correct |
192 |
Correct |
298 ms |
75604 KB |
Output is correct |
193 |
Correct |
241 ms |
78156 KB |
Output is correct |
194 |
Correct |
784 ms |
810700 KB |
Output is correct |
195 |
Correct |
809 ms |
810500 KB |
Output is correct |
196 |
Correct |
301 ms |
54528 KB |
Output is correct |
197 |
Correct |
281 ms |
49360 KB |
Output is correct |
198 |
Correct |
304 ms |
46052 KB |
Output is correct |
199 |
Correct |
293 ms |
45284 KB |
Output is correct |
200 |
Correct |
427 ms |
41580 KB |
Output is correct |
201 |
Correct |
412 ms |
42312 KB |
Output is correct |
202 |
Correct |
299 ms |
42208 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
1 ms |
512 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
760 KB |
Output is correct |
8 |
Correct |
1 ms |
592 KB |
Output is correct |
9 |
Correct |
1 ms |
336 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
11 |
Correct |
1 ms |
336 KB |
Output is correct |
12 |
Correct |
1 ms |
336 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Correct |
1 ms |
336 KB |
Output is correct |
16 |
Correct |
1 ms |
504 KB |
Output is correct |
17 |
Correct |
1 ms |
336 KB |
Output is correct |
18 |
Correct |
1 ms |
336 KB |
Output is correct |
19 |
Correct |
6 ms |
1360 KB |
Output is correct |
20 |
Correct |
14 ms |
12952 KB |
Output is correct |
21 |
Correct |
5 ms |
1616 KB |
Output is correct |
22 |
Correct |
8 ms |
1104 KB |
Output is correct |
23 |
Correct |
4 ms |
1192 KB |
Output is correct |
24 |
Correct |
17 ms |
16620 KB |
Output is correct |
25 |
Correct |
17 ms |
16740 KB |
Output is correct |
26 |
Correct |
8 ms |
1360 KB |
Output is correct |
27 |
Correct |
8 ms |
1104 KB |
Output is correct |
28 |
Correct |
5 ms |
1104 KB |
Output is correct |
29 |
Correct |
13 ms |
2652 KB |
Output is correct |
30 |
Correct |
12 ms |
8784 KB |
Output is correct |
31 |
Correct |
11 ms |
3480 KB |
Output is correct |
32 |
Correct |
18 ms |
2384 KB |
Output is correct |
33 |
Correct |
11 ms |
2384 KB |
Output is correct |
34 |
Correct |
39 ms |
40952 KB |
Output is correct |
35 |
Correct |
40 ms |
40964 KB |
Output is correct |
36 |
Correct |
23 ms |
2384 KB |
Output is correct |
37 |
Correct |
23 ms |
2396 KB |
Output is correct |
38 |
Correct |
12 ms |
2384 KB |
Output is correct |
39 |
Correct |
141 ms |
21304 KB |
Output is correct |
40 |
Correct |
24 ms |
5124 KB |
Output is correct |
41 |
Correct |
51 ms |
50292 KB |
Output is correct |
42 |
Correct |
25 ms |
3408 KB |
Output is correct |
43 |
Correct |
47 ms |
33900 KB |
Output is correct |
44 |
Correct |
110 ms |
40040 KB |
Output is correct |
45 |
Correct |
113 ms |
51156 KB |
Output is correct |
46 |
Correct |
131 ms |
30300 KB |
Output is correct |
47 |
Correct |
209 ms |
20044 KB |
Output is correct |
48 |
Correct |
134 ms |
20024 KB |
Output is correct |
49 |
Correct |
369 ms |
405564 KB |
Output is correct |
50 |
Correct |
370 ms |
406520 KB |
Output is correct |
51 |
Correct |
197 ms |
20360 KB |
Output is correct |
52 |
Correct |
204 ms |
20040 KB |
Output is correct |
53 |
Correct |
147 ms |
20044 KB |
Output is correct |
54 |
Correct |
1 ms |
336 KB |
Output is correct |
55 |
Correct |
1 ms |
336 KB |
Output is correct |
56 |
Correct |
1 ms |
336 KB |
Output is correct |
57 |
Correct |
1 ms |
336 KB |
Output is correct |
58 |
Correct |
1 ms |
412 KB |
Output is correct |
59 |
Correct |
1 ms |
336 KB |
Output is correct |
60 |
Correct |
1 ms |
336 KB |
Output is correct |
61 |
Correct |
1 ms |
336 KB |
Output is correct |
62 |
Correct |
1 ms |
504 KB |
Output is correct |
63 |
Correct |
1 ms |
336 KB |
Output is correct |
64 |
Correct |
1 ms |
336 KB |
Output is correct |
65 |
Correct |
1 ms |
336 KB |
Output is correct |
66 |
Correct |
1 ms |
336 KB |
Output is correct |
67 |
Correct |
1 ms |
336 KB |
Output is correct |
68 |
Correct |
1 ms |
604 KB |
Output is correct |
69 |
Correct |
1 ms |
648 KB |
Output is correct |
70 |
Correct |
1 ms |
592 KB |
Output is correct |
71 |
Correct |
1 ms |
336 KB |
Output is correct |
72 |
Correct |
1 ms |
336 KB |
Output is correct |
73 |
Correct |
1 ms |
336 KB |
Output is correct |
74 |
Correct |
1 ms |
452 KB |
Output is correct |
75 |
Correct |
1 ms |
336 KB |
Output is correct |
76 |
Correct |
1 ms |
336 KB |
Output is correct |
77 |
Correct |
1 ms |
336 KB |
Output is correct |
78 |
Correct |
1 ms |
336 KB |
Output is correct |
79 |
Correct |
1 ms |
336 KB |
Output is correct |
80 |
Correct |
1 ms |
336 KB |
Output is correct |
81 |
Correct |
1 ms |
336 KB |
Output is correct |
82 |
Correct |
1 ms |
336 KB |
Output is correct |
83 |
Correct |
1 ms |
336 KB |
Output is correct |
84 |
Correct |
1 ms |
336 KB |
Output is correct |
85 |
Correct |
1 ms |
336 KB |
Output is correct |
86 |
Correct |
1 ms |
336 KB |
Output is correct |
87 |
Correct |
1 ms |
336 KB |
Output is correct |
88 |
Correct |
1 ms |
336 KB |
Output is correct |
89 |
Correct |
1 ms |
524 KB |
Output is correct |
90 |
Correct |
1 ms |
336 KB |
Output is correct |
91 |
Correct |
1 ms |
336 KB |
Output is correct |
92 |
Correct |
1 ms |
336 KB |
Output is correct |
93 |
Correct |
1 ms |
336 KB |
Output is correct |
94 |
Correct |
1 ms |
336 KB |
Output is correct |
95 |
Correct |
1 ms |
336 KB |
Output is correct |
96 |
Correct |
1 ms |
336 KB |
Output is correct |
97 |
Correct |
1 ms |
592 KB |
Output is correct |
98 |
Correct |
1 ms |
336 KB |
Output is correct |
99 |
Correct |
1 ms |
336 KB |
Output is correct |
100 |
Correct |
1 ms |
336 KB |
Output is correct |
101 |
Correct |
1 ms |
568 KB |
Output is correct |
102 |
Correct |
1 ms |
336 KB |
Output is correct |
103 |
Correct |
1 ms |
336 KB |
Output is correct |
104 |
Correct |
1 ms |
336 KB |
Output is correct |
105 |
Correct |
1 ms |
336 KB |
Output is correct |
106 |
Correct |
1 ms |
336 KB |
Output is correct |
107 |
Correct |
1 ms |
336 KB |
Output is correct |
108 |
Correct |
1 ms |
504 KB |
Output is correct |
109 |
Correct |
1 ms |
336 KB |
Output is correct |
110 |
Correct |
6 ms |
1120 KB |
Output is correct |
111 |
Correct |
9 ms |
2128 KB |
Output is correct |
112 |
Correct |
5 ms |
1752 KB |
Output is correct |
113 |
Correct |
6 ms |
2556 KB |
Output is correct |
114 |
Correct |
7 ms |
1872 KB |
Output is correct |
115 |
Correct |
7 ms |
1872 KB |
Output is correct |
116 |
Correct |
7 ms |
1528 KB |
Output is correct |
117 |
Correct |
9 ms |
1444 KB |
Output is correct |
118 |
Correct |
9 ms |
1360 KB |
Output is correct |
119 |
Correct |
22 ms |
3688 KB |
Output is correct |
120 |
Correct |
10 ms |
3408 KB |
Output is correct |
121 |
Correct |
13 ms |
5200 KB |
Output is correct |
122 |
Correct |
18 ms |
4176 KB |
Output is correct |
123 |
Correct |
12 ms |
4176 KB |
Output is correct |
124 |
Correct |
74 ms |
12616 KB |
Output is correct |
125 |
Correct |
243 ms |
38556 KB |
Output is correct |
126 |
Correct |
127 ms |
29236 KB |
Output is correct |
127 |
Correct |
148 ms |
48156 KB |
Output is correct |
128 |
Correct |
171 ms |
38200 KB |
Output is correct |
129 |
Correct |
114 ms |
38724 KB |
Output is correct |
130 |
Correct |
209 ms |
44192 KB |
Output is correct |
131 |
Correct |
204 ms |
42148 KB |
Output is correct |
132 |
Correct |
6 ms |
1104 KB |
Output is correct |
133 |
Correct |
1 ms |
336 KB |
Output is correct |
134 |
Correct |
2 ms |
848 KB |
Output is correct |
135 |
Correct |
7 ms |
1104 KB |
Output is correct |
136 |
Correct |
15 ms |
12956 KB |
Output is correct |
137 |
Correct |
11 ms |
2064 KB |
Output is correct |
138 |
Correct |
5 ms |
1616 KB |
Output is correct |
139 |
Correct |
8 ms |
1360 KB |
Output is correct |
140 |
Correct |
4 ms |
1104 KB |
Output is correct |
141 |
Correct |
6 ms |
2384 KB |
Output is correct |
142 |
Correct |
7 ms |
1872 KB |
Output is correct |
143 |
Correct |
6 ms |
1872 KB |
Output is correct |
144 |
Correct |
18 ms |
16740 KB |
Output is correct |
145 |
Correct |
26 ms |
16688 KB |
Output is correct |
146 |
Correct |
19 ms |
8744 KB |
Output is correct |
147 |
Correct |
11 ms |
2128 KB |
Output is correct |
148 |
Correct |
8 ms |
1616 KB |
Output is correct |
149 |
Correct |
10 ms |
1496 KB |
Output is correct |
150 |
Correct |
7 ms |
1532 KB |
Output is correct |
151 |
Correct |
8 ms |
1360 KB |
Output is correct |
152 |
Correct |
8 ms |
1360 KB |
Output is correct |
153 |
Correct |
5 ms |
1528 KB |
Output is correct |
154 |
Correct |
14 ms |
2640 KB |
Output is correct |
155 |
Correct |
14 ms |
8784 KB |
Output is correct |
156 |
Correct |
21 ms |
3676 KB |
Output is correct |
157 |
Correct |
26 ms |
4688 KB |
Output is correct |
158 |
Correct |
11 ms |
3408 KB |
Output is correct |
159 |
Correct |
24 ms |
2640 KB |
Output is correct |
160 |
Correct |
12 ms |
2384 KB |
Output is correct |
161 |
Correct |
13 ms |
5412 KB |
Output is correct |
162 |
Correct |
15 ms |
4348 KB |
Output is correct |
163 |
Correct |
12 ms |
4176 KB |
Output is correct |
164 |
Correct |
41 ms |
40964 KB |
Output is correct |
165 |
Correct |
41 ms |
40964 KB |
Output is correct |
166 |
Correct |
37 ms |
21048 KB |
Output is correct |
167 |
Correct |
16 ms |
4176 KB |
Output is correct |
168 |
Correct |
15 ms |
3588 KB |
Output is correct |
169 |
Correct |
15 ms |
3152 KB |
Output is correct |
170 |
Correct |
14 ms |
3164 KB |
Output is correct |
171 |
Correct |
19 ms |
2384 KB |
Output is correct |
172 |
Correct |
19 ms |
2384 KB |
Output is correct |
173 |
Correct |
11 ms |
2384 KB |
Output is correct |
174 |
Correct |
35 ms |
6664 KB |
Output is correct |
175 |
Correct |
40 ms |
6396 KB |
Output is correct |
176 |
Correct |
121 ms |
71012 KB |
Output is correct |
177 |
Correct |
124 ms |
24444 KB |
Output is correct |
178 |
Correct |
168 ms |
25932 KB |
Output is correct |
179 |
Correct |
140 ms |
29380 KB |
Output is correct |
180 |
Correct |
139 ms |
24392 KB |
Output is correct |
181 |
Correct |
156 ms |
24648 KB |
Output is correct |
182 |
Correct |
142 ms |
22864 KB |
Output is correct |
183 |
Correct |
148 ms |
30408 KB |
Output is correct |
184 |
Correct |
280 ms |
39240 KB |
Output is correct |
185 |
Correct |
167 ms |
33560 KB |
Output is correct |
186 |
Correct |
309 ms |
48876 KB |
Output is correct |
187 |
Correct |
234 ms |
31560 KB |
Output is correct |
188 |
Correct |
286 ms |
59644 KB |
Output is correct |
189 |
Correct |
383 ms |
39400 KB |
Output is correct |
190 |
Correct |
296 ms |
40776 KB |
Output is correct |
191 |
Correct |
292 ms |
93772 KB |
Output is correct |
192 |
Correct |
298 ms |
75604 KB |
Output is correct |
193 |
Correct |
241 ms |
78156 KB |
Output is correct |
194 |
Correct |
784 ms |
810700 KB |
Output is correct |
195 |
Correct |
809 ms |
810500 KB |
Output is correct |
196 |
Correct |
301 ms |
54528 KB |
Output is correct |
197 |
Correct |
281 ms |
49360 KB |
Output is correct |
198 |
Correct |
304 ms |
46052 KB |
Output is correct |
199 |
Correct |
293 ms |
45284 KB |
Output is correct |
200 |
Correct |
427 ms |
41580 KB |
Output is correct |
201 |
Correct |
412 ms |
42312 KB |
Output is correct |
202 |
Correct |
299 ms |
42208 KB |
Output is correct |
203 |
Correct |
565 ms |
82428 KB |
Output is correct |
204 |
Correct |
238 ms |
50516 KB |
Output is correct |
205 |
Correct |
582 ms |
52048 KB |
Output is correct |
206 |
Correct |
644 ms |
127548 KB |
Output is correct |
207 |
Correct |
455 ms |
119432 KB |
Output is correct |
208 |
Correct |
867 ms |
83528 KB |
Output is correct |
209 |
Correct |
557 ms |
82244 KB |
Output is correct |
210 |
Correct |
582 ms |
191712 KB |
Output is correct |
211 |
Correct |
626 ms |
156028 KB |
Output is correct |
212 |
Correct |
476 ms |
154392 KB |
Output is correct |
213 |
Correct |
1780 ms |
1623952 KB |
Output is correct |
214 |
Correct |
1609 ms |
1623752 KB |
Output is correct |
215 |
Correct |
613 ms |
99204 KB |
Output is correct |
216 |
Correct |
606 ms |
96020 KB |
Output is correct |
217 |
Correct |
586 ms |
89888 KB |
Output is correct |
218 |
Correct |
603 ms |
87864 KB |
Output is correct |
219 |
Correct |
714 ms |
133588 KB |
Output is correct |
220 |
Correct |
667 ms |
149308 KB |
Output is correct |
221 |
Correct |
715 ms |
167936 KB |
Output is correct |
222 |
Correct |
700 ms |
169500 KB |
Output is correct |
223 |
Correct |
800 ms |
81480 KB |
Output is correct |
224 |
Correct |
751 ms |
82816 KB |
Output is correct |
225 |
Correct |
644 ms |
83316 KB |
Output is correct |