# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
875615 |
2023-11-20T07:53:39 Z |
hmm789 |
Maze (JOI23_ho_t3) |
C++14 |
|
2000 ms |
2097152 KB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define INF 1000000000000000000
#define MOD 998244353
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int r, c, n, sr, sc, gr, gc;
cin >> r >> c >> n >> sr >> sc >> gr >> gc;
sr--; sc--; gr--; gc--;
string s[r];
for(int i = 0; i < r; i++) cin >> s[i];
vector<pair<pair<int, int>, int>> adj[r][c];
int dx[4] = {-1, 0, 0, 1};
int dy[4] = {0, -1, 1, 0};
for(int i = 0; i < r; i++) {
for(int j = 0; j < c; j++) {
for(int k = 0; k < 4; k++) {
int nx = i+dx[k], ny = j+dy[k];
if(nx < 0 || nx >= r || ny < 0 || ny >= c) continue;
if(s[nx][ny] == '#') continue;
adj[i][j].push_back({{nx, ny}, 0});
}
for(int k = -(n-1); k <= n-1; k++) {
for(int l = 0; l < 4; l++) {
int nx = i+dx[l]*n+k*dy[l], ny = j+dy[l]*n+k*dx[l];
if(nx < 0 || nx >= r || ny < 0 || ny >= c) continue;
adj[i][j].push_back({{nx, ny}, 1});
}
}
}
}
for(int i = -n; i <= n; i++) {
for(int j = -n; j <= n; j++) {
if(abs(i*j) == n*n || i == 0 && j == 0) continue;
int nx = gr+i, ny = gc+j;
if(nx < 0 || nx >= r || ny < 0 || ny >= c) continue;
adj[nx][ny].push_back({{gr, gc}, 1});
}
}
deque<pair<int, pair<int, int>>> dq;
int dist[r][c];
memset(dist, -1, sizeof(dist));
dist[sr][sc] = 0;
dq.push_front({0, {sr, sc}});
while(!dq.empty()) {
pair<int, pair<int, int>> cur = dq.front();
dq.pop_front();
if(cur.first != dist[cur.second.first][cur.second.second]) continue;
for(auto it : adj[cur.second.first][cur.second.second]) {
if(dist[it.first.first][it.first.second] == -1 || dist[it.first.first][it.first.second] > cur.first+it.second) {
dist[it.first.first][it.first.second] = cur.first+it.second;
if(it.second == 0) dq.push_front({cur.first+it.second, it.first});
else dq.push_back({cur.first+it.second, it.first});
}
}
}
cout << dist[gr][gc];
}
Compilation message
Main.cpp: In function 'int32_t main()':
Main.cpp:37:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
37 | if(abs(i*j) == n*n || i == 0 && j == 0) continue;
| ~~~~~~~^~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
604 KB |
Output is correct |
5 |
Correct |
1 ms |
456 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
456 KB |
Output is correct |
17 |
Correct |
1 ms |
600 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
14 ms |
10220 KB |
Output is correct |
20 |
Correct |
9 ms |
4952 KB |
Output is correct |
21 |
Correct |
20 ms |
15196 KB |
Output is correct |
22 |
Correct |
19 ms |
13672 KB |
Output is correct |
23 |
Correct |
12 ms |
9228 KB |
Output is correct |
24 |
Correct |
14 ms |
8796 KB |
Output is correct |
25 |
Correct |
7 ms |
6236 KB |
Output is correct |
26 |
Correct |
21 ms |
14164 KB |
Output is correct |
27 |
Correct |
19 ms |
13960 KB |
Output is correct |
28 |
Correct |
16 ms |
9308 KB |
Output is correct |
29 |
Correct |
34 ms |
24896 KB |
Output is correct |
30 |
Correct |
15 ms |
11100 KB |
Output is correct |
31 |
Correct |
65 ms |
37680 KB |
Output is correct |
32 |
Correct |
52 ms |
33892 KB |
Output is correct |
33 |
Correct |
33 ms |
22188 KB |
Output is correct |
34 |
Correct |
26 ms |
21692 KB |
Output is correct |
35 |
Correct |
28 ms |
14788 KB |
Output is correct |
36 |
Correct |
76 ms |
35156 KB |
Output is correct |
37 |
Correct |
74 ms |
34204 KB |
Output is correct |
38 |
Correct |
35 ms |
22608 KB |
Output is correct |
39 |
Correct |
463 ms |
245332 KB |
Output is correct |
40 |
Correct |
56 ms |
38736 KB |
Output is correct |
41 |
Correct |
33 ms |
26336 KB |
Output is correct |
42 |
Correct |
79 ms |
40960 KB |
Output is correct |
43 |
Correct |
56 ms |
39252 KB |
Output is correct |
44 |
Correct |
251 ms |
169788 KB |
Output is correct |
45 |
Correct |
188 ms |
136096 KB |
Output is correct |
46 |
Correct |
526 ms |
372192 KB |
Output is correct |
47 |
Correct |
598 ms |
337132 KB |
Output is correct |
48 |
Correct |
471 ms |
220620 KB |
Output is correct |
49 |
Correct |
291 ms |
214516 KB |
Output is correct |
50 |
Correct |
180 ms |
145576 KB |
Output is correct |
51 |
Correct |
588 ms |
347476 KB |
Output is correct |
52 |
Correct |
625 ms |
337784 KB |
Output is correct |
53 |
Correct |
398 ms |
221524 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
408 KB |
Output is correct |
3 |
Correct |
1 ms |
464 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
604 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 |
604 KB |
Output is correct |
10 |
Correct |
1 ms |
604 KB |
Output is correct |
11 |
Correct |
1 ms |
604 KB |
Output is correct |
12 |
Correct |
1 ms |
604 KB |
Output is correct |
13 |
Correct |
2 ms |
604 KB |
Output is correct |
14 |
Correct |
2 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
856 KB |
Output is correct |
20 |
Correct |
1 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
860 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
344 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
856 KB |
Output is correct |
29 |
Correct |
1 ms |
344 KB |
Output is correct |
30 |
Correct |
1 ms |
604 KB |
Output is correct |
31 |
Correct |
1 ms |
604 KB |
Output is correct |
32 |
Correct |
1 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 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 |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
604 KB |
Output is correct |
8 |
Correct |
1 ms |
856 KB |
Output is correct |
9 |
Correct |
2 ms |
604 KB |
Output is correct |
10 |
Correct |
1 ms |
604 KB |
Output is correct |
11 |
Correct |
2 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 |
1 ms |
860 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
712 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 |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
1 ms |
604 KB |
Output is correct |
22 |
Correct |
1 ms |
600 KB |
Output is correct |
23 |
Correct |
1 ms |
448 KB |
Output is correct |
24 |
Correct |
7 ms |
5212 KB |
Output is correct |
25 |
Correct |
29 ms |
29416 KB |
Output is correct |
26 |
Correct |
64 ms |
76012 KB |
Output is correct |
27 |
Correct |
28 ms |
15196 KB |
Output is correct |
28 |
Correct |
240 ms |
18060 KB |
Output is correct |
29 |
Correct |
301 ms |
10752 KB |
Output is correct |
30 |
Correct |
230 ms |
7116 KB |
Output is correct |
31 |
Correct |
191 ms |
174776 KB |
Output is correct |
32 |
Correct |
30 ms |
14328 KB |
Output is correct |
33 |
Correct |
20 ms |
13916 KB |
Output is correct |
34 |
Correct |
1236 ms |
1246460 KB |
Output is correct |
35 |
Correct |
78 ms |
37588 KB |
Output is correct |
36 |
Correct |
903 ms |
37208 KB |
Output is correct |
37 |
Correct |
865 ms |
18780 KB |
Output is correct |
38 |
Correct |
833 ms |
10068 KB |
Output is correct |
39 |
Runtime error |
2000 ms |
2097152 KB |
Execution killed with signal 9 |
40 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
408 KB |
Output is correct |
3 |
Correct |
1 ms |
464 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
604 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 |
604 KB |
Output is correct |
10 |
Correct |
1 ms |
604 KB |
Output is correct |
11 |
Correct |
1 ms |
604 KB |
Output is correct |
12 |
Correct |
1 ms |
604 KB |
Output is correct |
13 |
Correct |
2 ms |
604 KB |
Output is correct |
14 |
Correct |
2 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
856 KB |
Output is correct |
20 |
Correct |
1 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
860 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
344 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
856 KB |
Output is correct |
29 |
Correct |
1 ms |
344 KB |
Output is correct |
30 |
Correct |
1 ms |
604 KB |
Output is correct |
31 |
Correct |
1 ms |
604 KB |
Output is correct |
32 |
Correct |
1 ms |
604 KB |
Output is correct |
33 |
Correct |
13 ms |
10084 KB |
Output is correct |
34 |
Correct |
4 ms |
5212 KB |
Output is correct |
35 |
Correct |
1 ms |
1120 KB |
Output is correct |
36 |
Correct |
29 ms |
29576 KB |
Output is correct |
37 |
Correct |
7 ms |
4964 KB |
Output is correct |
38 |
Correct |
95 ms |
75856 KB |
Output is correct |
39 |
Correct |
28 ms |
15212 KB |
Output is correct |
40 |
Correct |
19 ms |
13668 KB |
Output is correct |
41 |
Correct |
14 ms |
9060 KB |
Output is correct |
42 |
Correct |
269 ms |
17892 KB |
Output is correct |
43 |
Correct |
245 ms |
10968 KB |
Output is correct |
44 |
Correct |
266 ms |
7224 KB |
Output is correct |
45 |
Correct |
11 ms |
8804 KB |
Output is correct |
46 |
Correct |
12 ms |
6052 KB |
Output is correct |
47 |
Correct |
18 ms |
13408 KB |
Output is correct |
48 |
Correct |
86 ms |
55788 KB |
Output is correct |
49 |
Correct |
120 ms |
92628 KB |
Output is correct |
50 |
Correct |
162 ms |
179016 KB |
Output is correct |
51 |
Correct |
201 ms |
174928 KB |
Output is correct |
52 |
Correct |
20 ms |
14424 KB |
Output is correct |
53 |
Correct |
20 ms |
13912 KB |
Output is correct |
54 |
Correct |
12 ms |
9308 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
408 KB |
Output is correct |
3 |
Correct |
1 ms |
464 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
604 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 |
604 KB |
Output is correct |
10 |
Correct |
1 ms |
604 KB |
Output is correct |
11 |
Correct |
1 ms |
604 KB |
Output is correct |
12 |
Correct |
1 ms |
604 KB |
Output is correct |
13 |
Correct |
2 ms |
604 KB |
Output is correct |
14 |
Correct |
2 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
856 KB |
Output is correct |
20 |
Correct |
1 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
860 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
344 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
856 KB |
Output is correct |
29 |
Correct |
1 ms |
344 KB |
Output is correct |
30 |
Correct |
1 ms |
604 KB |
Output is correct |
31 |
Correct |
1 ms |
604 KB |
Output is correct |
32 |
Correct |
1 ms |
604 KB |
Output is correct |
33 |
Correct |
13 ms |
10084 KB |
Output is correct |
34 |
Correct |
4 ms |
5212 KB |
Output is correct |
35 |
Correct |
1 ms |
1120 KB |
Output is correct |
36 |
Correct |
29 ms |
29576 KB |
Output is correct |
37 |
Correct |
7 ms |
4964 KB |
Output is correct |
38 |
Correct |
95 ms |
75856 KB |
Output is correct |
39 |
Correct |
28 ms |
15212 KB |
Output is correct |
40 |
Correct |
19 ms |
13668 KB |
Output is correct |
41 |
Correct |
14 ms |
9060 KB |
Output is correct |
42 |
Correct |
269 ms |
17892 KB |
Output is correct |
43 |
Correct |
245 ms |
10968 KB |
Output is correct |
44 |
Correct |
266 ms |
7224 KB |
Output is correct |
45 |
Correct |
11 ms |
8804 KB |
Output is correct |
46 |
Correct |
12 ms |
6052 KB |
Output is correct |
47 |
Correct |
18 ms |
13408 KB |
Output is correct |
48 |
Correct |
86 ms |
55788 KB |
Output is correct |
49 |
Correct |
120 ms |
92628 KB |
Output is correct |
50 |
Correct |
162 ms |
179016 KB |
Output is correct |
51 |
Correct |
201 ms |
174928 KB |
Output is correct |
52 |
Correct |
20 ms |
14424 KB |
Output is correct |
53 |
Correct |
20 ms |
13912 KB |
Output is correct |
54 |
Correct |
12 ms |
9308 KB |
Output is correct |
55 |
Correct |
35 ms |
24704 KB |
Output is correct |
56 |
Correct |
15 ms |
11360 KB |
Output is correct |
57 |
Correct |
1027 ms |
1246496 KB |
Output is correct |
58 |
Correct |
130 ms |
89168 KB |
Output is correct |
59 |
Correct |
58 ms |
37500 KB |
Output is correct |
60 |
Correct |
53 ms |
34044 KB |
Output is correct |
61 |
Correct |
33 ms |
22364 KB |
Output is correct |
62 |
Correct |
900 ms |
37316 KB |
Output is correct |
63 |
Correct |
912 ms |
19012 KB |
Output is correct |
64 |
Correct |
976 ms |
10288 KB |
Output is correct |
65 |
Correct |
26 ms |
21724 KB |
Output is correct |
66 |
Correct |
18 ms |
14820 KB |
Output is correct |
67 |
Correct |
57 ms |
32840 KB |
Output is correct |
68 |
Correct |
251 ms |
232368 KB |
Output is correct |
69 |
Correct |
412 ms |
455460 KB |
Output is correct |
70 |
Correct |
487 ms |
450400 KB |
Output is correct |
71 |
Correct |
812 ms |
867308 KB |
Output is correct |
72 |
Correct |
63 ms |
35256 KB |
Output is correct |
73 |
Correct |
55 ms |
34128 KB |
Output is correct |
74 |
Correct |
37 ms |
22620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
604 KB |
Output is correct |
5 |
Correct |
1 ms |
456 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
456 KB |
Output is correct |
17 |
Correct |
1 ms |
600 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
14 ms |
10220 KB |
Output is correct |
20 |
Correct |
9 ms |
4952 KB |
Output is correct |
21 |
Correct |
20 ms |
15196 KB |
Output is correct |
22 |
Correct |
19 ms |
13672 KB |
Output is correct |
23 |
Correct |
12 ms |
9228 KB |
Output is correct |
24 |
Correct |
14 ms |
8796 KB |
Output is correct |
25 |
Correct |
7 ms |
6236 KB |
Output is correct |
26 |
Correct |
21 ms |
14164 KB |
Output is correct |
27 |
Correct |
19 ms |
13960 KB |
Output is correct |
28 |
Correct |
16 ms |
9308 KB |
Output is correct |
29 |
Correct |
34 ms |
24896 KB |
Output is correct |
30 |
Correct |
15 ms |
11100 KB |
Output is correct |
31 |
Correct |
65 ms |
37680 KB |
Output is correct |
32 |
Correct |
52 ms |
33892 KB |
Output is correct |
33 |
Correct |
33 ms |
22188 KB |
Output is correct |
34 |
Correct |
26 ms |
21692 KB |
Output is correct |
35 |
Correct |
28 ms |
14788 KB |
Output is correct |
36 |
Correct |
76 ms |
35156 KB |
Output is correct |
37 |
Correct |
74 ms |
34204 KB |
Output is correct |
38 |
Correct |
35 ms |
22608 KB |
Output is correct |
39 |
Correct |
463 ms |
245332 KB |
Output is correct |
40 |
Correct |
56 ms |
38736 KB |
Output is correct |
41 |
Correct |
33 ms |
26336 KB |
Output is correct |
42 |
Correct |
79 ms |
40960 KB |
Output is correct |
43 |
Correct |
56 ms |
39252 KB |
Output is correct |
44 |
Correct |
251 ms |
169788 KB |
Output is correct |
45 |
Correct |
188 ms |
136096 KB |
Output is correct |
46 |
Correct |
526 ms |
372192 KB |
Output is correct |
47 |
Correct |
598 ms |
337132 KB |
Output is correct |
48 |
Correct |
471 ms |
220620 KB |
Output is correct |
49 |
Correct |
291 ms |
214516 KB |
Output is correct |
50 |
Correct |
180 ms |
145576 KB |
Output is correct |
51 |
Correct |
588 ms |
347476 KB |
Output is correct |
52 |
Correct |
625 ms |
337784 KB |
Output is correct |
53 |
Correct |
398 ms |
221524 KB |
Output is correct |
54 |
Correct |
1 ms |
344 KB |
Output is correct |
55 |
Correct |
1 ms |
408 KB |
Output is correct |
56 |
Correct |
1 ms |
464 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
604 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
1 ms |
348 KB |
Output is correct |
62 |
Correct |
1 ms |
604 KB |
Output is correct |
63 |
Correct |
1 ms |
604 KB |
Output is correct |
64 |
Correct |
1 ms |
604 KB |
Output is correct |
65 |
Correct |
1 ms |
604 KB |
Output is correct |
66 |
Correct |
2 ms |
604 KB |
Output is correct |
67 |
Correct |
2 ms |
348 KB |
Output is correct |
68 |
Correct |
1 ms |
348 KB |
Output is correct |
69 |
Correct |
1 ms |
348 KB |
Output is correct |
70 |
Correct |
1 ms |
604 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
1 ms |
856 KB |
Output is correct |
73 |
Correct |
1 ms |
344 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
1 ms |
860 KB |
Output is correct |
76 |
Correct |
0 ms |
348 KB |
Output is correct |
77 |
Correct |
0 ms |
348 KB |
Output is correct |
78 |
Correct |
0 ms |
344 KB |
Output is correct |
79 |
Correct |
0 ms |
348 KB |
Output is correct |
80 |
Correct |
0 ms |
348 KB |
Output is correct |
81 |
Correct |
1 ms |
856 KB |
Output is correct |
82 |
Correct |
1 ms |
344 KB |
Output is correct |
83 |
Correct |
1 ms |
604 KB |
Output is correct |
84 |
Correct |
1 ms |
604 KB |
Output is correct |
85 |
Correct |
1 ms |
604 KB |
Output is correct |
86 |
Correct |
0 ms |
348 KB |
Output is correct |
87 |
Correct |
0 ms |
348 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
1 ms |
348 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
856 KB |
Output is correct |
94 |
Correct |
2 ms |
604 KB |
Output is correct |
95 |
Correct |
1 ms |
604 KB |
Output is correct |
96 |
Correct |
2 ms |
348 KB |
Output is correct |
97 |
Correct |
1 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
1 ms |
860 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
1 ms |
712 KB |
Output is correct |
102 |
Correct |
1 ms |
348 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
0 ms |
344 KB |
Output is correct |
105 |
Correct |
0 ms |
348 KB |
Output is correct |
106 |
Correct |
1 ms |
604 KB |
Output is correct |
107 |
Correct |
1 ms |
600 KB |
Output is correct |
108 |
Correct |
1 ms |
448 KB |
Output is correct |
109 |
Correct |
7 ms |
5212 KB |
Output is correct |
110 |
Correct |
29 ms |
29416 KB |
Output is correct |
111 |
Correct |
64 ms |
76012 KB |
Output is correct |
112 |
Correct |
28 ms |
15196 KB |
Output is correct |
113 |
Correct |
240 ms |
18060 KB |
Output is correct |
114 |
Correct |
301 ms |
10752 KB |
Output is correct |
115 |
Correct |
230 ms |
7116 KB |
Output is correct |
116 |
Correct |
191 ms |
174776 KB |
Output is correct |
117 |
Correct |
30 ms |
14328 KB |
Output is correct |
118 |
Correct |
20 ms |
13916 KB |
Output is correct |
119 |
Correct |
1236 ms |
1246460 KB |
Output is correct |
120 |
Correct |
78 ms |
37588 KB |
Output is correct |
121 |
Correct |
903 ms |
37208 KB |
Output is correct |
122 |
Correct |
865 ms |
18780 KB |
Output is correct |
123 |
Correct |
833 ms |
10068 KB |
Output is correct |
124 |
Runtime error |
2000 ms |
2097152 KB |
Execution killed with signal 9 |
125 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
604 KB |
Output is correct |
5 |
Correct |
1 ms |
456 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
456 KB |
Output is correct |
17 |
Correct |
1 ms |
600 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
14 ms |
10220 KB |
Output is correct |
20 |
Correct |
9 ms |
4952 KB |
Output is correct |
21 |
Correct |
20 ms |
15196 KB |
Output is correct |
22 |
Correct |
19 ms |
13672 KB |
Output is correct |
23 |
Correct |
12 ms |
9228 KB |
Output is correct |
24 |
Correct |
14 ms |
8796 KB |
Output is correct |
25 |
Correct |
7 ms |
6236 KB |
Output is correct |
26 |
Correct |
21 ms |
14164 KB |
Output is correct |
27 |
Correct |
19 ms |
13960 KB |
Output is correct |
28 |
Correct |
16 ms |
9308 KB |
Output is correct |
29 |
Correct |
34 ms |
24896 KB |
Output is correct |
30 |
Correct |
15 ms |
11100 KB |
Output is correct |
31 |
Correct |
65 ms |
37680 KB |
Output is correct |
32 |
Correct |
52 ms |
33892 KB |
Output is correct |
33 |
Correct |
33 ms |
22188 KB |
Output is correct |
34 |
Correct |
26 ms |
21692 KB |
Output is correct |
35 |
Correct |
28 ms |
14788 KB |
Output is correct |
36 |
Correct |
76 ms |
35156 KB |
Output is correct |
37 |
Correct |
74 ms |
34204 KB |
Output is correct |
38 |
Correct |
35 ms |
22608 KB |
Output is correct |
39 |
Correct |
463 ms |
245332 KB |
Output is correct |
40 |
Correct |
56 ms |
38736 KB |
Output is correct |
41 |
Correct |
33 ms |
26336 KB |
Output is correct |
42 |
Correct |
79 ms |
40960 KB |
Output is correct |
43 |
Correct |
56 ms |
39252 KB |
Output is correct |
44 |
Correct |
251 ms |
169788 KB |
Output is correct |
45 |
Correct |
188 ms |
136096 KB |
Output is correct |
46 |
Correct |
526 ms |
372192 KB |
Output is correct |
47 |
Correct |
598 ms |
337132 KB |
Output is correct |
48 |
Correct |
471 ms |
220620 KB |
Output is correct |
49 |
Correct |
291 ms |
214516 KB |
Output is correct |
50 |
Correct |
180 ms |
145576 KB |
Output is correct |
51 |
Correct |
588 ms |
347476 KB |
Output is correct |
52 |
Correct |
625 ms |
337784 KB |
Output is correct |
53 |
Correct |
398 ms |
221524 KB |
Output is correct |
54 |
Correct |
1 ms |
344 KB |
Output is correct |
55 |
Correct |
1 ms |
408 KB |
Output is correct |
56 |
Correct |
1 ms |
464 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
604 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
1 ms |
348 KB |
Output is correct |
62 |
Correct |
1 ms |
604 KB |
Output is correct |
63 |
Correct |
1 ms |
604 KB |
Output is correct |
64 |
Correct |
1 ms |
604 KB |
Output is correct |
65 |
Correct |
1 ms |
604 KB |
Output is correct |
66 |
Correct |
2 ms |
604 KB |
Output is correct |
67 |
Correct |
2 ms |
348 KB |
Output is correct |
68 |
Correct |
1 ms |
348 KB |
Output is correct |
69 |
Correct |
1 ms |
348 KB |
Output is correct |
70 |
Correct |
1 ms |
604 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
1 ms |
856 KB |
Output is correct |
73 |
Correct |
1 ms |
344 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
1 ms |
860 KB |
Output is correct |
76 |
Correct |
0 ms |
348 KB |
Output is correct |
77 |
Correct |
0 ms |
348 KB |
Output is correct |
78 |
Correct |
0 ms |
344 KB |
Output is correct |
79 |
Correct |
0 ms |
348 KB |
Output is correct |
80 |
Correct |
0 ms |
348 KB |
Output is correct |
81 |
Correct |
1 ms |
856 KB |
Output is correct |
82 |
Correct |
1 ms |
344 KB |
Output is correct |
83 |
Correct |
1 ms |
604 KB |
Output is correct |
84 |
Correct |
1 ms |
604 KB |
Output is correct |
85 |
Correct |
1 ms |
604 KB |
Output is correct |
86 |
Correct |
0 ms |
348 KB |
Output is correct |
87 |
Correct |
0 ms |
348 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
1 ms |
348 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
856 KB |
Output is correct |
94 |
Correct |
2 ms |
604 KB |
Output is correct |
95 |
Correct |
1 ms |
604 KB |
Output is correct |
96 |
Correct |
2 ms |
348 KB |
Output is correct |
97 |
Correct |
1 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
1 ms |
860 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
1 ms |
712 KB |
Output is correct |
102 |
Correct |
1 ms |
348 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
0 ms |
344 KB |
Output is correct |
105 |
Correct |
0 ms |
348 KB |
Output is correct |
106 |
Correct |
1 ms |
604 KB |
Output is correct |
107 |
Correct |
1 ms |
600 KB |
Output is correct |
108 |
Correct |
1 ms |
448 KB |
Output is correct |
109 |
Correct |
7 ms |
5212 KB |
Output is correct |
110 |
Correct |
29 ms |
29416 KB |
Output is correct |
111 |
Correct |
64 ms |
76012 KB |
Output is correct |
112 |
Correct |
28 ms |
15196 KB |
Output is correct |
113 |
Correct |
240 ms |
18060 KB |
Output is correct |
114 |
Correct |
301 ms |
10752 KB |
Output is correct |
115 |
Correct |
230 ms |
7116 KB |
Output is correct |
116 |
Correct |
191 ms |
174776 KB |
Output is correct |
117 |
Correct |
30 ms |
14328 KB |
Output is correct |
118 |
Correct |
20 ms |
13916 KB |
Output is correct |
119 |
Correct |
1236 ms |
1246460 KB |
Output is correct |
120 |
Correct |
78 ms |
37588 KB |
Output is correct |
121 |
Correct |
903 ms |
37208 KB |
Output is correct |
122 |
Correct |
865 ms |
18780 KB |
Output is correct |
123 |
Correct |
833 ms |
10068 KB |
Output is correct |
124 |
Runtime error |
2000 ms |
2097152 KB |
Execution killed with signal 9 |
125 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
604 KB |
Output is correct |
5 |
Correct |
1 ms |
456 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
456 KB |
Output is correct |
17 |
Correct |
1 ms |
600 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
14 ms |
10220 KB |
Output is correct |
20 |
Correct |
9 ms |
4952 KB |
Output is correct |
21 |
Correct |
20 ms |
15196 KB |
Output is correct |
22 |
Correct |
19 ms |
13672 KB |
Output is correct |
23 |
Correct |
12 ms |
9228 KB |
Output is correct |
24 |
Correct |
14 ms |
8796 KB |
Output is correct |
25 |
Correct |
7 ms |
6236 KB |
Output is correct |
26 |
Correct |
21 ms |
14164 KB |
Output is correct |
27 |
Correct |
19 ms |
13960 KB |
Output is correct |
28 |
Correct |
16 ms |
9308 KB |
Output is correct |
29 |
Correct |
34 ms |
24896 KB |
Output is correct |
30 |
Correct |
15 ms |
11100 KB |
Output is correct |
31 |
Correct |
65 ms |
37680 KB |
Output is correct |
32 |
Correct |
52 ms |
33892 KB |
Output is correct |
33 |
Correct |
33 ms |
22188 KB |
Output is correct |
34 |
Correct |
26 ms |
21692 KB |
Output is correct |
35 |
Correct |
28 ms |
14788 KB |
Output is correct |
36 |
Correct |
76 ms |
35156 KB |
Output is correct |
37 |
Correct |
74 ms |
34204 KB |
Output is correct |
38 |
Correct |
35 ms |
22608 KB |
Output is correct |
39 |
Correct |
463 ms |
245332 KB |
Output is correct |
40 |
Correct |
56 ms |
38736 KB |
Output is correct |
41 |
Correct |
33 ms |
26336 KB |
Output is correct |
42 |
Correct |
79 ms |
40960 KB |
Output is correct |
43 |
Correct |
56 ms |
39252 KB |
Output is correct |
44 |
Correct |
251 ms |
169788 KB |
Output is correct |
45 |
Correct |
188 ms |
136096 KB |
Output is correct |
46 |
Correct |
526 ms |
372192 KB |
Output is correct |
47 |
Correct |
598 ms |
337132 KB |
Output is correct |
48 |
Correct |
471 ms |
220620 KB |
Output is correct |
49 |
Correct |
291 ms |
214516 KB |
Output is correct |
50 |
Correct |
180 ms |
145576 KB |
Output is correct |
51 |
Correct |
588 ms |
347476 KB |
Output is correct |
52 |
Correct |
625 ms |
337784 KB |
Output is correct |
53 |
Correct |
398 ms |
221524 KB |
Output is correct |
54 |
Correct |
1 ms |
344 KB |
Output is correct |
55 |
Correct |
1 ms |
408 KB |
Output is correct |
56 |
Correct |
1 ms |
464 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
604 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
1 ms |
348 KB |
Output is correct |
62 |
Correct |
1 ms |
604 KB |
Output is correct |
63 |
Correct |
1 ms |
604 KB |
Output is correct |
64 |
Correct |
1 ms |
604 KB |
Output is correct |
65 |
Correct |
1 ms |
604 KB |
Output is correct |
66 |
Correct |
2 ms |
604 KB |
Output is correct |
67 |
Correct |
2 ms |
348 KB |
Output is correct |
68 |
Correct |
1 ms |
348 KB |
Output is correct |
69 |
Correct |
1 ms |
348 KB |
Output is correct |
70 |
Correct |
1 ms |
604 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
1 ms |
856 KB |
Output is correct |
73 |
Correct |
1 ms |
344 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
1 ms |
860 KB |
Output is correct |
76 |
Correct |
0 ms |
348 KB |
Output is correct |
77 |
Correct |
0 ms |
348 KB |
Output is correct |
78 |
Correct |
0 ms |
344 KB |
Output is correct |
79 |
Correct |
0 ms |
348 KB |
Output is correct |
80 |
Correct |
0 ms |
348 KB |
Output is correct |
81 |
Correct |
1 ms |
856 KB |
Output is correct |
82 |
Correct |
1 ms |
344 KB |
Output is correct |
83 |
Correct |
1 ms |
604 KB |
Output is correct |
84 |
Correct |
1 ms |
604 KB |
Output is correct |
85 |
Correct |
1 ms |
604 KB |
Output is correct |
86 |
Correct |
0 ms |
348 KB |
Output is correct |
87 |
Correct |
0 ms |
348 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
1 ms |
348 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
1 ms |
604 KB |
Output is correct |
93 |
Correct |
1 ms |
856 KB |
Output is correct |
94 |
Correct |
2 ms |
604 KB |
Output is correct |
95 |
Correct |
1 ms |
604 KB |
Output is correct |
96 |
Correct |
2 ms |
348 KB |
Output is correct |
97 |
Correct |
1 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
1 ms |
860 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
1 ms |
712 KB |
Output is correct |
102 |
Correct |
1 ms |
348 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
0 ms |
344 KB |
Output is correct |
105 |
Correct |
0 ms |
348 KB |
Output is correct |
106 |
Correct |
1 ms |
604 KB |
Output is correct |
107 |
Correct |
1 ms |
600 KB |
Output is correct |
108 |
Correct |
1 ms |
448 KB |
Output is correct |
109 |
Correct |
7 ms |
5212 KB |
Output is correct |
110 |
Correct |
29 ms |
29416 KB |
Output is correct |
111 |
Correct |
64 ms |
76012 KB |
Output is correct |
112 |
Correct |
28 ms |
15196 KB |
Output is correct |
113 |
Correct |
240 ms |
18060 KB |
Output is correct |
114 |
Correct |
301 ms |
10752 KB |
Output is correct |
115 |
Correct |
230 ms |
7116 KB |
Output is correct |
116 |
Correct |
191 ms |
174776 KB |
Output is correct |
117 |
Correct |
30 ms |
14328 KB |
Output is correct |
118 |
Correct |
20 ms |
13916 KB |
Output is correct |
119 |
Correct |
1236 ms |
1246460 KB |
Output is correct |
120 |
Correct |
78 ms |
37588 KB |
Output is correct |
121 |
Correct |
903 ms |
37208 KB |
Output is correct |
122 |
Correct |
865 ms |
18780 KB |
Output is correct |
123 |
Correct |
833 ms |
10068 KB |
Output is correct |
124 |
Runtime error |
2000 ms |
2097152 KB |
Execution killed with signal 9 |
125 |
Halted |
0 ms |
0 KB |
- |