# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
737075 |
2023-05-06T14:32:39 Z |
nguyentunglam |
Maze (JOI23_ho_t3) |
C++17 |
|
1436 ms |
381724 KB |
#include<bits/stdc++.h>
#define fi first
#define se second
#define endl "\n"
#define ii pair<int, int>
using namespace std;
vector<vector<int> > a, f, mark, row, col;
int mx[4] = {0, 0, -1, 1};
int my[4] = {1, -1, 0, 0};
int findr(int i, int j) {
return !mark[i][j] ? i : row[i][j] = findr(row[i][j], j);
}
int findc(int i, int j) {
return !mark[i][j] ? j : col[i][j] = findc(i, col[i][j]);
}
int main() {
#define task ""
cin.tie(0) -> sync_with_stdio(0);
if (fopen ("task.inp", "r")) {
freopen ("task.inp", "r", stdin);
// freopen ("task.out", "w", stdout);
}
if (fopen (task".inp", "r")) {
freopen (task".inp", "r", stdin);
freopen (task".out", "w", stdout);
}
int r, c, n; cin >> r >> c >> n;
a = vector<vector<int> > (r + 2, vector<int> (c + 2));
f = vector<vector<int> > (r + 2, vector<int> (c + 2));
mark = vector<vector<int> > (r + 2, vector<int> (c + 2));
row = vector<vector<int> > (r + 2, vector<int> (c + 2));
col = vector<vector<int> > (r + 2, vector<int> (c + 2));
int sr, sc, gr, gc; cin >> sr >> sc >> gr >> gc;
for(int i = 1; i <= r; i++) for(int j = 1; j <= c; j++) {
char c; cin >> c;
if (c == '.') a[i][j] = 0;
else a[i][j] = 1;
f[i][j] = 1e9;
row[i][j] = i + 1;
col[i][j] = j + 1;
}
deque<tuple<int, int, int> > q;
f[sr][sc] = 0;
q.push_back({0, sr, sc});
while (!q.empty()) {
int cost, x, y; tie(cost, x, y) = q.front(); q.pop_front();
if (cost != f[x][y]) continue;
int d1 = abs(gr - x), d2 = abs(gc - y);
if (d1 > d2) swap(d1, d2);
if (d1 < n && d2 <= n && f[gr][gc] > f[x][y] + 1) {
f[gr][gc] = f[x][y] + 1;
q.push_back({f[gr][gc], gr, gc});
}
for(int k = 0; k < 4; k++) {
int xx = x + mx[k], yy = y + my[k];
if (xx < 1 || xx > r || yy < 1 || yy > c || a[xx][yy]) continue;
if (f[xx][yy] > f[x][y]) {
f[xx][yy] = f[x][y];
q.push_front({f[xx][yy], xx, yy});
}
}
int i, j;
if (x > n) {
i = x - n;
j = max(1, y - n + 1);
for(j = findc(i, j); j <= min(c, y + n - 1); j = findc(i, j)) {
if (f[i][j] > f[x][y] + 1) {
f[i][j] = f[x][y] + 1;
q.push_back({f[i][j], i, j});
}
mark[i][j] = 1;
}
}
if (x + n <= r) {
i = x + n;
j = max(1, y - n + 1);
for(j = findc(i, j); j <= min(c, y + n - 1); j = findc(i, j)) {
if (f[i][j] > f[x][y] + 1) {
f[i][j] = f[x][y] + 1;
q.push_back({f[i][j], i, j});
}
mark[i][j] = 1;
}
}
if (y > n) {
j = y - n;
i = max(1, x - n + 1);
for(i = findr(i, j); i <= min(r, x + n - 1); i = findr(i, j)) {
if (f[i][j] > f[x][y] + 1) {
f[i][j] = f[x][y] + 1;
q.push_back({f[i][j], i, j});
}
mark[i][j] = 1;
}
}
if (y + n <= c) {
j = y + n;
i = max(1, x - n + 1);
for(i = findr(i, j); i <= min(r, x + n - 1); i = findr(i, j)) {
if (f[i][j] > f[x][y] + 1) {
f[i][j] = f[x][y] + 1;
q.push_back({f[i][j], i, j});
}
mark[i][j] = 1;
}
}
}
cout << f[gr][gc];
}
Compilation message
Main.cpp: In function 'int main()':
Main.cpp:21:17: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
21 | freopen ("task.inp", "r", stdin);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:25:17: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
25 | freopen (task".inp", "r", stdin);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:26:17: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
26 | freopen (task".out", "w", stdout);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
324 KB |
Output is correct |
6 |
Correct |
1 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
324 KB |
Output is correct |
19 |
Correct |
11 ms |
1620 KB |
Output is correct |
20 |
Correct |
5 ms |
3228 KB |
Output is correct |
21 |
Correct |
11 ms |
1740 KB |
Output is correct |
22 |
Correct |
13 ms |
1604 KB |
Output is correct |
23 |
Correct |
10 ms |
1612 KB |
Output is correct |
24 |
Correct |
8 ms |
4072 KB |
Output is correct |
25 |
Correct |
7 ms |
4072 KB |
Output is correct |
26 |
Correct |
14 ms |
1620 KB |
Output is correct |
27 |
Correct |
13 ms |
1620 KB |
Output is correct |
28 |
Correct |
10 ms |
1620 KB |
Output is correct |
29 |
Correct |
25 ms |
3504 KB |
Output is correct |
30 |
Correct |
10 ms |
2872 KB |
Output is correct |
31 |
Correct |
23 ms |
3796 KB |
Output is correct |
32 |
Correct |
30 ms |
3504 KB |
Output is correct |
33 |
Correct |
25 ms |
3272 KB |
Output is correct |
34 |
Correct |
15 ms |
9772 KB |
Output is correct |
35 |
Correct |
15 ms |
9760 KB |
Output is correct |
36 |
Correct |
30 ms |
3540 KB |
Output is correct |
37 |
Correct |
34 ms |
3412 KB |
Output is correct |
38 |
Correct |
25 ms |
3408 KB |
Output is correct |
39 |
Correct |
290 ms |
30156 KB |
Output is correct |
40 |
Correct |
34 ms |
4124 KB |
Output is correct |
41 |
Correct |
20 ms |
11920 KB |
Output is correct |
42 |
Correct |
43 ms |
4764 KB |
Output is correct |
43 |
Correct |
34 ms |
10360 KB |
Output is correct |
44 |
Correct |
128 ms |
20252 KB |
Output is correct |
45 |
Correct |
118 ms |
23128 KB |
Output is correct |
46 |
Correct |
249 ms |
32676 KB |
Output is correct |
47 |
Correct |
299 ms |
30316 KB |
Output is correct |
48 |
Correct |
274 ms |
31100 KB |
Output is correct |
49 |
Correct |
147 ms |
95536 KB |
Output is correct |
50 |
Correct |
144 ms |
95568 KB |
Output is correct |
51 |
Correct |
330 ms |
31672 KB |
Output is correct |
52 |
Correct |
317 ms |
31172 KB |
Output is correct |
53 |
Correct |
264 ms |
31232 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
324 KB |
Output is correct |
5 |
Correct |
1 ms |
340 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
324 KB |
Output is correct |
17 |
Correct |
1 ms |
328 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
328 KB |
Output is correct |
22 |
Correct |
1 ms |
328 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
0 ms |
324 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
320 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
324 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
328 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
0 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
328 KB |
Output is correct |
15 |
Correct |
1 ms |
320 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
324 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
328 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
340 KB |
Output is correct |
25 |
Correct |
9 ms |
1148 KB |
Output is correct |
26 |
Correct |
11 ms |
2120 KB |
Output is correct |
27 |
Correct |
8 ms |
1744 KB |
Output is correct |
28 |
Correct |
5 ms |
1748 KB |
Output is correct |
29 |
Correct |
3 ms |
1620 KB |
Output is correct |
30 |
Correct |
3 ms |
1480 KB |
Output is correct |
31 |
Correct |
8 ms |
1620 KB |
Output is correct |
32 |
Correct |
12 ms |
1688 KB |
Output is correct |
33 |
Correct |
12 ms |
1660 KB |
Output is correct |
34 |
Correct |
21 ms |
4396 KB |
Output is correct |
35 |
Correct |
22 ms |
3916 KB |
Output is correct |
36 |
Correct |
10 ms |
3984 KB |
Output is correct |
37 |
Correct |
7 ms |
3412 KB |
Output is correct |
38 |
Correct |
6 ms |
3412 KB |
Output is correct |
39 |
Correct |
94 ms |
14980 KB |
Output is correct |
40 |
Correct |
228 ms |
43296 KB |
Output is correct |
41 |
Correct |
249 ms |
33896 KB |
Output is correct |
42 |
Correct |
109 ms |
40152 KB |
Output is correct |
43 |
Correct |
58 ms |
31396 KB |
Output is correct |
44 |
Correct |
50 ms |
31316 KB |
Output is correct |
45 |
Correct |
236 ms |
50984 KB |
Output is correct |
46 |
Correct |
232 ms |
50804 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
324 KB |
Output is correct |
5 |
Correct |
1 ms |
340 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
324 KB |
Output is correct |
17 |
Correct |
1 ms |
328 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
328 KB |
Output is correct |
22 |
Correct |
1 ms |
328 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
0 ms |
324 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
320 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
10 ms |
1628 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
468 KB |
Output is correct |
36 |
Correct |
9 ms |
1144 KB |
Output is correct |
37 |
Correct |
6 ms |
3280 KB |
Output is correct |
38 |
Correct |
13 ms |
2096 KB |
Output is correct |
39 |
Correct |
10 ms |
1712 KB |
Output is correct |
40 |
Correct |
13 ms |
1612 KB |
Output is correct |
41 |
Correct |
9 ms |
1620 KB |
Output is correct |
42 |
Correct |
5 ms |
1712 KB |
Output is correct |
43 |
Correct |
3 ms |
1584 KB |
Output is correct |
44 |
Correct |
3 ms |
1620 KB |
Output is correct |
45 |
Correct |
7 ms |
4072 KB |
Output is correct |
46 |
Correct |
7 ms |
4072 KB |
Output is correct |
47 |
Correct |
8 ms |
2772 KB |
Output is correct |
48 |
Correct |
10 ms |
1620 KB |
Output is correct |
49 |
Correct |
10 ms |
1648 KB |
Output is correct |
50 |
Correct |
9 ms |
1588 KB |
Output is correct |
51 |
Correct |
10 ms |
1620 KB |
Output is correct |
52 |
Correct |
15 ms |
1580 KB |
Output is correct |
53 |
Correct |
12 ms |
1620 KB |
Output is correct |
54 |
Correct |
10 ms |
1748 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
324 KB |
Output is correct |
5 |
Correct |
1 ms |
340 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
324 KB |
Output is correct |
17 |
Correct |
1 ms |
328 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
328 KB |
Output is correct |
22 |
Correct |
1 ms |
328 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
0 ms |
324 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
320 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
10 ms |
1628 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
468 KB |
Output is correct |
36 |
Correct |
9 ms |
1144 KB |
Output is correct |
37 |
Correct |
6 ms |
3280 KB |
Output is correct |
38 |
Correct |
13 ms |
2096 KB |
Output is correct |
39 |
Correct |
10 ms |
1712 KB |
Output is correct |
40 |
Correct |
13 ms |
1612 KB |
Output is correct |
41 |
Correct |
9 ms |
1620 KB |
Output is correct |
42 |
Correct |
5 ms |
1712 KB |
Output is correct |
43 |
Correct |
3 ms |
1584 KB |
Output is correct |
44 |
Correct |
3 ms |
1620 KB |
Output is correct |
45 |
Correct |
7 ms |
4072 KB |
Output is correct |
46 |
Correct |
7 ms |
4072 KB |
Output is correct |
47 |
Correct |
8 ms |
2772 KB |
Output is correct |
48 |
Correct |
10 ms |
1620 KB |
Output is correct |
49 |
Correct |
10 ms |
1648 KB |
Output is correct |
50 |
Correct |
9 ms |
1588 KB |
Output is correct |
51 |
Correct |
10 ms |
1620 KB |
Output is correct |
52 |
Correct |
15 ms |
1580 KB |
Output is correct |
53 |
Correct |
12 ms |
1620 KB |
Output is correct |
54 |
Correct |
10 ms |
1748 KB |
Output is correct |
55 |
Correct |
23 ms |
3500 KB |
Output is correct |
56 |
Correct |
10 ms |
2900 KB |
Output is correct |
57 |
Correct |
24 ms |
4540 KB |
Output is correct |
58 |
Correct |
32 ms |
3568 KB |
Output is correct |
59 |
Correct |
23 ms |
3796 KB |
Output is correct |
60 |
Correct |
29 ms |
3508 KB |
Output is correct |
61 |
Correct |
25 ms |
3464 KB |
Output is correct |
62 |
Correct |
10 ms |
3924 KB |
Output is correct |
63 |
Correct |
7 ms |
3456 KB |
Output is correct |
64 |
Correct |
6 ms |
3412 KB |
Output is correct |
65 |
Correct |
15 ms |
9864 KB |
Output is correct |
66 |
Correct |
17 ms |
9824 KB |
Output is correct |
67 |
Correct |
18 ms |
6572 KB |
Output is correct |
68 |
Correct |
21 ms |
3664 KB |
Output is correct |
69 |
Correct |
21 ms |
3572 KB |
Output is correct |
70 |
Correct |
20 ms |
3540 KB |
Output is correct |
71 |
Correct |
22 ms |
3668 KB |
Output is correct |
72 |
Correct |
33 ms |
3572 KB |
Output is correct |
73 |
Correct |
30 ms |
3496 KB |
Output is correct |
74 |
Correct |
24 ms |
3508 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
324 KB |
Output is correct |
6 |
Correct |
1 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
324 KB |
Output is correct |
19 |
Correct |
11 ms |
1620 KB |
Output is correct |
20 |
Correct |
5 ms |
3228 KB |
Output is correct |
21 |
Correct |
11 ms |
1740 KB |
Output is correct |
22 |
Correct |
13 ms |
1604 KB |
Output is correct |
23 |
Correct |
10 ms |
1612 KB |
Output is correct |
24 |
Correct |
8 ms |
4072 KB |
Output is correct |
25 |
Correct |
7 ms |
4072 KB |
Output is correct |
26 |
Correct |
14 ms |
1620 KB |
Output is correct |
27 |
Correct |
13 ms |
1620 KB |
Output is correct |
28 |
Correct |
10 ms |
1620 KB |
Output is correct |
29 |
Correct |
25 ms |
3504 KB |
Output is correct |
30 |
Correct |
10 ms |
2872 KB |
Output is correct |
31 |
Correct |
23 ms |
3796 KB |
Output is correct |
32 |
Correct |
30 ms |
3504 KB |
Output is correct |
33 |
Correct |
25 ms |
3272 KB |
Output is correct |
34 |
Correct |
15 ms |
9772 KB |
Output is correct |
35 |
Correct |
15 ms |
9760 KB |
Output is correct |
36 |
Correct |
30 ms |
3540 KB |
Output is correct |
37 |
Correct |
34 ms |
3412 KB |
Output is correct |
38 |
Correct |
25 ms |
3408 KB |
Output is correct |
39 |
Correct |
290 ms |
30156 KB |
Output is correct |
40 |
Correct |
34 ms |
4124 KB |
Output is correct |
41 |
Correct |
20 ms |
11920 KB |
Output is correct |
42 |
Correct |
43 ms |
4764 KB |
Output is correct |
43 |
Correct |
34 ms |
10360 KB |
Output is correct |
44 |
Correct |
128 ms |
20252 KB |
Output is correct |
45 |
Correct |
118 ms |
23128 KB |
Output is correct |
46 |
Correct |
249 ms |
32676 KB |
Output is correct |
47 |
Correct |
299 ms |
30316 KB |
Output is correct |
48 |
Correct |
274 ms |
31100 KB |
Output is correct |
49 |
Correct |
147 ms |
95536 KB |
Output is correct |
50 |
Correct |
144 ms |
95568 KB |
Output is correct |
51 |
Correct |
330 ms |
31672 KB |
Output is correct |
52 |
Correct |
317 ms |
31172 KB |
Output is correct |
53 |
Correct |
264 ms |
31232 KB |
Output is correct |
54 |
Correct |
1 ms |
212 KB |
Output is correct |
55 |
Correct |
1 ms |
212 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
1 ms |
324 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
0 ms |
212 KB |
Output is correct |
60 |
Correct |
1 ms |
212 KB |
Output is correct |
61 |
Correct |
1 ms |
340 KB |
Output is correct |
62 |
Correct |
1 ms |
340 KB |
Output is correct |
63 |
Correct |
1 ms |
340 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
1 ms |
340 KB |
Output is correct |
66 |
Correct |
1 ms |
340 KB |
Output is correct |
67 |
Correct |
1 ms |
340 KB |
Output is correct |
68 |
Correct |
1 ms |
340 KB |
Output is correct |
69 |
Correct |
1 ms |
324 KB |
Output is correct |
70 |
Correct |
1 ms |
328 KB |
Output is correct |
71 |
Correct |
1 ms |
212 KB |
Output is correct |
72 |
Correct |
1 ms |
340 KB |
Output is correct |
73 |
Correct |
1 ms |
212 KB |
Output is correct |
74 |
Correct |
1 ms |
328 KB |
Output is correct |
75 |
Correct |
1 ms |
328 KB |
Output is correct |
76 |
Correct |
1 ms |
340 KB |
Output is correct |
77 |
Correct |
0 ms |
324 KB |
Output is correct |
78 |
Correct |
0 ms |
212 KB |
Output is correct |
79 |
Correct |
1 ms |
212 KB |
Output is correct |
80 |
Correct |
1 ms |
212 KB |
Output is correct |
81 |
Correct |
1 ms |
340 KB |
Output is correct |
82 |
Correct |
1 ms |
212 KB |
Output is correct |
83 |
Correct |
1 ms |
340 KB |
Output is correct |
84 |
Correct |
1 ms |
320 KB |
Output is correct |
85 |
Correct |
1 ms |
340 KB |
Output is correct |
86 |
Correct |
1 ms |
212 KB |
Output is correct |
87 |
Correct |
0 ms |
324 KB |
Output is correct |
88 |
Correct |
0 ms |
212 KB |
Output is correct |
89 |
Correct |
1 ms |
212 KB |
Output is correct |
90 |
Correct |
1 ms |
328 KB |
Output is correct |
91 |
Correct |
1 ms |
212 KB |
Output is correct |
92 |
Correct |
1 ms |
340 KB |
Output is correct |
93 |
Correct |
1 ms |
340 KB |
Output is correct |
94 |
Correct |
1 ms |
340 KB |
Output is correct |
95 |
Correct |
1 ms |
340 KB |
Output is correct |
96 |
Correct |
0 ms |
340 KB |
Output is correct |
97 |
Correct |
1 ms |
340 KB |
Output is correct |
98 |
Correct |
1 ms |
212 KB |
Output is correct |
99 |
Correct |
1 ms |
328 KB |
Output is correct |
100 |
Correct |
1 ms |
320 KB |
Output is correct |
101 |
Correct |
1 ms |
340 KB |
Output is correct |
102 |
Correct |
1 ms |
212 KB |
Output is correct |
103 |
Correct |
1 ms |
212 KB |
Output is correct |
104 |
Correct |
1 ms |
324 KB |
Output is correct |
105 |
Correct |
1 ms |
212 KB |
Output is correct |
106 |
Correct |
1 ms |
328 KB |
Output is correct |
107 |
Correct |
1 ms |
340 KB |
Output is correct |
108 |
Correct |
1 ms |
340 KB |
Output is correct |
109 |
Correct |
1 ms |
340 KB |
Output is correct |
110 |
Correct |
9 ms |
1148 KB |
Output is correct |
111 |
Correct |
11 ms |
2120 KB |
Output is correct |
112 |
Correct |
8 ms |
1744 KB |
Output is correct |
113 |
Correct |
5 ms |
1748 KB |
Output is correct |
114 |
Correct |
3 ms |
1620 KB |
Output is correct |
115 |
Correct |
3 ms |
1480 KB |
Output is correct |
116 |
Correct |
8 ms |
1620 KB |
Output is correct |
117 |
Correct |
12 ms |
1688 KB |
Output is correct |
118 |
Correct |
12 ms |
1660 KB |
Output is correct |
119 |
Correct |
21 ms |
4396 KB |
Output is correct |
120 |
Correct |
22 ms |
3916 KB |
Output is correct |
121 |
Correct |
10 ms |
3984 KB |
Output is correct |
122 |
Correct |
7 ms |
3412 KB |
Output is correct |
123 |
Correct |
6 ms |
3412 KB |
Output is correct |
124 |
Correct |
94 ms |
14980 KB |
Output is correct |
125 |
Correct |
228 ms |
43296 KB |
Output is correct |
126 |
Correct |
249 ms |
33896 KB |
Output is correct |
127 |
Correct |
109 ms |
40152 KB |
Output is correct |
128 |
Correct |
58 ms |
31396 KB |
Output is correct |
129 |
Correct |
50 ms |
31316 KB |
Output is correct |
130 |
Correct |
236 ms |
50984 KB |
Output is correct |
131 |
Correct |
232 ms |
50804 KB |
Output is correct |
132 |
Correct |
10 ms |
1628 KB |
Output is correct |
133 |
Correct |
1 ms |
340 KB |
Output is correct |
134 |
Correct |
1 ms |
468 KB |
Output is correct |
135 |
Correct |
9 ms |
1144 KB |
Output is correct |
136 |
Correct |
6 ms |
3280 KB |
Output is correct |
137 |
Correct |
13 ms |
2096 KB |
Output is correct |
138 |
Correct |
10 ms |
1712 KB |
Output is correct |
139 |
Correct |
13 ms |
1612 KB |
Output is correct |
140 |
Correct |
9 ms |
1620 KB |
Output is correct |
141 |
Correct |
5 ms |
1712 KB |
Output is correct |
142 |
Correct |
3 ms |
1584 KB |
Output is correct |
143 |
Correct |
3 ms |
1620 KB |
Output is correct |
144 |
Correct |
7 ms |
4072 KB |
Output is correct |
145 |
Correct |
7 ms |
4072 KB |
Output is correct |
146 |
Correct |
8 ms |
2772 KB |
Output is correct |
147 |
Correct |
10 ms |
1620 KB |
Output is correct |
148 |
Correct |
10 ms |
1648 KB |
Output is correct |
149 |
Correct |
9 ms |
1588 KB |
Output is correct |
150 |
Correct |
10 ms |
1620 KB |
Output is correct |
151 |
Correct |
15 ms |
1580 KB |
Output is correct |
152 |
Correct |
12 ms |
1620 KB |
Output is correct |
153 |
Correct |
10 ms |
1748 KB |
Output is correct |
154 |
Correct |
23 ms |
3500 KB |
Output is correct |
155 |
Correct |
10 ms |
2900 KB |
Output is correct |
156 |
Correct |
24 ms |
4540 KB |
Output is correct |
157 |
Correct |
32 ms |
3568 KB |
Output is correct |
158 |
Correct |
23 ms |
3796 KB |
Output is correct |
159 |
Correct |
29 ms |
3508 KB |
Output is correct |
160 |
Correct |
25 ms |
3464 KB |
Output is correct |
161 |
Correct |
10 ms |
3924 KB |
Output is correct |
162 |
Correct |
7 ms |
3456 KB |
Output is correct |
163 |
Correct |
6 ms |
3412 KB |
Output is correct |
164 |
Correct |
15 ms |
9864 KB |
Output is correct |
165 |
Correct |
17 ms |
9824 KB |
Output is correct |
166 |
Correct |
18 ms |
6572 KB |
Output is correct |
167 |
Correct |
21 ms |
3664 KB |
Output is correct |
168 |
Correct |
21 ms |
3572 KB |
Output is correct |
169 |
Correct |
20 ms |
3540 KB |
Output is correct |
170 |
Correct |
22 ms |
3668 KB |
Output is correct |
171 |
Correct |
33 ms |
3572 KB |
Output is correct |
172 |
Correct |
30 ms |
3496 KB |
Output is correct |
173 |
Correct |
24 ms |
3508 KB |
Output is correct |
174 |
Correct |
44 ms |
4948 KB |
Output is correct |
175 |
Correct |
67 ms |
7528 KB |
Output is correct |
176 |
Correct |
115 ms |
26856 KB |
Output is correct |
177 |
Correct |
179 ms |
22904 KB |
Output is correct |
178 |
Correct |
283 ms |
28808 KB |
Output is correct |
179 |
Correct |
209 ms |
32600 KB |
Output is correct |
180 |
Correct |
220 ms |
30800 KB |
Output is correct |
181 |
Correct |
264 ms |
32240 KB |
Output is correct |
182 |
Correct |
226 ms |
32548 KB |
Output is correct |
183 |
Correct |
244 ms |
34084 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
324 KB |
Output is correct |
6 |
Correct |
1 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
324 KB |
Output is correct |
19 |
Correct |
11 ms |
1620 KB |
Output is correct |
20 |
Correct |
5 ms |
3228 KB |
Output is correct |
21 |
Correct |
11 ms |
1740 KB |
Output is correct |
22 |
Correct |
13 ms |
1604 KB |
Output is correct |
23 |
Correct |
10 ms |
1612 KB |
Output is correct |
24 |
Correct |
8 ms |
4072 KB |
Output is correct |
25 |
Correct |
7 ms |
4072 KB |
Output is correct |
26 |
Correct |
14 ms |
1620 KB |
Output is correct |
27 |
Correct |
13 ms |
1620 KB |
Output is correct |
28 |
Correct |
10 ms |
1620 KB |
Output is correct |
29 |
Correct |
25 ms |
3504 KB |
Output is correct |
30 |
Correct |
10 ms |
2872 KB |
Output is correct |
31 |
Correct |
23 ms |
3796 KB |
Output is correct |
32 |
Correct |
30 ms |
3504 KB |
Output is correct |
33 |
Correct |
25 ms |
3272 KB |
Output is correct |
34 |
Correct |
15 ms |
9772 KB |
Output is correct |
35 |
Correct |
15 ms |
9760 KB |
Output is correct |
36 |
Correct |
30 ms |
3540 KB |
Output is correct |
37 |
Correct |
34 ms |
3412 KB |
Output is correct |
38 |
Correct |
25 ms |
3408 KB |
Output is correct |
39 |
Correct |
290 ms |
30156 KB |
Output is correct |
40 |
Correct |
34 ms |
4124 KB |
Output is correct |
41 |
Correct |
20 ms |
11920 KB |
Output is correct |
42 |
Correct |
43 ms |
4764 KB |
Output is correct |
43 |
Correct |
34 ms |
10360 KB |
Output is correct |
44 |
Correct |
128 ms |
20252 KB |
Output is correct |
45 |
Correct |
118 ms |
23128 KB |
Output is correct |
46 |
Correct |
249 ms |
32676 KB |
Output is correct |
47 |
Correct |
299 ms |
30316 KB |
Output is correct |
48 |
Correct |
274 ms |
31100 KB |
Output is correct |
49 |
Correct |
147 ms |
95536 KB |
Output is correct |
50 |
Correct |
144 ms |
95568 KB |
Output is correct |
51 |
Correct |
330 ms |
31672 KB |
Output is correct |
52 |
Correct |
317 ms |
31172 KB |
Output is correct |
53 |
Correct |
264 ms |
31232 KB |
Output is correct |
54 |
Correct |
1 ms |
212 KB |
Output is correct |
55 |
Correct |
1 ms |
212 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
1 ms |
324 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
0 ms |
212 KB |
Output is correct |
60 |
Correct |
1 ms |
212 KB |
Output is correct |
61 |
Correct |
1 ms |
340 KB |
Output is correct |
62 |
Correct |
1 ms |
340 KB |
Output is correct |
63 |
Correct |
1 ms |
340 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
1 ms |
340 KB |
Output is correct |
66 |
Correct |
1 ms |
340 KB |
Output is correct |
67 |
Correct |
1 ms |
340 KB |
Output is correct |
68 |
Correct |
1 ms |
340 KB |
Output is correct |
69 |
Correct |
1 ms |
324 KB |
Output is correct |
70 |
Correct |
1 ms |
328 KB |
Output is correct |
71 |
Correct |
1 ms |
212 KB |
Output is correct |
72 |
Correct |
1 ms |
340 KB |
Output is correct |
73 |
Correct |
1 ms |
212 KB |
Output is correct |
74 |
Correct |
1 ms |
328 KB |
Output is correct |
75 |
Correct |
1 ms |
328 KB |
Output is correct |
76 |
Correct |
1 ms |
340 KB |
Output is correct |
77 |
Correct |
0 ms |
324 KB |
Output is correct |
78 |
Correct |
0 ms |
212 KB |
Output is correct |
79 |
Correct |
1 ms |
212 KB |
Output is correct |
80 |
Correct |
1 ms |
212 KB |
Output is correct |
81 |
Correct |
1 ms |
340 KB |
Output is correct |
82 |
Correct |
1 ms |
212 KB |
Output is correct |
83 |
Correct |
1 ms |
340 KB |
Output is correct |
84 |
Correct |
1 ms |
320 KB |
Output is correct |
85 |
Correct |
1 ms |
340 KB |
Output is correct |
86 |
Correct |
1 ms |
212 KB |
Output is correct |
87 |
Correct |
0 ms |
324 KB |
Output is correct |
88 |
Correct |
0 ms |
212 KB |
Output is correct |
89 |
Correct |
1 ms |
212 KB |
Output is correct |
90 |
Correct |
1 ms |
328 KB |
Output is correct |
91 |
Correct |
1 ms |
212 KB |
Output is correct |
92 |
Correct |
1 ms |
340 KB |
Output is correct |
93 |
Correct |
1 ms |
340 KB |
Output is correct |
94 |
Correct |
1 ms |
340 KB |
Output is correct |
95 |
Correct |
1 ms |
340 KB |
Output is correct |
96 |
Correct |
0 ms |
340 KB |
Output is correct |
97 |
Correct |
1 ms |
340 KB |
Output is correct |
98 |
Correct |
1 ms |
212 KB |
Output is correct |
99 |
Correct |
1 ms |
328 KB |
Output is correct |
100 |
Correct |
1 ms |
320 KB |
Output is correct |
101 |
Correct |
1 ms |
340 KB |
Output is correct |
102 |
Correct |
1 ms |
212 KB |
Output is correct |
103 |
Correct |
1 ms |
212 KB |
Output is correct |
104 |
Correct |
1 ms |
324 KB |
Output is correct |
105 |
Correct |
1 ms |
212 KB |
Output is correct |
106 |
Correct |
1 ms |
328 KB |
Output is correct |
107 |
Correct |
1 ms |
340 KB |
Output is correct |
108 |
Correct |
1 ms |
340 KB |
Output is correct |
109 |
Correct |
1 ms |
340 KB |
Output is correct |
110 |
Correct |
9 ms |
1148 KB |
Output is correct |
111 |
Correct |
11 ms |
2120 KB |
Output is correct |
112 |
Correct |
8 ms |
1744 KB |
Output is correct |
113 |
Correct |
5 ms |
1748 KB |
Output is correct |
114 |
Correct |
3 ms |
1620 KB |
Output is correct |
115 |
Correct |
3 ms |
1480 KB |
Output is correct |
116 |
Correct |
8 ms |
1620 KB |
Output is correct |
117 |
Correct |
12 ms |
1688 KB |
Output is correct |
118 |
Correct |
12 ms |
1660 KB |
Output is correct |
119 |
Correct |
21 ms |
4396 KB |
Output is correct |
120 |
Correct |
22 ms |
3916 KB |
Output is correct |
121 |
Correct |
10 ms |
3984 KB |
Output is correct |
122 |
Correct |
7 ms |
3412 KB |
Output is correct |
123 |
Correct |
6 ms |
3412 KB |
Output is correct |
124 |
Correct |
94 ms |
14980 KB |
Output is correct |
125 |
Correct |
228 ms |
43296 KB |
Output is correct |
126 |
Correct |
249 ms |
33896 KB |
Output is correct |
127 |
Correct |
109 ms |
40152 KB |
Output is correct |
128 |
Correct |
58 ms |
31396 KB |
Output is correct |
129 |
Correct |
50 ms |
31316 KB |
Output is correct |
130 |
Correct |
236 ms |
50984 KB |
Output is correct |
131 |
Correct |
232 ms |
50804 KB |
Output is correct |
132 |
Correct |
10 ms |
1628 KB |
Output is correct |
133 |
Correct |
1 ms |
340 KB |
Output is correct |
134 |
Correct |
1 ms |
468 KB |
Output is correct |
135 |
Correct |
9 ms |
1144 KB |
Output is correct |
136 |
Correct |
6 ms |
3280 KB |
Output is correct |
137 |
Correct |
13 ms |
2096 KB |
Output is correct |
138 |
Correct |
10 ms |
1712 KB |
Output is correct |
139 |
Correct |
13 ms |
1612 KB |
Output is correct |
140 |
Correct |
9 ms |
1620 KB |
Output is correct |
141 |
Correct |
5 ms |
1712 KB |
Output is correct |
142 |
Correct |
3 ms |
1584 KB |
Output is correct |
143 |
Correct |
3 ms |
1620 KB |
Output is correct |
144 |
Correct |
7 ms |
4072 KB |
Output is correct |
145 |
Correct |
7 ms |
4072 KB |
Output is correct |
146 |
Correct |
8 ms |
2772 KB |
Output is correct |
147 |
Correct |
10 ms |
1620 KB |
Output is correct |
148 |
Correct |
10 ms |
1648 KB |
Output is correct |
149 |
Correct |
9 ms |
1588 KB |
Output is correct |
150 |
Correct |
10 ms |
1620 KB |
Output is correct |
151 |
Correct |
15 ms |
1580 KB |
Output is correct |
152 |
Correct |
12 ms |
1620 KB |
Output is correct |
153 |
Correct |
10 ms |
1748 KB |
Output is correct |
154 |
Correct |
23 ms |
3500 KB |
Output is correct |
155 |
Correct |
10 ms |
2900 KB |
Output is correct |
156 |
Correct |
24 ms |
4540 KB |
Output is correct |
157 |
Correct |
32 ms |
3568 KB |
Output is correct |
158 |
Correct |
23 ms |
3796 KB |
Output is correct |
159 |
Correct |
29 ms |
3508 KB |
Output is correct |
160 |
Correct |
25 ms |
3464 KB |
Output is correct |
161 |
Correct |
10 ms |
3924 KB |
Output is correct |
162 |
Correct |
7 ms |
3456 KB |
Output is correct |
163 |
Correct |
6 ms |
3412 KB |
Output is correct |
164 |
Correct |
15 ms |
9864 KB |
Output is correct |
165 |
Correct |
17 ms |
9824 KB |
Output is correct |
166 |
Correct |
18 ms |
6572 KB |
Output is correct |
167 |
Correct |
21 ms |
3664 KB |
Output is correct |
168 |
Correct |
21 ms |
3572 KB |
Output is correct |
169 |
Correct |
20 ms |
3540 KB |
Output is correct |
170 |
Correct |
22 ms |
3668 KB |
Output is correct |
171 |
Correct |
33 ms |
3572 KB |
Output is correct |
172 |
Correct |
30 ms |
3496 KB |
Output is correct |
173 |
Correct |
24 ms |
3508 KB |
Output is correct |
174 |
Correct |
44 ms |
4948 KB |
Output is correct |
175 |
Correct |
67 ms |
7528 KB |
Output is correct |
176 |
Correct |
115 ms |
26856 KB |
Output is correct |
177 |
Correct |
179 ms |
22904 KB |
Output is correct |
178 |
Correct |
283 ms |
28808 KB |
Output is correct |
179 |
Correct |
209 ms |
32600 KB |
Output is correct |
180 |
Correct |
220 ms |
30800 KB |
Output is correct |
181 |
Correct |
264 ms |
32240 KB |
Output is correct |
182 |
Correct |
226 ms |
32548 KB |
Output is correct |
183 |
Correct |
244 ms |
34084 KB |
Output is correct |
184 |
Correct |
641 ms |
62464 KB |
Output is correct |
185 |
Correct |
273 ms |
36104 KB |
Output is correct |
186 |
Correct |
412 ms |
57660 KB |
Output is correct |
187 |
Correct |
533 ms |
44408 KB |
Output is correct |
188 |
Correct |
548 ms |
79068 KB |
Output is correct |
189 |
Correct |
671 ms |
62536 KB |
Output is correct |
190 |
Correct |
543 ms |
62128 KB |
Output is correct |
191 |
Correct |
231 ms |
79572 KB |
Output is correct |
192 |
Correct |
109 ms |
59872 KB |
Output is correct |
193 |
Correct |
109 ms |
59980 KB |
Output is correct |
194 |
Correct |
293 ms |
188464 KB |
Output is correct |
195 |
Correct |
296 ms |
188464 KB |
Output is correct |
196 |
Correct |
414 ms |
61656 KB |
Output is correct |
197 |
Correct |
426 ms |
61248 KB |
Output is correct |
198 |
Correct |
430 ms |
61088 KB |
Output is correct |
199 |
Correct |
477 ms |
61284 KB |
Output is correct |
200 |
Correct |
703 ms |
60264 KB |
Output is correct |
201 |
Correct |
668 ms |
60032 KB |
Output is correct |
202 |
Correct |
646 ms |
59900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
324 KB |
Output is correct |
6 |
Correct |
1 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
1 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
324 KB |
Output is correct |
19 |
Correct |
11 ms |
1620 KB |
Output is correct |
20 |
Correct |
5 ms |
3228 KB |
Output is correct |
21 |
Correct |
11 ms |
1740 KB |
Output is correct |
22 |
Correct |
13 ms |
1604 KB |
Output is correct |
23 |
Correct |
10 ms |
1612 KB |
Output is correct |
24 |
Correct |
8 ms |
4072 KB |
Output is correct |
25 |
Correct |
7 ms |
4072 KB |
Output is correct |
26 |
Correct |
14 ms |
1620 KB |
Output is correct |
27 |
Correct |
13 ms |
1620 KB |
Output is correct |
28 |
Correct |
10 ms |
1620 KB |
Output is correct |
29 |
Correct |
25 ms |
3504 KB |
Output is correct |
30 |
Correct |
10 ms |
2872 KB |
Output is correct |
31 |
Correct |
23 ms |
3796 KB |
Output is correct |
32 |
Correct |
30 ms |
3504 KB |
Output is correct |
33 |
Correct |
25 ms |
3272 KB |
Output is correct |
34 |
Correct |
15 ms |
9772 KB |
Output is correct |
35 |
Correct |
15 ms |
9760 KB |
Output is correct |
36 |
Correct |
30 ms |
3540 KB |
Output is correct |
37 |
Correct |
34 ms |
3412 KB |
Output is correct |
38 |
Correct |
25 ms |
3408 KB |
Output is correct |
39 |
Correct |
290 ms |
30156 KB |
Output is correct |
40 |
Correct |
34 ms |
4124 KB |
Output is correct |
41 |
Correct |
20 ms |
11920 KB |
Output is correct |
42 |
Correct |
43 ms |
4764 KB |
Output is correct |
43 |
Correct |
34 ms |
10360 KB |
Output is correct |
44 |
Correct |
128 ms |
20252 KB |
Output is correct |
45 |
Correct |
118 ms |
23128 KB |
Output is correct |
46 |
Correct |
249 ms |
32676 KB |
Output is correct |
47 |
Correct |
299 ms |
30316 KB |
Output is correct |
48 |
Correct |
274 ms |
31100 KB |
Output is correct |
49 |
Correct |
147 ms |
95536 KB |
Output is correct |
50 |
Correct |
144 ms |
95568 KB |
Output is correct |
51 |
Correct |
330 ms |
31672 KB |
Output is correct |
52 |
Correct |
317 ms |
31172 KB |
Output is correct |
53 |
Correct |
264 ms |
31232 KB |
Output is correct |
54 |
Correct |
1 ms |
212 KB |
Output is correct |
55 |
Correct |
1 ms |
212 KB |
Output is correct |
56 |
Correct |
1 ms |
212 KB |
Output is correct |
57 |
Correct |
1 ms |
324 KB |
Output is correct |
58 |
Correct |
1 ms |
340 KB |
Output is correct |
59 |
Correct |
0 ms |
212 KB |
Output is correct |
60 |
Correct |
1 ms |
212 KB |
Output is correct |
61 |
Correct |
1 ms |
340 KB |
Output is correct |
62 |
Correct |
1 ms |
340 KB |
Output is correct |
63 |
Correct |
1 ms |
340 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
1 ms |
340 KB |
Output is correct |
66 |
Correct |
1 ms |
340 KB |
Output is correct |
67 |
Correct |
1 ms |
340 KB |
Output is correct |
68 |
Correct |
1 ms |
340 KB |
Output is correct |
69 |
Correct |
1 ms |
324 KB |
Output is correct |
70 |
Correct |
1 ms |
328 KB |
Output is correct |
71 |
Correct |
1 ms |
212 KB |
Output is correct |
72 |
Correct |
1 ms |
340 KB |
Output is correct |
73 |
Correct |
1 ms |
212 KB |
Output is correct |
74 |
Correct |
1 ms |
328 KB |
Output is correct |
75 |
Correct |
1 ms |
328 KB |
Output is correct |
76 |
Correct |
1 ms |
340 KB |
Output is correct |
77 |
Correct |
0 ms |
324 KB |
Output is correct |
78 |
Correct |
0 ms |
212 KB |
Output is correct |
79 |
Correct |
1 ms |
212 KB |
Output is correct |
80 |
Correct |
1 ms |
212 KB |
Output is correct |
81 |
Correct |
1 ms |
340 KB |
Output is correct |
82 |
Correct |
1 ms |
212 KB |
Output is correct |
83 |
Correct |
1 ms |
340 KB |
Output is correct |
84 |
Correct |
1 ms |
320 KB |
Output is correct |
85 |
Correct |
1 ms |
340 KB |
Output is correct |
86 |
Correct |
1 ms |
212 KB |
Output is correct |
87 |
Correct |
0 ms |
324 KB |
Output is correct |
88 |
Correct |
0 ms |
212 KB |
Output is correct |
89 |
Correct |
1 ms |
212 KB |
Output is correct |
90 |
Correct |
1 ms |
328 KB |
Output is correct |
91 |
Correct |
1 ms |
212 KB |
Output is correct |
92 |
Correct |
1 ms |
340 KB |
Output is correct |
93 |
Correct |
1 ms |
340 KB |
Output is correct |
94 |
Correct |
1 ms |
340 KB |
Output is correct |
95 |
Correct |
1 ms |
340 KB |
Output is correct |
96 |
Correct |
0 ms |
340 KB |
Output is correct |
97 |
Correct |
1 ms |
340 KB |
Output is correct |
98 |
Correct |
1 ms |
212 KB |
Output is correct |
99 |
Correct |
1 ms |
328 KB |
Output is correct |
100 |
Correct |
1 ms |
320 KB |
Output is correct |
101 |
Correct |
1 ms |
340 KB |
Output is correct |
102 |
Correct |
1 ms |
212 KB |
Output is correct |
103 |
Correct |
1 ms |
212 KB |
Output is correct |
104 |
Correct |
1 ms |
324 KB |
Output is correct |
105 |
Correct |
1 ms |
212 KB |
Output is correct |
106 |
Correct |
1 ms |
328 KB |
Output is correct |
107 |
Correct |
1 ms |
340 KB |
Output is correct |
108 |
Correct |
1 ms |
340 KB |
Output is correct |
109 |
Correct |
1 ms |
340 KB |
Output is correct |
110 |
Correct |
9 ms |
1148 KB |
Output is correct |
111 |
Correct |
11 ms |
2120 KB |
Output is correct |
112 |
Correct |
8 ms |
1744 KB |
Output is correct |
113 |
Correct |
5 ms |
1748 KB |
Output is correct |
114 |
Correct |
3 ms |
1620 KB |
Output is correct |
115 |
Correct |
3 ms |
1480 KB |
Output is correct |
116 |
Correct |
8 ms |
1620 KB |
Output is correct |
117 |
Correct |
12 ms |
1688 KB |
Output is correct |
118 |
Correct |
12 ms |
1660 KB |
Output is correct |
119 |
Correct |
21 ms |
4396 KB |
Output is correct |
120 |
Correct |
22 ms |
3916 KB |
Output is correct |
121 |
Correct |
10 ms |
3984 KB |
Output is correct |
122 |
Correct |
7 ms |
3412 KB |
Output is correct |
123 |
Correct |
6 ms |
3412 KB |
Output is correct |
124 |
Correct |
94 ms |
14980 KB |
Output is correct |
125 |
Correct |
228 ms |
43296 KB |
Output is correct |
126 |
Correct |
249 ms |
33896 KB |
Output is correct |
127 |
Correct |
109 ms |
40152 KB |
Output is correct |
128 |
Correct |
58 ms |
31396 KB |
Output is correct |
129 |
Correct |
50 ms |
31316 KB |
Output is correct |
130 |
Correct |
236 ms |
50984 KB |
Output is correct |
131 |
Correct |
232 ms |
50804 KB |
Output is correct |
132 |
Correct |
10 ms |
1628 KB |
Output is correct |
133 |
Correct |
1 ms |
340 KB |
Output is correct |
134 |
Correct |
1 ms |
468 KB |
Output is correct |
135 |
Correct |
9 ms |
1144 KB |
Output is correct |
136 |
Correct |
6 ms |
3280 KB |
Output is correct |
137 |
Correct |
13 ms |
2096 KB |
Output is correct |
138 |
Correct |
10 ms |
1712 KB |
Output is correct |
139 |
Correct |
13 ms |
1612 KB |
Output is correct |
140 |
Correct |
9 ms |
1620 KB |
Output is correct |
141 |
Correct |
5 ms |
1712 KB |
Output is correct |
142 |
Correct |
3 ms |
1584 KB |
Output is correct |
143 |
Correct |
3 ms |
1620 KB |
Output is correct |
144 |
Correct |
7 ms |
4072 KB |
Output is correct |
145 |
Correct |
7 ms |
4072 KB |
Output is correct |
146 |
Correct |
8 ms |
2772 KB |
Output is correct |
147 |
Correct |
10 ms |
1620 KB |
Output is correct |
148 |
Correct |
10 ms |
1648 KB |
Output is correct |
149 |
Correct |
9 ms |
1588 KB |
Output is correct |
150 |
Correct |
10 ms |
1620 KB |
Output is correct |
151 |
Correct |
15 ms |
1580 KB |
Output is correct |
152 |
Correct |
12 ms |
1620 KB |
Output is correct |
153 |
Correct |
10 ms |
1748 KB |
Output is correct |
154 |
Correct |
23 ms |
3500 KB |
Output is correct |
155 |
Correct |
10 ms |
2900 KB |
Output is correct |
156 |
Correct |
24 ms |
4540 KB |
Output is correct |
157 |
Correct |
32 ms |
3568 KB |
Output is correct |
158 |
Correct |
23 ms |
3796 KB |
Output is correct |
159 |
Correct |
29 ms |
3508 KB |
Output is correct |
160 |
Correct |
25 ms |
3464 KB |
Output is correct |
161 |
Correct |
10 ms |
3924 KB |
Output is correct |
162 |
Correct |
7 ms |
3456 KB |
Output is correct |
163 |
Correct |
6 ms |
3412 KB |
Output is correct |
164 |
Correct |
15 ms |
9864 KB |
Output is correct |
165 |
Correct |
17 ms |
9824 KB |
Output is correct |
166 |
Correct |
18 ms |
6572 KB |
Output is correct |
167 |
Correct |
21 ms |
3664 KB |
Output is correct |
168 |
Correct |
21 ms |
3572 KB |
Output is correct |
169 |
Correct |
20 ms |
3540 KB |
Output is correct |
170 |
Correct |
22 ms |
3668 KB |
Output is correct |
171 |
Correct |
33 ms |
3572 KB |
Output is correct |
172 |
Correct |
30 ms |
3496 KB |
Output is correct |
173 |
Correct |
24 ms |
3508 KB |
Output is correct |
174 |
Correct |
44 ms |
4948 KB |
Output is correct |
175 |
Correct |
67 ms |
7528 KB |
Output is correct |
176 |
Correct |
115 ms |
26856 KB |
Output is correct |
177 |
Correct |
179 ms |
22904 KB |
Output is correct |
178 |
Correct |
283 ms |
28808 KB |
Output is correct |
179 |
Correct |
209 ms |
32600 KB |
Output is correct |
180 |
Correct |
220 ms |
30800 KB |
Output is correct |
181 |
Correct |
264 ms |
32240 KB |
Output is correct |
182 |
Correct |
226 ms |
32548 KB |
Output is correct |
183 |
Correct |
244 ms |
34084 KB |
Output is correct |
184 |
Correct |
641 ms |
62464 KB |
Output is correct |
185 |
Correct |
273 ms |
36104 KB |
Output is correct |
186 |
Correct |
412 ms |
57660 KB |
Output is correct |
187 |
Correct |
533 ms |
44408 KB |
Output is correct |
188 |
Correct |
548 ms |
79068 KB |
Output is correct |
189 |
Correct |
671 ms |
62536 KB |
Output is correct |
190 |
Correct |
543 ms |
62128 KB |
Output is correct |
191 |
Correct |
231 ms |
79572 KB |
Output is correct |
192 |
Correct |
109 ms |
59872 KB |
Output is correct |
193 |
Correct |
109 ms |
59980 KB |
Output is correct |
194 |
Correct |
293 ms |
188464 KB |
Output is correct |
195 |
Correct |
296 ms |
188464 KB |
Output is correct |
196 |
Correct |
414 ms |
61656 KB |
Output is correct |
197 |
Correct |
426 ms |
61248 KB |
Output is correct |
198 |
Correct |
430 ms |
61088 KB |
Output is correct |
199 |
Correct |
477 ms |
61284 KB |
Output is correct |
200 |
Correct |
703 ms |
60264 KB |
Output is correct |
201 |
Correct |
668 ms |
60032 KB |
Output is correct |
202 |
Correct |
646 ms |
59900 KB |
Output is correct |
203 |
Correct |
1248 ms |
118884 KB |
Output is correct |
204 |
Correct |
562 ms |
75228 KB |
Output is correct |
205 |
Correct |
854 ms |
73164 KB |
Output is correct |
206 |
Correct |
1054 ms |
125480 KB |
Output is correct |
207 |
Correct |
1156 ms |
124596 KB |
Output is correct |
208 |
Correct |
1401 ms |
118776 KB |
Output is correct |
209 |
Correct |
1323 ms |
118976 KB |
Output is correct |
210 |
Correct |
567 ms |
158316 KB |
Output is correct |
211 |
Correct |
216 ms |
118448 KB |
Output is correct |
212 |
Correct |
218 ms |
121780 KB |
Output is correct |
213 |
Correct |
617 ms |
379624 KB |
Output is correct |
214 |
Correct |
571 ms |
381724 KB |
Output is correct |
215 |
Correct |
808 ms |
125428 KB |
Output is correct |
216 |
Correct |
854 ms |
126520 KB |
Output is correct |
217 |
Correct |
875 ms |
121616 KB |
Output is correct |
218 |
Correct |
962 ms |
125120 KB |
Output is correct |
219 |
Correct |
901 ms |
152512 KB |
Output is correct |
220 |
Correct |
899 ms |
175456 KB |
Output is correct |
221 |
Correct |
985 ms |
194420 KB |
Output is correct |
222 |
Correct |
951 ms |
194396 KB |
Output is correct |
223 |
Correct |
1357 ms |
122268 KB |
Output is correct |
224 |
Correct |
1436 ms |
119156 KB |
Output is correct |
225 |
Correct |
1194 ms |
122704 KB |
Output is correct |