# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1061650 |
2024-08-16T11:26:51 Z |
beaconmc |
Maze (JOI23_ho_t3) |
C++14 |
|
2000 ms |
68168 KB |
#include <bits/stdc++.h>
typedef int ll;
#define FOR(i,x,y) for(ll i=x; i<y; i++)
#define FORNEG(i,x,y) for(ll i=x; i>y; i--)
using namespace std;
ll r,c,n;
vector<vector<ll>> grid;
vector<vector<ll>> visited;
bool iswithin(ll a, ll b, ll x, ll y){
ll A = abs(x-a), B = abs(y-b);
if ((A<=n && B < n) ||(A<n && B <= n)){
return 1;
}
return 0;
}
vector<array<ll,2>> getvalid(ll a, ll b){
vector<array<ll,2>> ans;
FOR(i,-(n-1), n){
ans.push_back({a-n, b+i});
ans.push_back({a+n, b+i});
ans.push_back({a+i, b-n});
ans.push_back({a+i, b+n});
}
vector<array<ll,2>> realans;
for (auto&i : ans){
if (0<=i[0] && i[0]<r && 0<=i[1] && i[1]<c) realans.push_back(i);
}
return realans;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> r >> c >> n;
ll a,b;
ll x,y;
cin >> a >> b >> x >> y;
a--;b--;x--;y--;
FOR(i,0,r){
vector<ll> temp;
vector<ll> idk;
string temp2;
cin >> temp2;
FOR(j,0,c){
temp.push_back(temp2[j]);
idk.push_back(100000000);
}
grid.push_back(temp);
visited.push_back(idk);
}
ll ans = -1;
deque<vector<ll>> sus;
sus.push_back({a,b,0});
visited[a][b] = 0;
while (sus.size()){
vector<ll> node = sus.front();
sus.pop_front();
if (visited[node[0]][node[1]] != node[2]) continue;
if (node[0] == x && node[1] == y){
ans = node[2];
break;
}
if (iswithin(node[0],node[1],x,y)){
if (visited[x][y]> node[2]+1){
visited[x][y] = node[2]+1;
sus.push_back({x,y,node[2]+1});
}
}
vector<array<ll,2>> pos = {{node[0]-1,node[1]},{node[0]+1,node[1]},{node[0],node[1]-1},{node[0],node[1]+1}};
vector<array<ll,2>> temp = getvalid(node[0], node[1]);
for (auto&i : pos){
if (0<=i[0] && i[0]<r && 0<=i[1] && i[1]<c){
if (grid[i[0]][i[1]] == '.'){
if (visited[i[0]][i[1]] > node[2]){
visited[i[0]][i[1]] = node[2];
sus.push_front({i[0], i[1], node[2]});
}
}
}
}
for (auto&i : temp){
if (visited[i[0]][i[1]] > node[2]+1){
visited[i[0]][i[1]] = node[2]+1;
sus.push_back({i[0], i[1], node[2]+1});
}
}
}
cout << ans << endl;
}
# |
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 |
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 |
1 ms |
468 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 |
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 |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
17 ms |
860 KB |
Output is correct |
20 |
Correct |
6 ms |
1320 KB |
Output is correct |
21 |
Correct |
18 ms |
2652 KB |
Output is correct |
22 |
Correct |
10 ms |
860 KB |
Output is correct |
23 |
Correct |
15 ms |
860 KB |
Output is correct |
24 |
Correct |
8 ms |
1576 KB |
Output is correct |
25 |
Correct |
7 ms |
1576 KB |
Output is correct |
26 |
Correct |
2 ms |
860 KB |
Output is correct |
27 |
Correct |
1 ms |
860 KB |
Output is correct |
28 |
Correct |
6 ms |
860 KB |
Output is correct |
29 |
Correct |
37 ms |
1716 KB |
Output is correct |
30 |
Correct |
15 ms |
1384 KB |
Output is correct |
31 |
Correct |
31 ms |
3828 KB |
Output is correct |
32 |
Correct |
40 ms |
1624 KB |
Output is correct |
33 |
Correct |
25 ms |
1624 KB |
Output is correct |
34 |
Correct |
36 ms |
3156 KB |
Output is correct |
35 |
Correct |
35 ms |
3152 KB |
Output is correct |
36 |
Correct |
17 ms |
1884 KB |
Output is correct |
37 |
Correct |
33 ms |
1884 KB |
Output is correct |
38 |
Correct |
3 ms |
1628 KB |
Output is correct |
39 |
Correct |
352 ms |
16036 KB |
Output is correct |
40 |
Correct |
13 ms |
1880 KB |
Output is correct |
41 |
Correct |
15 ms |
3668 KB |
Output is correct |
42 |
Correct |
46 ms |
2396 KB |
Output is correct |
43 |
Correct |
36 ms |
3800 KB |
Output is correct |
44 |
Correct |
56 ms |
7800 KB |
Output is correct |
45 |
Correct |
59 ms |
8812 KB |
Output is correct |
46 |
Correct |
276 ms |
31712 KB |
Output is correct |
47 |
Correct |
351 ms |
15952 KB |
Output is correct |
48 |
Correct |
351 ms |
16048 KB |
Output is correct |
49 |
Correct |
190 ms |
28136 KB |
Output is correct |
50 |
Correct |
146 ms |
29160 KB |
Output is correct |
51 |
Correct |
232 ms |
15960 KB |
Output is correct |
52 |
Correct |
186 ms |
15964 KB |
Output is correct |
53 |
Correct |
260 ms |
15964 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 |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
504 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 |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
2 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 |
1 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 |
1 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 |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
344 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
376 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
344 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
2 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
504 KB |
Output is correct |
12 |
Correct |
0 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 |
0 ms |
420 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
344 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
3 ms |
604 KB |
Output is correct |
26 |
Correct |
41 ms |
3996 KB |
Output is correct |
27 |
Correct |
18 ms |
2648 KB |
Output is correct |
28 |
Correct |
286 ms |
2108 KB |
Output is correct |
29 |
Correct |
2 ms |
856 KB |
Output is correct |
30 |
Correct |
1 ms |
860 KB |
Output is correct |
31 |
Correct |
87 ms |
1264 KB |
Output is correct |
32 |
Correct |
1 ms |
856 KB |
Output is correct |
33 |
Correct |
3 ms |
1008 KB |
Output is correct |
34 |
Correct |
13 ms |
3932 KB |
Output is correct |
35 |
Correct |
16 ms |
3764 KB |
Output is correct |
36 |
Correct |
702 ms |
3412 KB |
Output is correct |
37 |
Correct |
2 ms |
1880 KB |
Output is correct |
38 |
Correct |
1 ms |
1628 KB |
Output is correct |
39 |
Correct |
719 ms |
30888 KB |
Output is correct |
40 |
Execution timed out |
2084 ms |
68168 KB |
Time limit exceeded |
41 |
Halted |
0 ms |
0 KB |
- |
# |
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 |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
504 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 |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
2 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 |
1 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 |
1 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 |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
344 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
14 ms |
860 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
2 ms |
348 KB |
Output is correct |
36 |
Correct |
5 ms |
820 KB |
Output is correct |
37 |
Correct |
7 ms |
1320 KB |
Output is correct |
38 |
Correct |
27 ms |
4080 KB |
Output is correct |
39 |
Correct |
13 ms |
2652 KB |
Output is correct |
40 |
Correct |
16 ms |
1020 KB |
Output is correct |
41 |
Correct |
13 ms |
856 KB |
Output is correct |
42 |
Correct |
302 ms |
1940 KB |
Output is correct |
43 |
Correct |
2 ms |
860 KB |
Output is correct |
44 |
Correct |
1 ms |
860 KB |
Output is correct |
45 |
Correct |
8 ms |
1576 KB |
Output is correct |
46 |
Correct |
7 ms |
1576 KB |
Output is correct |
47 |
Correct |
13 ms |
1360 KB |
Output is correct |
48 |
Correct |
54 ms |
972 KB |
Output is correct |
49 |
Correct |
61 ms |
1052 KB |
Output is correct |
50 |
Correct |
193 ms |
1116 KB |
Output is correct |
51 |
Correct |
95 ms |
1136 KB |
Output is correct |
52 |
Correct |
2 ms |
860 KB |
Output is correct |
53 |
Correct |
2 ms |
860 KB |
Output is correct |
54 |
Correct |
6 ms |
860 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 |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
504 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 |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
2 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 |
1 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 |
1 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 |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
344 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
14 ms |
860 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
2 ms |
348 KB |
Output is correct |
36 |
Correct |
5 ms |
820 KB |
Output is correct |
37 |
Correct |
7 ms |
1320 KB |
Output is correct |
38 |
Correct |
27 ms |
4080 KB |
Output is correct |
39 |
Correct |
13 ms |
2652 KB |
Output is correct |
40 |
Correct |
16 ms |
1020 KB |
Output is correct |
41 |
Correct |
13 ms |
856 KB |
Output is correct |
42 |
Correct |
302 ms |
1940 KB |
Output is correct |
43 |
Correct |
2 ms |
860 KB |
Output is correct |
44 |
Correct |
1 ms |
860 KB |
Output is correct |
45 |
Correct |
8 ms |
1576 KB |
Output is correct |
46 |
Correct |
7 ms |
1576 KB |
Output is correct |
47 |
Correct |
13 ms |
1360 KB |
Output is correct |
48 |
Correct |
54 ms |
972 KB |
Output is correct |
49 |
Correct |
61 ms |
1052 KB |
Output is correct |
50 |
Correct |
193 ms |
1116 KB |
Output is correct |
51 |
Correct |
95 ms |
1136 KB |
Output is correct |
52 |
Correct |
2 ms |
860 KB |
Output is correct |
53 |
Correct |
2 ms |
860 KB |
Output is correct |
54 |
Correct |
6 ms |
860 KB |
Output is correct |
55 |
Correct |
44 ms |
1628 KB |
Output is correct |
56 |
Correct |
8 ms |
1252 KB |
Output is correct |
57 |
Correct |
8 ms |
3932 KB |
Output is correct |
58 |
Correct |
46 ms |
1624 KB |
Output is correct |
59 |
Correct |
15 ms |
3888 KB |
Output is correct |
60 |
Correct |
30 ms |
1624 KB |
Output is correct |
61 |
Correct |
32 ms |
1716 KB |
Output is correct |
62 |
Correct |
731 ms |
3412 KB |
Output is correct |
63 |
Correct |
3 ms |
1624 KB |
Output is correct |
64 |
Correct |
2 ms |
1628 KB |
Output is correct |
65 |
Correct |
34 ms |
3156 KB |
Output is correct |
66 |
Correct |
21 ms |
3156 KB |
Output is correct |
67 |
Correct |
74 ms |
2624 KB |
Output is correct |
68 |
Correct |
263 ms |
1628 KB |
Output is correct |
69 |
Correct |
361 ms |
1880 KB |
Output is correct |
70 |
Correct |
634 ms |
2084 KB |
Output is correct |
71 |
Correct |
743 ms |
3044 KB |
Output is correct |
72 |
Correct |
16 ms |
1884 KB |
Output is correct |
73 |
Correct |
29 ms |
1884 KB |
Output is correct |
74 |
Correct |
3 ms |
1628 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 |
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 |
1 ms |
468 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 |
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 |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
17 ms |
860 KB |
Output is correct |
20 |
Correct |
6 ms |
1320 KB |
Output is correct |
21 |
Correct |
18 ms |
2652 KB |
Output is correct |
22 |
Correct |
10 ms |
860 KB |
Output is correct |
23 |
Correct |
15 ms |
860 KB |
Output is correct |
24 |
Correct |
8 ms |
1576 KB |
Output is correct |
25 |
Correct |
7 ms |
1576 KB |
Output is correct |
26 |
Correct |
2 ms |
860 KB |
Output is correct |
27 |
Correct |
1 ms |
860 KB |
Output is correct |
28 |
Correct |
6 ms |
860 KB |
Output is correct |
29 |
Correct |
37 ms |
1716 KB |
Output is correct |
30 |
Correct |
15 ms |
1384 KB |
Output is correct |
31 |
Correct |
31 ms |
3828 KB |
Output is correct |
32 |
Correct |
40 ms |
1624 KB |
Output is correct |
33 |
Correct |
25 ms |
1624 KB |
Output is correct |
34 |
Correct |
36 ms |
3156 KB |
Output is correct |
35 |
Correct |
35 ms |
3152 KB |
Output is correct |
36 |
Correct |
17 ms |
1884 KB |
Output is correct |
37 |
Correct |
33 ms |
1884 KB |
Output is correct |
38 |
Correct |
3 ms |
1628 KB |
Output is correct |
39 |
Correct |
352 ms |
16036 KB |
Output is correct |
40 |
Correct |
13 ms |
1880 KB |
Output is correct |
41 |
Correct |
15 ms |
3668 KB |
Output is correct |
42 |
Correct |
46 ms |
2396 KB |
Output is correct |
43 |
Correct |
36 ms |
3800 KB |
Output is correct |
44 |
Correct |
56 ms |
7800 KB |
Output is correct |
45 |
Correct |
59 ms |
8812 KB |
Output is correct |
46 |
Correct |
276 ms |
31712 KB |
Output is correct |
47 |
Correct |
351 ms |
15952 KB |
Output is correct |
48 |
Correct |
351 ms |
16048 KB |
Output is correct |
49 |
Correct |
190 ms |
28136 KB |
Output is correct |
50 |
Correct |
146 ms |
29160 KB |
Output is correct |
51 |
Correct |
232 ms |
15960 KB |
Output is correct |
52 |
Correct |
186 ms |
15964 KB |
Output is correct |
53 |
Correct |
260 ms |
15964 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
348 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
504 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
0 ms |
348 KB |
Output is correct |
64 |
Correct |
1 ms |
348 KB |
Output is correct |
65 |
Correct |
2 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 |
1 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 |
1 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 |
348 KB |
Output is correct |
78 |
Correct |
0 ms |
348 KB |
Output is correct |
79 |
Correct |
0 ms |
348 KB |
Output is correct |
80 |
Correct |
0 ms |
344 KB |
Output is correct |
81 |
Correct |
0 ms |
348 KB |
Output is correct |
82 |
Correct |
0 ms |
344 KB |
Output is correct |
83 |
Correct |
1 ms |
348 KB |
Output is correct |
84 |
Correct |
1 ms |
348 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 |
1 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
376 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
1 ms |
344 KB |
Output is correct |
93 |
Correct |
1 ms |
348 KB |
Output is correct |
94 |
Correct |
2 ms |
348 KB |
Output is correct |
95 |
Correct |
1 ms |
348 KB |
Output is correct |
96 |
Correct |
1 ms |
504 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
1 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
0 ms |
420 KB |
Output is correct |
102 |
Correct |
0 ms |
348 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
1 ms |
348 KB |
Output is correct |
105 |
Correct |
0 ms |
348 KB |
Output is correct |
106 |
Correct |
0 ms |
348 KB |
Output is correct |
107 |
Correct |
1 ms |
344 KB |
Output is correct |
108 |
Correct |
0 ms |
348 KB |
Output is correct |
109 |
Correct |
1 ms |
348 KB |
Output is correct |
110 |
Correct |
3 ms |
604 KB |
Output is correct |
111 |
Correct |
41 ms |
3996 KB |
Output is correct |
112 |
Correct |
18 ms |
2648 KB |
Output is correct |
113 |
Correct |
286 ms |
2108 KB |
Output is correct |
114 |
Correct |
2 ms |
856 KB |
Output is correct |
115 |
Correct |
1 ms |
860 KB |
Output is correct |
116 |
Correct |
87 ms |
1264 KB |
Output is correct |
117 |
Correct |
1 ms |
856 KB |
Output is correct |
118 |
Correct |
3 ms |
1008 KB |
Output is correct |
119 |
Correct |
13 ms |
3932 KB |
Output is correct |
120 |
Correct |
16 ms |
3764 KB |
Output is correct |
121 |
Correct |
702 ms |
3412 KB |
Output is correct |
122 |
Correct |
2 ms |
1880 KB |
Output is correct |
123 |
Correct |
1 ms |
1628 KB |
Output is correct |
124 |
Correct |
719 ms |
30888 KB |
Output is correct |
125 |
Execution timed out |
2084 ms |
68168 KB |
Time limit exceeded |
126 |
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 |
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 |
1 ms |
468 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 |
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 |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
17 ms |
860 KB |
Output is correct |
20 |
Correct |
6 ms |
1320 KB |
Output is correct |
21 |
Correct |
18 ms |
2652 KB |
Output is correct |
22 |
Correct |
10 ms |
860 KB |
Output is correct |
23 |
Correct |
15 ms |
860 KB |
Output is correct |
24 |
Correct |
8 ms |
1576 KB |
Output is correct |
25 |
Correct |
7 ms |
1576 KB |
Output is correct |
26 |
Correct |
2 ms |
860 KB |
Output is correct |
27 |
Correct |
1 ms |
860 KB |
Output is correct |
28 |
Correct |
6 ms |
860 KB |
Output is correct |
29 |
Correct |
37 ms |
1716 KB |
Output is correct |
30 |
Correct |
15 ms |
1384 KB |
Output is correct |
31 |
Correct |
31 ms |
3828 KB |
Output is correct |
32 |
Correct |
40 ms |
1624 KB |
Output is correct |
33 |
Correct |
25 ms |
1624 KB |
Output is correct |
34 |
Correct |
36 ms |
3156 KB |
Output is correct |
35 |
Correct |
35 ms |
3152 KB |
Output is correct |
36 |
Correct |
17 ms |
1884 KB |
Output is correct |
37 |
Correct |
33 ms |
1884 KB |
Output is correct |
38 |
Correct |
3 ms |
1628 KB |
Output is correct |
39 |
Correct |
352 ms |
16036 KB |
Output is correct |
40 |
Correct |
13 ms |
1880 KB |
Output is correct |
41 |
Correct |
15 ms |
3668 KB |
Output is correct |
42 |
Correct |
46 ms |
2396 KB |
Output is correct |
43 |
Correct |
36 ms |
3800 KB |
Output is correct |
44 |
Correct |
56 ms |
7800 KB |
Output is correct |
45 |
Correct |
59 ms |
8812 KB |
Output is correct |
46 |
Correct |
276 ms |
31712 KB |
Output is correct |
47 |
Correct |
351 ms |
15952 KB |
Output is correct |
48 |
Correct |
351 ms |
16048 KB |
Output is correct |
49 |
Correct |
190 ms |
28136 KB |
Output is correct |
50 |
Correct |
146 ms |
29160 KB |
Output is correct |
51 |
Correct |
232 ms |
15960 KB |
Output is correct |
52 |
Correct |
186 ms |
15964 KB |
Output is correct |
53 |
Correct |
260 ms |
15964 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
348 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
504 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
0 ms |
348 KB |
Output is correct |
64 |
Correct |
1 ms |
348 KB |
Output is correct |
65 |
Correct |
2 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 |
1 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 |
1 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 |
348 KB |
Output is correct |
78 |
Correct |
0 ms |
348 KB |
Output is correct |
79 |
Correct |
0 ms |
348 KB |
Output is correct |
80 |
Correct |
0 ms |
344 KB |
Output is correct |
81 |
Correct |
0 ms |
348 KB |
Output is correct |
82 |
Correct |
0 ms |
344 KB |
Output is correct |
83 |
Correct |
1 ms |
348 KB |
Output is correct |
84 |
Correct |
1 ms |
348 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 |
1 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
376 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
1 ms |
344 KB |
Output is correct |
93 |
Correct |
1 ms |
348 KB |
Output is correct |
94 |
Correct |
2 ms |
348 KB |
Output is correct |
95 |
Correct |
1 ms |
348 KB |
Output is correct |
96 |
Correct |
1 ms |
504 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
1 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
0 ms |
420 KB |
Output is correct |
102 |
Correct |
0 ms |
348 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
1 ms |
348 KB |
Output is correct |
105 |
Correct |
0 ms |
348 KB |
Output is correct |
106 |
Correct |
0 ms |
348 KB |
Output is correct |
107 |
Correct |
1 ms |
344 KB |
Output is correct |
108 |
Correct |
0 ms |
348 KB |
Output is correct |
109 |
Correct |
1 ms |
348 KB |
Output is correct |
110 |
Correct |
3 ms |
604 KB |
Output is correct |
111 |
Correct |
41 ms |
3996 KB |
Output is correct |
112 |
Correct |
18 ms |
2648 KB |
Output is correct |
113 |
Correct |
286 ms |
2108 KB |
Output is correct |
114 |
Correct |
2 ms |
856 KB |
Output is correct |
115 |
Correct |
1 ms |
860 KB |
Output is correct |
116 |
Correct |
87 ms |
1264 KB |
Output is correct |
117 |
Correct |
1 ms |
856 KB |
Output is correct |
118 |
Correct |
3 ms |
1008 KB |
Output is correct |
119 |
Correct |
13 ms |
3932 KB |
Output is correct |
120 |
Correct |
16 ms |
3764 KB |
Output is correct |
121 |
Correct |
702 ms |
3412 KB |
Output is correct |
122 |
Correct |
2 ms |
1880 KB |
Output is correct |
123 |
Correct |
1 ms |
1628 KB |
Output is correct |
124 |
Correct |
719 ms |
30888 KB |
Output is correct |
125 |
Execution timed out |
2084 ms |
68168 KB |
Time limit exceeded |
126 |
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 |
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 |
1 ms |
468 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 |
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 |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
19 |
Correct |
17 ms |
860 KB |
Output is correct |
20 |
Correct |
6 ms |
1320 KB |
Output is correct |
21 |
Correct |
18 ms |
2652 KB |
Output is correct |
22 |
Correct |
10 ms |
860 KB |
Output is correct |
23 |
Correct |
15 ms |
860 KB |
Output is correct |
24 |
Correct |
8 ms |
1576 KB |
Output is correct |
25 |
Correct |
7 ms |
1576 KB |
Output is correct |
26 |
Correct |
2 ms |
860 KB |
Output is correct |
27 |
Correct |
1 ms |
860 KB |
Output is correct |
28 |
Correct |
6 ms |
860 KB |
Output is correct |
29 |
Correct |
37 ms |
1716 KB |
Output is correct |
30 |
Correct |
15 ms |
1384 KB |
Output is correct |
31 |
Correct |
31 ms |
3828 KB |
Output is correct |
32 |
Correct |
40 ms |
1624 KB |
Output is correct |
33 |
Correct |
25 ms |
1624 KB |
Output is correct |
34 |
Correct |
36 ms |
3156 KB |
Output is correct |
35 |
Correct |
35 ms |
3152 KB |
Output is correct |
36 |
Correct |
17 ms |
1884 KB |
Output is correct |
37 |
Correct |
33 ms |
1884 KB |
Output is correct |
38 |
Correct |
3 ms |
1628 KB |
Output is correct |
39 |
Correct |
352 ms |
16036 KB |
Output is correct |
40 |
Correct |
13 ms |
1880 KB |
Output is correct |
41 |
Correct |
15 ms |
3668 KB |
Output is correct |
42 |
Correct |
46 ms |
2396 KB |
Output is correct |
43 |
Correct |
36 ms |
3800 KB |
Output is correct |
44 |
Correct |
56 ms |
7800 KB |
Output is correct |
45 |
Correct |
59 ms |
8812 KB |
Output is correct |
46 |
Correct |
276 ms |
31712 KB |
Output is correct |
47 |
Correct |
351 ms |
15952 KB |
Output is correct |
48 |
Correct |
351 ms |
16048 KB |
Output is correct |
49 |
Correct |
190 ms |
28136 KB |
Output is correct |
50 |
Correct |
146 ms |
29160 KB |
Output is correct |
51 |
Correct |
232 ms |
15960 KB |
Output is correct |
52 |
Correct |
186 ms |
15964 KB |
Output is correct |
53 |
Correct |
260 ms |
15964 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
348 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
504 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
0 ms |
348 KB |
Output is correct |
64 |
Correct |
1 ms |
348 KB |
Output is correct |
65 |
Correct |
2 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 |
1 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 |
1 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 |
348 KB |
Output is correct |
78 |
Correct |
0 ms |
348 KB |
Output is correct |
79 |
Correct |
0 ms |
348 KB |
Output is correct |
80 |
Correct |
0 ms |
344 KB |
Output is correct |
81 |
Correct |
0 ms |
348 KB |
Output is correct |
82 |
Correct |
0 ms |
344 KB |
Output is correct |
83 |
Correct |
1 ms |
348 KB |
Output is correct |
84 |
Correct |
1 ms |
348 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 |
1 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
376 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
1 ms |
344 KB |
Output is correct |
93 |
Correct |
1 ms |
348 KB |
Output is correct |
94 |
Correct |
2 ms |
348 KB |
Output is correct |
95 |
Correct |
1 ms |
348 KB |
Output is correct |
96 |
Correct |
1 ms |
504 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
1 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
0 ms |
420 KB |
Output is correct |
102 |
Correct |
0 ms |
348 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
1 ms |
348 KB |
Output is correct |
105 |
Correct |
0 ms |
348 KB |
Output is correct |
106 |
Correct |
0 ms |
348 KB |
Output is correct |
107 |
Correct |
1 ms |
344 KB |
Output is correct |
108 |
Correct |
0 ms |
348 KB |
Output is correct |
109 |
Correct |
1 ms |
348 KB |
Output is correct |
110 |
Correct |
3 ms |
604 KB |
Output is correct |
111 |
Correct |
41 ms |
3996 KB |
Output is correct |
112 |
Correct |
18 ms |
2648 KB |
Output is correct |
113 |
Correct |
286 ms |
2108 KB |
Output is correct |
114 |
Correct |
2 ms |
856 KB |
Output is correct |
115 |
Correct |
1 ms |
860 KB |
Output is correct |
116 |
Correct |
87 ms |
1264 KB |
Output is correct |
117 |
Correct |
1 ms |
856 KB |
Output is correct |
118 |
Correct |
3 ms |
1008 KB |
Output is correct |
119 |
Correct |
13 ms |
3932 KB |
Output is correct |
120 |
Correct |
16 ms |
3764 KB |
Output is correct |
121 |
Correct |
702 ms |
3412 KB |
Output is correct |
122 |
Correct |
2 ms |
1880 KB |
Output is correct |
123 |
Correct |
1 ms |
1628 KB |
Output is correct |
124 |
Correct |
719 ms |
30888 KB |
Output is correct |
125 |
Execution timed out |
2084 ms |
68168 KB |
Time limit exceeded |
126 |
Halted |
0 ms |
0 KB |
- |