#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 10;
int main()
{
cin.tie(0)->sync_with_stdio(0);
int n, m, K;
cin >> n >> m >> K;
pair<int, int> A, B;
cin >> A.first >> A.second >> B.first >> B.second;
A.first--, A.second--, B.first--, B.second--;
vector<string> g(n);
for (int i = 0; i < n; i++)
{
cin >> g[i];
}
vector<vector<int>> rgt1(n, vector<int>(m, -1)), rgt2(n, vector<int>(m, -1));
vector<vector<bool>> vis(n, vector<bool>(m));
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m - 1; j++)
{
rgt1[i][j] = j + 1;
}
}
for (int i = 0; i < n - 1; i++)
{
for (int j = 0; j < m; j++)
{
rgt2[i][j] = i + 1;
}
}
auto able = [&](int i, int j)
{
return 0 <= i && i < n && 0 <= j && j < m && !vis[i][j] && g[i][j] == '.';
};
auto near = [&](int i, int j)
{
return min(abs(i - B.first), abs(j - B.second)) < K && max(abs(i - B.first), abs(j - B.second)) <= K;
};
function<int(int, int)> rr1 = [&](int i, int j) -> int
{
if (j == -1 || !vis[i][j])
{
return j;
}
return rgt1[i][j] = rr1(i, rgt1[i][j]);
};
function<int(int, int)> rr2 = [&](int i, int j) -> int
{
if (i == -1 || !vis[i][j])
{
return i;
}
return rgt2[i][j] = rr2(rgt2[i][j], j);
};
vector<vector<int>> dis(n, vector<int>(m, INF));
vector<pair<int, int>> res;
res.push_back(A);
vis[A.first][A.second] = 1;
dis[A.first][A.second] = 0;
while (res.size())
{
vector<pair<int, int>> res2;
while (res.size())
{
auto [i, j] = res.back();
res2.emplace_back(i, j);
res.pop_back();
for (auto &[dx, dy] : vector<pair<int, int>>{{1, 0}, {0, 1}, {-1, 0}, {0, -1}})
{
if (able(i + dx, j + dy))
{
res.emplace_back(i + dx, j + dy);
dis[i + dx][j + dy] = dis[i][j];
vis[i + dx][j + dy] = 1;
if (vis[B.first][B.second])
{
goto found;
}
}
}
}
while (res2.size())
{
auto [i, j] = res2.back();
res2.pop_back();
if (near(i, j))
{
dis[B.first][B.second] = dis[i][j] + 1;
goto found;
}
for (int ii : {max(0, i - K), min(n - 1, i + K)})
{
int jj = rr1(ii, max(0, j - (K - 1)));
while (jj != -1 && jj <= j + (K - 1))
{
res.emplace_back(ii, jj);
dis[ii][jj] = dis[i][j] + 1;
vis[ii][jj] = 1;
jj = rr1(ii, max(0, j - (K - 1)));
}
}
for (int jj : {max(0, j - K), min(m - 1, j + K)})
{
int ii = rr2(max(0, i - (K - 1)), jj);
while (ii != -1 && ii <= i + (K - 1))
{
res.emplace_back(ii, jj);
dis[ii][jj] = dis[i][j] + 1;
vis[ii][jj] = 1;
ii = rr2(max(0, i - (K - 1)), jj);
}
}
}
}
found:
int ans = dis[B.first][B.second];
cout << ans << '\n';
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
456 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
600 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
9 ms |
1112 KB |
Output is correct |
20 |
Correct |
5 ms |
1188 KB |
Output is correct |
21 |
Correct |
2 ms |
1624 KB |
Output is correct |
22 |
Correct |
9 ms |
1368 KB |
Output is correct |
23 |
Correct |
7 ms |
1116 KB |
Output is correct |
24 |
Correct |
6 ms |
1392 KB |
Output is correct |
25 |
Correct |
6 ms |
1588 KB |
Output is correct |
26 |
Correct |
1 ms |
1368 KB |
Output is correct |
27 |
Correct |
2 ms |
1116 KB |
Output is correct |
28 |
Correct |
4 ms |
1372 KB |
Output is correct |
29 |
Correct |
20 ms |
2640 KB |
Output is correct |
30 |
Correct |
6 ms |
1372 KB |
Output is correct |
31 |
Correct |
4 ms |
3656 KB |
Output is correct |
32 |
Correct |
25 ms |
2648 KB |
Output is correct |
33 |
Correct |
18 ms |
2396 KB |
Output is correct |
34 |
Correct |
14 ms |
3480 KB |
Output is correct |
35 |
Correct |
14 ms |
3484 KB |
Output is correct |
36 |
Correct |
13 ms |
2976 KB |
Output is correct |
37 |
Correct |
20 ms |
2648 KB |
Output is correct |
38 |
Correct |
2 ms |
2652 KB |
Output is correct |
39 |
Correct |
255 ms |
21568 KB |
Output is correct |
40 |
Correct |
11 ms |
2648 KB |
Output is correct |
41 |
Correct |
9 ms |
4372 KB |
Output is correct |
42 |
Correct |
36 ms |
3420 KB |
Output is correct |
43 |
Correct |
24 ms |
4596 KB |
Output is correct |
44 |
Correct |
40 ms |
11248 KB |
Output is correct |
45 |
Correct |
48 ms |
12672 KB |
Output is correct |
46 |
Correct |
23 ms |
25284 KB |
Output is correct |
47 |
Correct |
237 ms |
21772 KB |
Output is correct |
48 |
Correct |
224 ms |
21568 KB |
Output is correct |
49 |
Correct |
92 ms |
32532 KB |
Output is correct |
50 |
Correct |
94 ms |
32740 KB |
Output is correct |
51 |
Correct |
182 ms |
23004 KB |
Output is correct |
52 |
Correct |
126 ms |
22316 KB |
Output is correct |
53 |
Correct |
212 ms |
21712 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
460 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
452 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
344 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
452 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
344 KB |
Output is correct |
22 |
Correct |
0 ms |
344 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
860 KB |
Output is correct |
26 |
Correct |
1 ms |
1116 KB |
Output is correct |
27 |
Correct |
1 ms |
1628 KB |
Output is correct |
28 |
Correct |
2 ms |
1748 KB |
Output is correct |
29 |
Correct |
1 ms |
1112 KB |
Output is correct |
30 |
Correct |
1 ms |
1112 KB |
Output is correct |
31 |
Correct |
4 ms |
1496 KB |
Output is correct |
32 |
Correct |
1 ms |
1372 KB |
Output is correct |
33 |
Correct |
1 ms |
1116 KB |
Output is correct |
34 |
Correct |
4 ms |
2896 KB |
Output is correct |
35 |
Correct |
4 ms |
3544 KB |
Output is correct |
36 |
Correct |
5 ms |
4412 KB |
Output is correct |
37 |
Correct |
1 ms |
2396 KB |
Output is correct |
38 |
Correct |
1 ms |
2396 KB |
Output is correct |
39 |
Correct |
13 ms |
9424 KB |
Output is correct |
40 |
Correct |
15 ms |
19884 KB |
Output is correct |
41 |
Correct |
23 ms |
25380 KB |
Output is correct |
42 |
Correct |
23 ms |
25112 KB |
Output is correct |
43 |
Correct |
11 ms |
21336 KB |
Output is correct |
44 |
Correct |
12 ms |
21620 KB |
Output is correct |
45 |
Correct |
39 ms |
26176 KB |
Output is correct |
46 |
Correct |
38 ms |
27292 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
460 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
452 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
344 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
7 ms |
1116 KB |
Output is correct |
34 |
Correct |
0 ms |
356 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
2 ms |
864 KB |
Output is correct |
37 |
Correct |
4 ms |
1188 KB |
Output is correct |
38 |
Correct |
1 ms |
1116 KB |
Output is correct |
39 |
Correct |
1 ms |
1628 KB |
Output is correct |
40 |
Correct |
9 ms |
1388 KB |
Output is correct |
41 |
Correct |
8 ms |
1116 KB |
Output is correct |
42 |
Correct |
2 ms |
1904 KB |
Output is correct |
43 |
Correct |
1 ms |
1116 KB |
Output is correct |
44 |
Correct |
1 ms |
1116 KB |
Output is correct |
45 |
Correct |
5 ms |
1392 KB |
Output is correct |
46 |
Correct |
5 ms |
1392 KB |
Output is correct |
47 |
Correct |
6 ms |
1372 KB |
Output is correct |
48 |
Correct |
5 ms |
1368 KB |
Output is correct |
49 |
Correct |
4 ms |
1372 KB |
Output is correct |
50 |
Correct |
6 ms |
1372 KB |
Output is correct |
51 |
Correct |
3 ms |
1368 KB |
Output is correct |
52 |
Correct |
1 ms |
1372 KB |
Output is correct |
53 |
Correct |
1 ms |
1116 KB |
Output is correct |
54 |
Correct |
4 ms |
1372 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
460 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
452 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
344 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
7 ms |
1116 KB |
Output is correct |
34 |
Correct |
0 ms |
356 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
2 ms |
864 KB |
Output is correct |
37 |
Correct |
4 ms |
1188 KB |
Output is correct |
38 |
Correct |
1 ms |
1116 KB |
Output is correct |
39 |
Correct |
1 ms |
1628 KB |
Output is correct |
40 |
Correct |
9 ms |
1388 KB |
Output is correct |
41 |
Correct |
8 ms |
1116 KB |
Output is correct |
42 |
Correct |
2 ms |
1904 KB |
Output is correct |
43 |
Correct |
1 ms |
1116 KB |
Output is correct |
44 |
Correct |
1 ms |
1116 KB |
Output is correct |
45 |
Correct |
5 ms |
1392 KB |
Output is correct |
46 |
Correct |
5 ms |
1392 KB |
Output is correct |
47 |
Correct |
6 ms |
1372 KB |
Output is correct |
48 |
Correct |
5 ms |
1368 KB |
Output is correct |
49 |
Correct |
4 ms |
1372 KB |
Output is correct |
50 |
Correct |
6 ms |
1372 KB |
Output is correct |
51 |
Correct |
3 ms |
1368 KB |
Output is correct |
52 |
Correct |
1 ms |
1372 KB |
Output is correct |
53 |
Correct |
1 ms |
1116 KB |
Output is correct |
54 |
Correct |
4 ms |
1372 KB |
Output is correct |
55 |
Correct |
20 ms |
2396 KB |
Output is correct |
56 |
Correct |
6 ms |
1372 KB |
Output is correct |
57 |
Correct |
4 ms |
2896 KB |
Output is correct |
58 |
Correct |
18 ms |
2396 KB |
Output is correct |
59 |
Correct |
4 ms |
3544 KB |
Output is correct |
60 |
Correct |
29 ms |
2648 KB |
Output is correct |
61 |
Correct |
19 ms |
2644 KB |
Output is correct |
62 |
Correct |
5 ms |
4304 KB |
Output is correct |
63 |
Correct |
1 ms |
2396 KB |
Output is correct |
64 |
Correct |
1 ms |
2396 KB |
Output is correct |
65 |
Correct |
14 ms |
3484 KB |
Output is correct |
66 |
Correct |
14 ms |
3484 KB |
Output is correct |
67 |
Correct |
18 ms |
2864 KB |
Output is correct |
68 |
Correct |
17 ms |
2648 KB |
Output is correct |
69 |
Correct |
15 ms |
2652 KB |
Output is correct |
70 |
Correct |
15 ms |
2892 KB |
Output is correct |
71 |
Correct |
13 ms |
3208 KB |
Output is correct |
72 |
Correct |
13 ms |
2812 KB |
Output is correct |
73 |
Correct |
20 ms |
2860 KB |
Output is correct |
74 |
Correct |
2 ms |
2652 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
456 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
600 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
9 ms |
1112 KB |
Output is correct |
20 |
Correct |
5 ms |
1188 KB |
Output is correct |
21 |
Correct |
2 ms |
1624 KB |
Output is correct |
22 |
Correct |
9 ms |
1368 KB |
Output is correct |
23 |
Correct |
7 ms |
1116 KB |
Output is correct |
24 |
Correct |
6 ms |
1392 KB |
Output is correct |
25 |
Correct |
6 ms |
1588 KB |
Output is correct |
26 |
Correct |
1 ms |
1368 KB |
Output is correct |
27 |
Correct |
2 ms |
1116 KB |
Output is correct |
28 |
Correct |
4 ms |
1372 KB |
Output is correct |
29 |
Correct |
20 ms |
2640 KB |
Output is correct |
30 |
Correct |
6 ms |
1372 KB |
Output is correct |
31 |
Correct |
4 ms |
3656 KB |
Output is correct |
32 |
Correct |
25 ms |
2648 KB |
Output is correct |
33 |
Correct |
18 ms |
2396 KB |
Output is correct |
34 |
Correct |
14 ms |
3480 KB |
Output is correct |
35 |
Correct |
14 ms |
3484 KB |
Output is correct |
36 |
Correct |
13 ms |
2976 KB |
Output is correct |
37 |
Correct |
20 ms |
2648 KB |
Output is correct |
38 |
Correct |
2 ms |
2652 KB |
Output is correct |
39 |
Correct |
255 ms |
21568 KB |
Output is correct |
40 |
Correct |
11 ms |
2648 KB |
Output is correct |
41 |
Correct |
9 ms |
4372 KB |
Output is correct |
42 |
Correct |
36 ms |
3420 KB |
Output is correct |
43 |
Correct |
24 ms |
4596 KB |
Output is correct |
44 |
Correct |
40 ms |
11248 KB |
Output is correct |
45 |
Correct |
48 ms |
12672 KB |
Output is correct |
46 |
Correct |
23 ms |
25284 KB |
Output is correct |
47 |
Correct |
237 ms |
21772 KB |
Output is correct |
48 |
Correct |
224 ms |
21568 KB |
Output is correct |
49 |
Correct |
92 ms |
32532 KB |
Output is correct |
50 |
Correct |
94 ms |
32740 KB |
Output is correct |
51 |
Correct |
182 ms |
23004 KB |
Output is correct |
52 |
Correct |
126 ms |
22316 KB |
Output is correct |
53 |
Correct |
212 ms |
21712 KB |
Output is correct |
54 |
Correct |
1 ms |
344 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
460 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
348 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
1 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
348 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
0 ms |
348 KB |
Output is correct |
68 |
Correct |
0 ms |
348 KB |
Output is correct |
69 |
Correct |
0 ms |
348 KB |
Output is correct |
70 |
Correct |
1 ms |
348 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
1 ms |
348 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
0 ms |
348 KB |
Output is correct |
76 |
Correct |
0 ms |
348 KB |
Output is correct |
77 |
Correct |
0 ms |
452 KB |
Output is correct |
78 |
Correct |
0 ms |
348 KB |
Output is correct |
79 |
Correct |
1 ms |
348 KB |
Output is correct |
80 |
Correct |
0 ms |
348 KB |
Output is correct |
81 |
Correct |
0 ms |
344 KB |
Output is correct |
82 |
Correct |
0 ms |
348 KB |
Output is correct |
83 |
Correct |
0 ms |
348 KB |
Output is correct |
84 |
Correct |
1 ms |
344 KB |
Output is correct |
85 |
Correct |
1 ms |
348 KB |
Output is correct |
86 |
Correct |
0 ms |
348 KB |
Output is correct |
87 |
Correct |
1 ms |
348 KB |
Output is correct |
88 |
Correct |
1 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
348 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
0 ms |
348 KB |
Output is correct |
93 |
Correct |
1 ms |
348 KB |
Output is correct |
94 |
Correct |
1 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
1 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
344 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
0 ms |
452 KB |
Output is correct |
102 |
Correct |
0 ms |
348 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
0 ms |
348 KB |
Output is correct |
105 |
Correct |
0 ms |
348 KB |
Output is correct |
106 |
Correct |
0 ms |
344 KB |
Output is correct |
107 |
Correct |
0 ms |
344 KB |
Output is correct |
108 |
Correct |
0 ms |
348 KB |
Output is correct |
109 |
Correct |
0 ms |
348 KB |
Output is correct |
110 |
Correct |
1 ms |
860 KB |
Output is correct |
111 |
Correct |
1 ms |
1116 KB |
Output is correct |
112 |
Correct |
1 ms |
1628 KB |
Output is correct |
113 |
Correct |
2 ms |
1748 KB |
Output is correct |
114 |
Correct |
1 ms |
1112 KB |
Output is correct |
115 |
Correct |
1 ms |
1112 KB |
Output is correct |
116 |
Correct |
4 ms |
1496 KB |
Output is correct |
117 |
Correct |
1 ms |
1372 KB |
Output is correct |
118 |
Correct |
1 ms |
1116 KB |
Output is correct |
119 |
Correct |
4 ms |
2896 KB |
Output is correct |
120 |
Correct |
4 ms |
3544 KB |
Output is correct |
121 |
Correct |
5 ms |
4412 KB |
Output is correct |
122 |
Correct |
1 ms |
2396 KB |
Output is correct |
123 |
Correct |
1 ms |
2396 KB |
Output is correct |
124 |
Correct |
13 ms |
9424 KB |
Output is correct |
125 |
Correct |
15 ms |
19884 KB |
Output is correct |
126 |
Correct |
23 ms |
25380 KB |
Output is correct |
127 |
Correct |
23 ms |
25112 KB |
Output is correct |
128 |
Correct |
11 ms |
21336 KB |
Output is correct |
129 |
Correct |
12 ms |
21620 KB |
Output is correct |
130 |
Correct |
39 ms |
26176 KB |
Output is correct |
131 |
Correct |
38 ms |
27292 KB |
Output is correct |
132 |
Correct |
7 ms |
1116 KB |
Output is correct |
133 |
Correct |
0 ms |
356 KB |
Output is correct |
134 |
Correct |
1 ms |
348 KB |
Output is correct |
135 |
Correct |
2 ms |
864 KB |
Output is correct |
136 |
Correct |
4 ms |
1188 KB |
Output is correct |
137 |
Correct |
1 ms |
1116 KB |
Output is correct |
138 |
Correct |
1 ms |
1628 KB |
Output is correct |
139 |
Correct |
9 ms |
1388 KB |
Output is correct |
140 |
Correct |
8 ms |
1116 KB |
Output is correct |
141 |
Correct |
2 ms |
1904 KB |
Output is correct |
142 |
Correct |
1 ms |
1116 KB |
Output is correct |
143 |
Correct |
1 ms |
1116 KB |
Output is correct |
144 |
Correct |
5 ms |
1392 KB |
Output is correct |
145 |
Correct |
5 ms |
1392 KB |
Output is correct |
146 |
Correct |
6 ms |
1372 KB |
Output is correct |
147 |
Correct |
5 ms |
1368 KB |
Output is correct |
148 |
Correct |
4 ms |
1372 KB |
Output is correct |
149 |
Correct |
6 ms |
1372 KB |
Output is correct |
150 |
Correct |
3 ms |
1368 KB |
Output is correct |
151 |
Correct |
1 ms |
1372 KB |
Output is correct |
152 |
Correct |
1 ms |
1116 KB |
Output is correct |
153 |
Correct |
4 ms |
1372 KB |
Output is correct |
154 |
Correct |
20 ms |
2396 KB |
Output is correct |
155 |
Correct |
6 ms |
1372 KB |
Output is correct |
156 |
Correct |
4 ms |
2896 KB |
Output is correct |
157 |
Correct |
18 ms |
2396 KB |
Output is correct |
158 |
Correct |
4 ms |
3544 KB |
Output is correct |
159 |
Correct |
29 ms |
2648 KB |
Output is correct |
160 |
Correct |
19 ms |
2644 KB |
Output is correct |
161 |
Correct |
5 ms |
4304 KB |
Output is correct |
162 |
Correct |
1 ms |
2396 KB |
Output is correct |
163 |
Correct |
1 ms |
2396 KB |
Output is correct |
164 |
Correct |
14 ms |
3484 KB |
Output is correct |
165 |
Correct |
14 ms |
3484 KB |
Output is correct |
166 |
Correct |
18 ms |
2864 KB |
Output is correct |
167 |
Correct |
17 ms |
2648 KB |
Output is correct |
168 |
Correct |
15 ms |
2652 KB |
Output is correct |
169 |
Correct |
15 ms |
2892 KB |
Output is correct |
170 |
Correct |
13 ms |
3208 KB |
Output is correct |
171 |
Correct |
13 ms |
2812 KB |
Output is correct |
172 |
Correct |
20 ms |
2860 KB |
Output is correct |
173 |
Correct |
2 ms |
2652 KB |
Output is correct |
174 |
Correct |
9 ms |
3164 KB |
Output is correct |
175 |
Correct |
49 ms |
5212 KB |
Output is correct |
176 |
Correct |
35 ms |
12824 KB |
Output is correct |
177 |
Correct |
127 ms |
14652 KB |
Output is correct |
178 |
Correct |
19 ms |
18912 KB |
Output is correct |
179 |
Correct |
83 ms |
21720 KB |
Output is correct |
180 |
Correct |
149 ms |
21964 KB |
Output is correct |
181 |
Correct |
152 ms |
22476 KB |
Output is correct |
182 |
Correct |
160 ms |
25540 KB |
Output is correct |
183 |
Correct |
163 ms |
25320 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
456 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
600 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
9 ms |
1112 KB |
Output is correct |
20 |
Correct |
5 ms |
1188 KB |
Output is correct |
21 |
Correct |
2 ms |
1624 KB |
Output is correct |
22 |
Correct |
9 ms |
1368 KB |
Output is correct |
23 |
Correct |
7 ms |
1116 KB |
Output is correct |
24 |
Correct |
6 ms |
1392 KB |
Output is correct |
25 |
Correct |
6 ms |
1588 KB |
Output is correct |
26 |
Correct |
1 ms |
1368 KB |
Output is correct |
27 |
Correct |
2 ms |
1116 KB |
Output is correct |
28 |
Correct |
4 ms |
1372 KB |
Output is correct |
29 |
Correct |
20 ms |
2640 KB |
Output is correct |
30 |
Correct |
6 ms |
1372 KB |
Output is correct |
31 |
Correct |
4 ms |
3656 KB |
Output is correct |
32 |
Correct |
25 ms |
2648 KB |
Output is correct |
33 |
Correct |
18 ms |
2396 KB |
Output is correct |
34 |
Correct |
14 ms |
3480 KB |
Output is correct |
35 |
Correct |
14 ms |
3484 KB |
Output is correct |
36 |
Correct |
13 ms |
2976 KB |
Output is correct |
37 |
Correct |
20 ms |
2648 KB |
Output is correct |
38 |
Correct |
2 ms |
2652 KB |
Output is correct |
39 |
Correct |
255 ms |
21568 KB |
Output is correct |
40 |
Correct |
11 ms |
2648 KB |
Output is correct |
41 |
Correct |
9 ms |
4372 KB |
Output is correct |
42 |
Correct |
36 ms |
3420 KB |
Output is correct |
43 |
Correct |
24 ms |
4596 KB |
Output is correct |
44 |
Correct |
40 ms |
11248 KB |
Output is correct |
45 |
Correct |
48 ms |
12672 KB |
Output is correct |
46 |
Correct |
23 ms |
25284 KB |
Output is correct |
47 |
Correct |
237 ms |
21772 KB |
Output is correct |
48 |
Correct |
224 ms |
21568 KB |
Output is correct |
49 |
Correct |
92 ms |
32532 KB |
Output is correct |
50 |
Correct |
94 ms |
32740 KB |
Output is correct |
51 |
Correct |
182 ms |
23004 KB |
Output is correct |
52 |
Correct |
126 ms |
22316 KB |
Output is correct |
53 |
Correct |
212 ms |
21712 KB |
Output is correct |
54 |
Correct |
1 ms |
344 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
460 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
348 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
1 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
348 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
0 ms |
348 KB |
Output is correct |
68 |
Correct |
0 ms |
348 KB |
Output is correct |
69 |
Correct |
0 ms |
348 KB |
Output is correct |
70 |
Correct |
1 ms |
348 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
1 ms |
348 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
0 ms |
348 KB |
Output is correct |
76 |
Correct |
0 ms |
348 KB |
Output is correct |
77 |
Correct |
0 ms |
452 KB |
Output is correct |
78 |
Correct |
0 ms |
348 KB |
Output is correct |
79 |
Correct |
1 ms |
348 KB |
Output is correct |
80 |
Correct |
0 ms |
348 KB |
Output is correct |
81 |
Correct |
0 ms |
344 KB |
Output is correct |
82 |
Correct |
0 ms |
348 KB |
Output is correct |
83 |
Correct |
0 ms |
348 KB |
Output is correct |
84 |
Correct |
1 ms |
344 KB |
Output is correct |
85 |
Correct |
1 ms |
348 KB |
Output is correct |
86 |
Correct |
0 ms |
348 KB |
Output is correct |
87 |
Correct |
1 ms |
348 KB |
Output is correct |
88 |
Correct |
1 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
348 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
0 ms |
348 KB |
Output is correct |
93 |
Correct |
1 ms |
348 KB |
Output is correct |
94 |
Correct |
1 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
1 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
344 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
0 ms |
452 KB |
Output is correct |
102 |
Correct |
0 ms |
348 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
0 ms |
348 KB |
Output is correct |
105 |
Correct |
0 ms |
348 KB |
Output is correct |
106 |
Correct |
0 ms |
344 KB |
Output is correct |
107 |
Correct |
0 ms |
344 KB |
Output is correct |
108 |
Correct |
0 ms |
348 KB |
Output is correct |
109 |
Correct |
0 ms |
348 KB |
Output is correct |
110 |
Correct |
1 ms |
860 KB |
Output is correct |
111 |
Correct |
1 ms |
1116 KB |
Output is correct |
112 |
Correct |
1 ms |
1628 KB |
Output is correct |
113 |
Correct |
2 ms |
1748 KB |
Output is correct |
114 |
Correct |
1 ms |
1112 KB |
Output is correct |
115 |
Correct |
1 ms |
1112 KB |
Output is correct |
116 |
Correct |
4 ms |
1496 KB |
Output is correct |
117 |
Correct |
1 ms |
1372 KB |
Output is correct |
118 |
Correct |
1 ms |
1116 KB |
Output is correct |
119 |
Correct |
4 ms |
2896 KB |
Output is correct |
120 |
Correct |
4 ms |
3544 KB |
Output is correct |
121 |
Correct |
5 ms |
4412 KB |
Output is correct |
122 |
Correct |
1 ms |
2396 KB |
Output is correct |
123 |
Correct |
1 ms |
2396 KB |
Output is correct |
124 |
Correct |
13 ms |
9424 KB |
Output is correct |
125 |
Correct |
15 ms |
19884 KB |
Output is correct |
126 |
Correct |
23 ms |
25380 KB |
Output is correct |
127 |
Correct |
23 ms |
25112 KB |
Output is correct |
128 |
Correct |
11 ms |
21336 KB |
Output is correct |
129 |
Correct |
12 ms |
21620 KB |
Output is correct |
130 |
Correct |
39 ms |
26176 KB |
Output is correct |
131 |
Correct |
38 ms |
27292 KB |
Output is correct |
132 |
Correct |
7 ms |
1116 KB |
Output is correct |
133 |
Correct |
0 ms |
356 KB |
Output is correct |
134 |
Correct |
1 ms |
348 KB |
Output is correct |
135 |
Correct |
2 ms |
864 KB |
Output is correct |
136 |
Correct |
4 ms |
1188 KB |
Output is correct |
137 |
Correct |
1 ms |
1116 KB |
Output is correct |
138 |
Correct |
1 ms |
1628 KB |
Output is correct |
139 |
Correct |
9 ms |
1388 KB |
Output is correct |
140 |
Correct |
8 ms |
1116 KB |
Output is correct |
141 |
Correct |
2 ms |
1904 KB |
Output is correct |
142 |
Correct |
1 ms |
1116 KB |
Output is correct |
143 |
Correct |
1 ms |
1116 KB |
Output is correct |
144 |
Correct |
5 ms |
1392 KB |
Output is correct |
145 |
Correct |
5 ms |
1392 KB |
Output is correct |
146 |
Correct |
6 ms |
1372 KB |
Output is correct |
147 |
Correct |
5 ms |
1368 KB |
Output is correct |
148 |
Correct |
4 ms |
1372 KB |
Output is correct |
149 |
Correct |
6 ms |
1372 KB |
Output is correct |
150 |
Correct |
3 ms |
1368 KB |
Output is correct |
151 |
Correct |
1 ms |
1372 KB |
Output is correct |
152 |
Correct |
1 ms |
1116 KB |
Output is correct |
153 |
Correct |
4 ms |
1372 KB |
Output is correct |
154 |
Correct |
20 ms |
2396 KB |
Output is correct |
155 |
Correct |
6 ms |
1372 KB |
Output is correct |
156 |
Correct |
4 ms |
2896 KB |
Output is correct |
157 |
Correct |
18 ms |
2396 KB |
Output is correct |
158 |
Correct |
4 ms |
3544 KB |
Output is correct |
159 |
Correct |
29 ms |
2648 KB |
Output is correct |
160 |
Correct |
19 ms |
2644 KB |
Output is correct |
161 |
Correct |
5 ms |
4304 KB |
Output is correct |
162 |
Correct |
1 ms |
2396 KB |
Output is correct |
163 |
Correct |
1 ms |
2396 KB |
Output is correct |
164 |
Correct |
14 ms |
3484 KB |
Output is correct |
165 |
Correct |
14 ms |
3484 KB |
Output is correct |
166 |
Correct |
18 ms |
2864 KB |
Output is correct |
167 |
Correct |
17 ms |
2648 KB |
Output is correct |
168 |
Correct |
15 ms |
2652 KB |
Output is correct |
169 |
Correct |
15 ms |
2892 KB |
Output is correct |
170 |
Correct |
13 ms |
3208 KB |
Output is correct |
171 |
Correct |
13 ms |
2812 KB |
Output is correct |
172 |
Correct |
20 ms |
2860 KB |
Output is correct |
173 |
Correct |
2 ms |
2652 KB |
Output is correct |
174 |
Correct |
9 ms |
3164 KB |
Output is correct |
175 |
Correct |
49 ms |
5212 KB |
Output is correct |
176 |
Correct |
35 ms |
12824 KB |
Output is correct |
177 |
Correct |
127 ms |
14652 KB |
Output is correct |
178 |
Correct |
19 ms |
18912 KB |
Output is correct |
179 |
Correct |
83 ms |
21720 KB |
Output is correct |
180 |
Correct |
149 ms |
21964 KB |
Output is correct |
181 |
Correct |
152 ms |
22476 KB |
Output is correct |
182 |
Correct |
160 ms |
25540 KB |
Output is correct |
183 |
Correct |
163 ms |
25320 KB |
Output is correct |
184 |
Correct |
605 ms |
42564 KB |
Output is correct |
185 |
Correct |
63 ms |
23696 KB |
Output is correct |
186 |
Correct |
27 ms |
27580 KB |
Output is correct |
187 |
Correct |
63 ms |
32292 KB |
Output is correct |
188 |
Correct |
38 ms |
45752 KB |
Output is correct |
189 |
Correct |
397 ms |
42840 KB |
Output is correct |
190 |
Correct |
195 ms |
42580 KB |
Output is correct |
191 |
Correct |
85 ms |
68080 KB |
Output is correct |
192 |
Correct |
23 ms |
42320 KB |
Output is correct |
193 |
Correct |
23 ms |
42332 KB |
Output is correct |
194 |
Correct |
275 ms |
66008 KB |
Output is correct |
195 |
Correct |
185 ms |
64820 KB |
Output is correct |
196 |
Correct |
311 ms |
42456 KB |
Output is correct |
197 |
Correct |
162 ms |
43216 KB |
Output is correct |
198 |
Correct |
163 ms |
44496 KB |
Output is correct |
199 |
Correct |
326 ms |
47128 KB |
Output is correct |
200 |
Correct |
184 ms |
44672 KB |
Output is correct |
201 |
Correct |
307 ms |
43556 KB |
Output is correct |
202 |
Correct |
512 ms |
42800 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
456 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
1 ms |
600 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
9 ms |
1112 KB |
Output is correct |
20 |
Correct |
5 ms |
1188 KB |
Output is correct |
21 |
Correct |
2 ms |
1624 KB |
Output is correct |
22 |
Correct |
9 ms |
1368 KB |
Output is correct |
23 |
Correct |
7 ms |
1116 KB |
Output is correct |
24 |
Correct |
6 ms |
1392 KB |
Output is correct |
25 |
Correct |
6 ms |
1588 KB |
Output is correct |
26 |
Correct |
1 ms |
1368 KB |
Output is correct |
27 |
Correct |
2 ms |
1116 KB |
Output is correct |
28 |
Correct |
4 ms |
1372 KB |
Output is correct |
29 |
Correct |
20 ms |
2640 KB |
Output is correct |
30 |
Correct |
6 ms |
1372 KB |
Output is correct |
31 |
Correct |
4 ms |
3656 KB |
Output is correct |
32 |
Correct |
25 ms |
2648 KB |
Output is correct |
33 |
Correct |
18 ms |
2396 KB |
Output is correct |
34 |
Correct |
14 ms |
3480 KB |
Output is correct |
35 |
Correct |
14 ms |
3484 KB |
Output is correct |
36 |
Correct |
13 ms |
2976 KB |
Output is correct |
37 |
Correct |
20 ms |
2648 KB |
Output is correct |
38 |
Correct |
2 ms |
2652 KB |
Output is correct |
39 |
Correct |
255 ms |
21568 KB |
Output is correct |
40 |
Correct |
11 ms |
2648 KB |
Output is correct |
41 |
Correct |
9 ms |
4372 KB |
Output is correct |
42 |
Correct |
36 ms |
3420 KB |
Output is correct |
43 |
Correct |
24 ms |
4596 KB |
Output is correct |
44 |
Correct |
40 ms |
11248 KB |
Output is correct |
45 |
Correct |
48 ms |
12672 KB |
Output is correct |
46 |
Correct |
23 ms |
25284 KB |
Output is correct |
47 |
Correct |
237 ms |
21772 KB |
Output is correct |
48 |
Correct |
224 ms |
21568 KB |
Output is correct |
49 |
Correct |
92 ms |
32532 KB |
Output is correct |
50 |
Correct |
94 ms |
32740 KB |
Output is correct |
51 |
Correct |
182 ms |
23004 KB |
Output is correct |
52 |
Correct |
126 ms |
22316 KB |
Output is correct |
53 |
Correct |
212 ms |
21712 KB |
Output is correct |
54 |
Correct |
1 ms |
344 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
460 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
348 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
1 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
348 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
0 ms |
348 KB |
Output is correct |
68 |
Correct |
0 ms |
348 KB |
Output is correct |
69 |
Correct |
0 ms |
348 KB |
Output is correct |
70 |
Correct |
1 ms |
348 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
1 ms |
348 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
0 ms |
348 KB |
Output is correct |
76 |
Correct |
0 ms |
348 KB |
Output is correct |
77 |
Correct |
0 ms |
452 KB |
Output is correct |
78 |
Correct |
0 ms |
348 KB |
Output is correct |
79 |
Correct |
1 ms |
348 KB |
Output is correct |
80 |
Correct |
0 ms |
348 KB |
Output is correct |
81 |
Correct |
0 ms |
344 KB |
Output is correct |
82 |
Correct |
0 ms |
348 KB |
Output is correct |
83 |
Correct |
0 ms |
348 KB |
Output is correct |
84 |
Correct |
1 ms |
344 KB |
Output is correct |
85 |
Correct |
1 ms |
348 KB |
Output is correct |
86 |
Correct |
0 ms |
348 KB |
Output is correct |
87 |
Correct |
1 ms |
348 KB |
Output is correct |
88 |
Correct |
1 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
348 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
0 ms |
348 KB |
Output is correct |
93 |
Correct |
1 ms |
348 KB |
Output is correct |
94 |
Correct |
1 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
1 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
344 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
0 ms |
452 KB |
Output is correct |
102 |
Correct |
0 ms |
348 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
0 ms |
348 KB |
Output is correct |
105 |
Correct |
0 ms |
348 KB |
Output is correct |
106 |
Correct |
0 ms |
344 KB |
Output is correct |
107 |
Correct |
0 ms |
344 KB |
Output is correct |
108 |
Correct |
0 ms |
348 KB |
Output is correct |
109 |
Correct |
0 ms |
348 KB |
Output is correct |
110 |
Correct |
1 ms |
860 KB |
Output is correct |
111 |
Correct |
1 ms |
1116 KB |
Output is correct |
112 |
Correct |
1 ms |
1628 KB |
Output is correct |
113 |
Correct |
2 ms |
1748 KB |
Output is correct |
114 |
Correct |
1 ms |
1112 KB |
Output is correct |
115 |
Correct |
1 ms |
1112 KB |
Output is correct |
116 |
Correct |
4 ms |
1496 KB |
Output is correct |
117 |
Correct |
1 ms |
1372 KB |
Output is correct |
118 |
Correct |
1 ms |
1116 KB |
Output is correct |
119 |
Correct |
4 ms |
2896 KB |
Output is correct |
120 |
Correct |
4 ms |
3544 KB |
Output is correct |
121 |
Correct |
5 ms |
4412 KB |
Output is correct |
122 |
Correct |
1 ms |
2396 KB |
Output is correct |
123 |
Correct |
1 ms |
2396 KB |
Output is correct |
124 |
Correct |
13 ms |
9424 KB |
Output is correct |
125 |
Correct |
15 ms |
19884 KB |
Output is correct |
126 |
Correct |
23 ms |
25380 KB |
Output is correct |
127 |
Correct |
23 ms |
25112 KB |
Output is correct |
128 |
Correct |
11 ms |
21336 KB |
Output is correct |
129 |
Correct |
12 ms |
21620 KB |
Output is correct |
130 |
Correct |
39 ms |
26176 KB |
Output is correct |
131 |
Correct |
38 ms |
27292 KB |
Output is correct |
132 |
Correct |
7 ms |
1116 KB |
Output is correct |
133 |
Correct |
0 ms |
356 KB |
Output is correct |
134 |
Correct |
1 ms |
348 KB |
Output is correct |
135 |
Correct |
2 ms |
864 KB |
Output is correct |
136 |
Correct |
4 ms |
1188 KB |
Output is correct |
137 |
Correct |
1 ms |
1116 KB |
Output is correct |
138 |
Correct |
1 ms |
1628 KB |
Output is correct |
139 |
Correct |
9 ms |
1388 KB |
Output is correct |
140 |
Correct |
8 ms |
1116 KB |
Output is correct |
141 |
Correct |
2 ms |
1904 KB |
Output is correct |
142 |
Correct |
1 ms |
1116 KB |
Output is correct |
143 |
Correct |
1 ms |
1116 KB |
Output is correct |
144 |
Correct |
5 ms |
1392 KB |
Output is correct |
145 |
Correct |
5 ms |
1392 KB |
Output is correct |
146 |
Correct |
6 ms |
1372 KB |
Output is correct |
147 |
Correct |
5 ms |
1368 KB |
Output is correct |
148 |
Correct |
4 ms |
1372 KB |
Output is correct |
149 |
Correct |
6 ms |
1372 KB |
Output is correct |
150 |
Correct |
3 ms |
1368 KB |
Output is correct |
151 |
Correct |
1 ms |
1372 KB |
Output is correct |
152 |
Correct |
1 ms |
1116 KB |
Output is correct |
153 |
Correct |
4 ms |
1372 KB |
Output is correct |
154 |
Correct |
20 ms |
2396 KB |
Output is correct |
155 |
Correct |
6 ms |
1372 KB |
Output is correct |
156 |
Correct |
4 ms |
2896 KB |
Output is correct |
157 |
Correct |
18 ms |
2396 KB |
Output is correct |
158 |
Correct |
4 ms |
3544 KB |
Output is correct |
159 |
Correct |
29 ms |
2648 KB |
Output is correct |
160 |
Correct |
19 ms |
2644 KB |
Output is correct |
161 |
Correct |
5 ms |
4304 KB |
Output is correct |
162 |
Correct |
1 ms |
2396 KB |
Output is correct |
163 |
Correct |
1 ms |
2396 KB |
Output is correct |
164 |
Correct |
14 ms |
3484 KB |
Output is correct |
165 |
Correct |
14 ms |
3484 KB |
Output is correct |
166 |
Correct |
18 ms |
2864 KB |
Output is correct |
167 |
Correct |
17 ms |
2648 KB |
Output is correct |
168 |
Correct |
15 ms |
2652 KB |
Output is correct |
169 |
Correct |
15 ms |
2892 KB |
Output is correct |
170 |
Correct |
13 ms |
3208 KB |
Output is correct |
171 |
Correct |
13 ms |
2812 KB |
Output is correct |
172 |
Correct |
20 ms |
2860 KB |
Output is correct |
173 |
Correct |
2 ms |
2652 KB |
Output is correct |
174 |
Correct |
9 ms |
3164 KB |
Output is correct |
175 |
Correct |
49 ms |
5212 KB |
Output is correct |
176 |
Correct |
35 ms |
12824 KB |
Output is correct |
177 |
Correct |
127 ms |
14652 KB |
Output is correct |
178 |
Correct |
19 ms |
18912 KB |
Output is correct |
179 |
Correct |
83 ms |
21720 KB |
Output is correct |
180 |
Correct |
149 ms |
21964 KB |
Output is correct |
181 |
Correct |
152 ms |
22476 KB |
Output is correct |
182 |
Correct |
160 ms |
25540 KB |
Output is correct |
183 |
Correct |
163 ms |
25320 KB |
Output is correct |
184 |
Correct |
605 ms |
42564 KB |
Output is correct |
185 |
Correct |
63 ms |
23696 KB |
Output is correct |
186 |
Correct |
27 ms |
27580 KB |
Output is correct |
187 |
Correct |
63 ms |
32292 KB |
Output is correct |
188 |
Correct |
38 ms |
45752 KB |
Output is correct |
189 |
Correct |
397 ms |
42840 KB |
Output is correct |
190 |
Correct |
195 ms |
42580 KB |
Output is correct |
191 |
Correct |
85 ms |
68080 KB |
Output is correct |
192 |
Correct |
23 ms |
42320 KB |
Output is correct |
193 |
Correct |
23 ms |
42332 KB |
Output is correct |
194 |
Correct |
275 ms |
66008 KB |
Output is correct |
195 |
Correct |
185 ms |
64820 KB |
Output is correct |
196 |
Correct |
311 ms |
42456 KB |
Output is correct |
197 |
Correct |
162 ms |
43216 KB |
Output is correct |
198 |
Correct |
163 ms |
44496 KB |
Output is correct |
199 |
Correct |
326 ms |
47128 KB |
Output is correct |
200 |
Correct |
184 ms |
44672 KB |
Output is correct |
201 |
Correct |
307 ms |
43556 KB |
Output is correct |
202 |
Correct |
512 ms |
42800 KB |
Output is correct |
203 |
Correct |
1129 ms |
84544 KB |
Output is correct |
204 |
Correct |
340 ms |
62960 KB |
Output is correct |
205 |
Correct |
566 ms |
52524 KB |
Output is correct |
206 |
Correct |
234 ms |
83816 KB |
Output is correct |
207 |
Correct |
67 ms |
91364 KB |
Output is correct |
208 |
Correct |
798 ms |
85104 KB |
Output is correct |
209 |
Correct |
1168 ms |
84392 KB |
Output is correct |
210 |
Correct |
114 ms |
112432 KB |
Output is correct |
211 |
Correct |
43 ms |
84176 KB |
Output is correct |
212 |
Correct |
45 ms |
84128 KB |
Output is correct |
213 |
Correct |
374 ms |
130400 KB |
Output is correct |
214 |
Correct |
525 ms |
130236 KB |
Output is correct |
215 |
Correct |
577 ms |
84744 KB |
Output is correct |
216 |
Correct |
534 ms |
85304 KB |
Output is correct |
217 |
Correct |
575 ms |
87492 KB |
Output is correct |
218 |
Correct |
456 ms |
93384 KB |
Output is correct |
219 |
Correct |
484 ms |
116748 KB |
Output is correct |
220 |
Correct |
139 ms |
105184 KB |
Output is correct |
221 |
Correct |
118 ms |
103012 KB |
Output is correct |
222 |
Correct |
378 ms |
130148 KB |
Output is correct |
223 |
Correct |
661 ms |
87088 KB |
Output is correct |
224 |
Correct |
714 ms |
85876 KB |
Output is correct |
225 |
Correct |
454 ms |
84704 KB |
Output is correct |