# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1070546 |
2024-08-22T15:11:44 Z |
vjudge1 |
Toy (CEOI24_toy) |
C++17 |
|
226 ms |
111336 KB |
#include <bits/stdc++.h>
#define int long long
using namespace std;
struct S {
int x, y;
S(){}
S(int xi, int yi):x(xi),y(yi){}
};
int sum(vector<vector<int>>& prefix, int x1, int y1, int x2, int y2) {
return prefix[x2][y2] - (x1 > 0 ? prefix[x1 - 1][y2] : 0) - (y1 > 0 ? prefix[x2][y1 - 1] : 0) + (x1 > 0 && y1 > 0 ? prefix[x1 - 1][y1 - 1] : 0);
}
int add(vector<vector<int>>& prefix, int i, int j) {
return prefix[i][j] + (i > 0 ? prefix[i - 1][j] : 0) + (j > 0 ? prefix[i][j - 1] : 0) - (i > 0 && j > 0 ? prefix[i - 1][j - 1] : 0);
}
void solve() {
int n, m, k, l, xh, yh, xv, yv, endx, endy;
cin >> m >> n >> l >> k >> yh >> xh >> yv >> xv;
vector<string> arr(n);
vector<vector<int>> prefix(n, vector<int>(m));
for(int i = 0; i < n; i++) {
cin >> arr[i];
for(int j = 0; j < m; j++) {
prefix[i][j] = (arr[i][j] == 'X') + add(prefix, i, j);
if(arr[i][j] == '*') endx = i, endy = j;
}
}
vector<vector<int>> up(n, vector<int>(m)), down(n, vector<int>(m)), right(n, vector<int>(m)), left(n, vector<int>(m));
for(int i = 0; i < n; i++) {
for(int j = 0; j < m; j++) {
if(i > 0 && j > l - 2 && sum(prefix, i - 1, j - l + 1, i, j) == 0) {
down[i - 1][j - l + 1]++;
if(j < m - 2) down[i - 1][j + 1]--;
up[i][j - l + 1]++;
if(j < m - 2) up[i][j + 1]--;
}
if(i > k - 2 && j > 0 && sum(prefix, i - k + 1, j - 1, i, j) == 0) {
right[i - k + 1][j - 1]++;
if(i < n - 2) right[i + 1][j - 1]--;
left[i - k + 1][j]++;
if(i < n - 2) left[i + 1][j]--;
}
}
}
for(int i = 0; i < n; i++) {
for(int j = 0; j < m; j++) {
up[i][j] += (j > 0 ? up[i][j - 1] : 0);
down[i][j] += (j > 0 ? down[i][j - 1] : 0);
right[i][j] += (i > 0 ? right[i - 1][j] : 0);
left[i][j] += (i > 0 ? left[i - 1][j] : 0);
}
}
queue<S> q;
vector<vector<int>> visited(n, vector<int>(m, false));
q.push(S(xh, yv));
while(q.size()) {
S temp = q.front();
q.pop();
if(visited[temp.x][temp.y]) continue;
visited[temp.x][temp.y] = true;
if(up[temp.x][temp.y]) q.push(S(temp.x - 1, temp.y));
if(down[temp.x][temp.y]) q.push(S(temp.x + 1, temp.y));
if(right[temp.x][temp.y]) q.push(S(temp.x, temp.y + 1));
if(left[temp.x][temp.y]) q.push(S(temp.x, temp.y - 1));
}
if(visited[endx][endy]) cout << "YES\n";
else cout << "NO\n";
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
}
Compilation message
Main.cpp: In function 'void solve()':
Main.cpp:68:26: warning: 'endy' may be used uninitialized in this function [-Wmaybe-uninitialized]
68 | if(visited[endx][endy]) cout << "YES\n";
| ^
Main.cpp:68:20: warning: 'endx' may be used uninitialized in this function [-Wmaybe-uninitialized]
68 | if(visited[endx][endy]) cout << "YES\n";
| ^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 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 |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
420 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
456 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
576 KB |
Output is correct |
15 |
Correct |
1 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
604 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 |
604 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
604 KB |
Output is correct |
23 |
Correct |
1 ms |
604 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
464 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 |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
1 ms |
344 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
344 KB |
Output is correct |
43 |
Correct |
0 ms |
456 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
604 KB |
Output is correct |
46 |
Correct |
1 ms |
460 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 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 |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
420 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
456 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
576 KB |
Output is correct |
15 |
Correct |
1 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
604 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 |
604 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
604 KB |
Output is correct |
23 |
Correct |
1 ms |
604 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
464 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 |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
1 ms |
344 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
344 KB |
Output is correct |
43 |
Correct |
0 ms |
456 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
604 KB |
Output is correct |
46 |
Correct |
1 ms |
460 KB |
Output is correct |
47 |
Correct |
1 ms |
344 KB |
Output is correct |
48 |
Correct |
1 ms |
860 KB |
Output is correct |
49 |
Correct |
0 ms |
860 KB |
Output is correct |
50 |
Correct |
0 ms |
604 KB |
Output is correct |
51 |
Correct |
0 ms |
860 KB |
Output is correct |
52 |
Correct |
0 ms |
860 KB |
Output is correct |
53 |
Correct |
0 ms |
604 KB |
Output is correct |
54 |
Correct |
0 ms |
860 KB |
Output is correct |
55 |
Correct |
1 ms |
860 KB |
Output is correct |
56 |
Correct |
1 ms |
604 KB |
Output is correct |
57 |
Correct |
0 ms |
860 KB |
Output is correct |
58 |
Correct |
1 ms |
860 KB |
Output is correct |
59 |
Correct |
1 ms |
604 KB |
Output is correct |
60 |
Correct |
1 ms |
860 KB |
Output is correct |
61 |
Correct |
1 ms |
600 KB |
Output is correct |
62 |
Correct |
1 ms |
860 KB |
Output is correct |
63 |
Correct |
1 ms |
860 KB |
Output is correct |
64 |
Correct |
1 ms |
860 KB |
Output is correct |
65 |
Correct |
1 ms |
860 KB |
Output is correct |
66 |
Correct |
1 ms |
860 KB |
Output is correct |
67 |
Correct |
1 ms |
860 KB |
Output is correct |
68 |
Correct |
1 ms |
860 KB |
Output is correct |
69 |
Correct |
1 ms |
860 KB |
Output is correct |
70 |
Correct |
1 ms |
860 KB |
Output is correct |
71 |
Correct |
1 ms |
860 KB |
Output is correct |
72 |
Correct |
1 ms |
860 KB |
Output is correct |
73 |
Correct |
1 ms |
856 KB |
Output is correct |
74 |
Correct |
1 ms |
600 KB |
Output is correct |
75 |
Correct |
1 ms |
600 KB |
Output is correct |
76 |
Correct |
1 ms |
860 KB |
Output is correct |
77 |
Correct |
1 ms |
860 KB |
Output is correct |
78 |
Correct |
1 ms |
860 KB |
Output is correct |
79 |
Correct |
1 ms |
604 KB |
Output is correct |
80 |
Correct |
1 ms |
604 KB |
Output is correct |
81 |
Correct |
1 ms |
604 KB |
Output is correct |
82 |
Correct |
1 ms |
604 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 |
1 ms |
860 KB |
Output is correct |
87 |
Correct |
1 ms |
860 KB |
Output is correct |
88 |
Correct |
1 ms |
860 KB |
Output is correct |
89 |
Correct |
1 ms |
860 KB |
Output is correct |
90 |
Correct |
1 ms |
860 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
6 ms |
4700 KB |
Output is correct |
5 |
Correct |
10 ms |
4700 KB |
Output is correct |
6 |
Correct |
1 ms |
860 KB |
Output is correct |
7 |
Correct |
7 ms |
4700 KB |
Output is correct |
8 |
Correct |
7 ms |
4700 KB |
Output is correct |
9 |
Correct |
1 ms |
1884 KB |
Output is correct |
10 |
Correct |
5 ms |
4700 KB |
Output is correct |
11 |
Correct |
5 ms |
4700 KB |
Output is correct |
12 |
Correct |
1 ms |
1740 KB |
Output is correct |
13 |
Correct |
3 ms |
4700 KB |
Output is correct |
14 |
Correct |
3 ms |
4700 KB |
Output is correct |
15 |
Correct |
6 ms |
4612 KB |
Output is correct |
16 |
Correct |
6 ms |
4188 KB |
Output is correct |
17 |
Correct |
7 ms |
4428 KB |
Output is correct |
18 |
Correct |
6 ms |
4700 KB |
Output is correct |
19 |
Correct |
6 ms |
4700 KB |
Output is correct |
20 |
Correct |
7 ms |
4700 KB |
Output is correct |
21 |
Correct |
6 ms |
4876 KB |
Output is correct |
22 |
Correct |
7 ms |
4700 KB |
Output is correct |
23 |
Correct |
6 ms |
4700 KB |
Output is correct |
24 |
Correct |
9 ms |
4700 KB |
Output is correct |
25 |
Correct |
6 ms |
4700 KB |
Output is correct |
26 |
Correct |
7 ms |
4700 KB |
Output is correct |
27 |
Correct |
6 ms |
4700 KB |
Output is correct |
28 |
Correct |
6 ms |
4700 KB |
Output is correct |
29 |
Correct |
6 ms |
4872 KB |
Output is correct |
30 |
Correct |
8 ms |
4700 KB |
Output is correct |
31 |
Correct |
6 ms |
4444 KB |
Output is correct |
32 |
Correct |
6 ms |
4792 KB |
Output is correct |
33 |
Correct |
6 ms |
4324 KB |
Output is correct |
34 |
Correct |
6 ms |
4184 KB |
Output is correct |
35 |
Correct |
6 ms |
4444 KB |
Output is correct |
36 |
Correct |
3 ms |
4444 KB |
Output is correct |
37 |
Correct |
5 ms |
4812 KB |
Output is correct |
38 |
Correct |
4 ms |
4440 KB |
Output is correct |
39 |
Correct |
5 ms |
4444 KB |
Output is correct |
40 |
Correct |
4 ms |
4700 KB |
Output is correct |
41 |
Correct |
4 ms |
4304 KB |
Output is correct |
42 |
Correct |
8 ms |
4956 KB |
Output is correct |
43 |
Correct |
6 ms |
4956 KB |
Output is correct |
44 |
Correct |
8 ms |
4980 KB |
Output is correct |
45 |
Correct |
6 ms |
4956 KB |
Output is correct |
46 |
Correct |
3 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 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 |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
420 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
456 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
576 KB |
Output is correct |
15 |
Correct |
1 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
604 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 |
604 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
604 KB |
Output is correct |
23 |
Correct |
1 ms |
604 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
464 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 |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
1 ms |
344 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
344 KB |
Output is correct |
43 |
Correct |
0 ms |
456 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
604 KB |
Output is correct |
46 |
Correct |
1 ms |
460 KB |
Output is correct |
47 |
Correct |
1 ms |
344 KB |
Output is correct |
48 |
Correct |
1 ms |
860 KB |
Output is correct |
49 |
Correct |
0 ms |
860 KB |
Output is correct |
50 |
Correct |
0 ms |
604 KB |
Output is correct |
51 |
Correct |
0 ms |
860 KB |
Output is correct |
52 |
Correct |
0 ms |
860 KB |
Output is correct |
53 |
Correct |
0 ms |
604 KB |
Output is correct |
54 |
Correct |
0 ms |
860 KB |
Output is correct |
55 |
Correct |
1 ms |
860 KB |
Output is correct |
56 |
Correct |
1 ms |
604 KB |
Output is correct |
57 |
Correct |
0 ms |
860 KB |
Output is correct |
58 |
Correct |
1 ms |
860 KB |
Output is correct |
59 |
Correct |
1 ms |
604 KB |
Output is correct |
60 |
Correct |
1 ms |
860 KB |
Output is correct |
61 |
Correct |
1 ms |
600 KB |
Output is correct |
62 |
Correct |
1 ms |
860 KB |
Output is correct |
63 |
Correct |
1 ms |
860 KB |
Output is correct |
64 |
Correct |
1 ms |
860 KB |
Output is correct |
65 |
Correct |
1 ms |
860 KB |
Output is correct |
66 |
Correct |
1 ms |
860 KB |
Output is correct |
67 |
Correct |
1 ms |
860 KB |
Output is correct |
68 |
Correct |
1 ms |
860 KB |
Output is correct |
69 |
Correct |
1 ms |
860 KB |
Output is correct |
70 |
Correct |
1 ms |
860 KB |
Output is correct |
71 |
Correct |
1 ms |
860 KB |
Output is correct |
72 |
Correct |
1 ms |
860 KB |
Output is correct |
73 |
Correct |
1 ms |
856 KB |
Output is correct |
74 |
Correct |
1 ms |
600 KB |
Output is correct |
75 |
Correct |
1 ms |
600 KB |
Output is correct |
76 |
Correct |
1 ms |
860 KB |
Output is correct |
77 |
Correct |
1 ms |
860 KB |
Output is correct |
78 |
Correct |
1 ms |
860 KB |
Output is correct |
79 |
Correct |
1 ms |
604 KB |
Output is correct |
80 |
Correct |
1 ms |
604 KB |
Output is correct |
81 |
Correct |
1 ms |
604 KB |
Output is correct |
82 |
Correct |
1 ms |
604 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 |
1 ms |
860 KB |
Output is correct |
87 |
Correct |
1 ms |
860 KB |
Output is correct |
88 |
Correct |
1 ms |
860 KB |
Output is correct |
89 |
Correct |
1 ms |
860 KB |
Output is correct |
90 |
Correct |
1 ms |
860 KB |
Output is correct |
91 |
Correct |
1 ms |
604 KB |
Output is correct |
92 |
Correct |
6 ms |
4700 KB |
Output is correct |
93 |
Correct |
10 ms |
4700 KB |
Output is correct |
94 |
Correct |
1 ms |
860 KB |
Output is correct |
95 |
Correct |
7 ms |
4700 KB |
Output is correct |
96 |
Correct |
7 ms |
4700 KB |
Output is correct |
97 |
Correct |
1 ms |
1884 KB |
Output is correct |
98 |
Correct |
5 ms |
4700 KB |
Output is correct |
99 |
Correct |
5 ms |
4700 KB |
Output is correct |
100 |
Correct |
1 ms |
1740 KB |
Output is correct |
101 |
Correct |
3 ms |
4700 KB |
Output is correct |
102 |
Correct |
3 ms |
4700 KB |
Output is correct |
103 |
Correct |
6 ms |
4612 KB |
Output is correct |
104 |
Correct |
6 ms |
4188 KB |
Output is correct |
105 |
Correct |
7 ms |
4428 KB |
Output is correct |
106 |
Correct |
6 ms |
4700 KB |
Output is correct |
107 |
Correct |
6 ms |
4700 KB |
Output is correct |
108 |
Correct |
7 ms |
4700 KB |
Output is correct |
109 |
Correct |
6 ms |
4876 KB |
Output is correct |
110 |
Correct |
7 ms |
4700 KB |
Output is correct |
111 |
Correct |
6 ms |
4700 KB |
Output is correct |
112 |
Correct |
9 ms |
4700 KB |
Output is correct |
113 |
Correct |
6 ms |
4700 KB |
Output is correct |
114 |
Correct |
7 ms |
4700 KB |
Output is correct |
115 |
Correct |
6 ms |
4700 KB |
Output is correct |
116 |
Correct |
6 ms |
4700 KB |
Output is correct |
117 |
Correct |
6 ms |
4872 KB |
Output is correct |
118 |
Correct |
8 ms |
4700 KB |
Output is correct |
119 |
Correct |
6 ms |
4444 KB |
Output is correct |
120 |
Correct |
6 ms |
4792 KB |
Output is correct |
121 |
Correct |
6 ms |
4324 KB |
Output is correct |
122 |
Correct |
6 ms |
4184 KB |
Output is correct |
123 |
Correct |
6 ms |
4444 KB |
Output is correct |
124 |
Correct |
3 ms |
4444 KB |
Output is correct |
125 |
Correct |
5 ms |
4812 KB |
Output is correct |
126 |
Correct |
4 ms |
4440 KB |
Output is correct |
127 |
Correct |
5 ms |
4444 KB |
Output is correct |
128 |
Correct |
4 ms |
4700 KB |
Output is correct |
129 |
Correct |
4 ms |
4304 KB |
Output is correct |
130 |
Correct |
8 ms |
4956 KB |
Output is correct |
131 |
Correct |
6 ms |
4956 KB |
Output is correct |
132 |
Correct |
8 ms |
4980 KB |
Output is correct |
133 |
Correct |
6 ms |
4956 KB |
Output is correct |
134 |
Correct |
3 ms |
4444 KB |
Output is correct |
135 |
Correct |
2 ms |
2140 KB |
Output is correct |
136 |
Correct |
4 ms |
6748 KB |
Output is correct |
137 |
Correct |
4 ms |
6748 KB |
Output is correct |
138 |
Correct |
2 ms |
2396 KB |
Output is correct |
139 |
Correct |
5 ms |
6748 KB |
Output is correct |
140 |
Correct |
3 ms |
6748 KB |
Output is correct |
141 |
Correct |
2 ms |
2908 KB |
Output is correct |
142 |
Correct |
4 ms |
6748 KB |
Output is correct |
143 |
Correct |
4 ms |
6748 KB |
Output is correct |
144 |
Correct |
0 ms |
464 KB |
Output is correct |
145 |
Correct |
4 ms |
6748 KB |
Output is correct |
146 |
Correct |
3 ms |
6748 KB |
Output is correct |
147 |
Correct |
10 ms |
6260 KB |
Output is correct |
148 |
Correct |
8 ms |
6268 KB |
Output is correct |
149 |
Correct |
8 ms |
5980 KB |
Output is correct |
150 |
Correct |
13 ms |
6916 KB |
Output is correct |
151 |
Correct |
8 ms |
6748 KB |
Output is correct |
152 |
Correct |
10 ms |
6888 KB |
Output is correct |
153 |
Correct |
8 ms |
6748 KB |
Output is correct |
154 |
Correct |
9 ms |
6748 KB |
Output is correct |
155 |
Correct |
8 ms |
6740 KB |
Output is correct |
156 |
Correct |
10 ms |
6748 KB |
Output is correct |
157 |
Correct |
9 ms |
6916 KB |
Output is correct |
158 |
Correct |
9 ms |
6748 KB |
Output is correct |
159 |
Correct |
9 ms |
6908 KB |
Output is correct |
160 |
Correct |
8 ms |
6908 KB |
Output is correct |
161 |
Correct |
10 ms |
6748 KB |
Output is correct |
162 |
Correct |
8 ms |
6236 KB |
Output is correct |
163 |
Correct |
9 ms |
6236 KB |
Output is correct |
164 |
Correct |
9 ms |
6488 KB |
Output is correct |
165 |
Correct |
9 ms |
5976 KB |
Output is correct |
166 |
Correct |
8 ms |
6492 KB |
Output is correct |
167 |
Correct |
8 ms |
6104 KB |
Output is correct |
168 |
Correct |
3 ms |
6236 KB |
Output is correct |
169 |
Correct |
6 ms |
6232 KB |
Output is correct |
170 |
Correct |
6 ms |
6488 KB |
Output is correct |
171 |
Correct |
6 ms |
6308 KB |
Output is correct |
172 |
Correct |
5 ms |
5724 KB |
Output is correct |
173 |
Correct |
5 ms |
6360 KB |
Output is correct |
174 |
Correct |
9 ms |
6748 KB |
Output is correct |
175 |
Correct |
8 ms |
6748 KB |
Output is correct |
176 |
Correct |
8 ms |
6924 KB |
Output is correct |
177 |
Correct |
8 ms |
6748 KB |
Output is correct |
178 |
Correct |
3 ms |
5980 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 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 |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
420 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
456 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
576 KB |
Output is correct |
15 |
Correct |
1 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
604 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 |
604 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
604 KB |
Output is correct |
23 |
Correct |
1 ms |
604 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
464 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 |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
1 ms |
344 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
344 KB |
Output is correct |
43 |
Correct |
0 ms |
456 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
604 KB |
Output is correct |
46 |
Correct |
1 ms |
460 KB |
Output is correct |
47 |
Correct |
1 ms |
344 KB |
Output is correct |
48 |
Correct |
1 ms |
860 KB |
Output is correct |
49 |
Correct |
0 ms |
860 KB |
Output is correct |
50 |
Correct |
0 ms |
604 KB |
Output is correct |
51 |
Correct |
0 ms |
860 KB |
Output is correct |
52 |
Correct |
0 ms |
860 KB |
Output is correct |
53 |
Correct |
0 ms |
604 KB |
Output is correct |
54 |
Correct |
0 ms |
860 KB |
Output is correct |
55 |
Correct |
1 ms |
860 KB |
Output is correct |
56 |
Correct |
1 ms |
604 KB |
Output is correct |
57 |
Correct |
0 ms |
860 KB |
Output is correct |
58 |
Correct |
1 ms |
860 KB |
Output is correct |
59 |
Correct |
1 ms |
604 KB |
Output is correct |
60 |
Correct |
1 ms |
860 KB |
Output is correct |
61 |
Correct |
1 ms |
600 KB |
Output is correct |
62 |
Correct |
1 ms |
860 KB |
Output is correct |
63 |
Correct |
1 ms |
860 KB |
Output is correct |
64 |
Correct |
1 ms |
860 KB |
Output is correct |
65 |
Correct |
1 ms |
860 KB |
Output is correct |
66 |
Correct |
1 ms |
860 KB |
Output is correct |
67 |
Correct |
1 ms |
860 KB |
Output is correct |
68 |
Correct |
1 ms |
860 KB |
Output is correct |
69 |
Correct |
1 ms |
860 KB |
Output is correct |
70 |
Correct |
1 ms |
860 KB |
Output is correct |
71 |
Correct |
1 ms |
860 KB |
Output is correct |
72 |
Correct |
1 ms |
860 KB |
Output is correct |
73 |
Correct |
1 ms |
856 KB |
Output is correct |
74 |
Correct |
1 ms |
600 KB |
Output is correct |
75 |
Correct |
1 ms |
600 KB |
Output is correct |
76 |
Correct |
1 ms |
860 KB |
Output is correct |
77 |
Correct |
1 ms |
860 KB |
Output is correct |
78 |
Correct |
1 ms |
860 KB |
Output is correct |
79 |
Correct |
1 ms |
604 KB |
Output is correct |
80 |
Correct |
1 ms |
604 KB |
Output is correct |
81 |
Correct |
1 ms |
604 KB |
Output is correct |
82 |
Correct |
1 ms |
604 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 |
1 ms |
860 KB |
Output is correct |
87 |
Correct |
1 ms |
860 KB |
Output is correct |
88 |
Correct |
1 ms |
860 KB |
Output is correct |
89 |
Correct |
1 ms |
860 KB |
Output is correct |
90 |
Correct |
1 ms |
860 KB |
Output is correct |
91 |
Correct |
1 ms |
604 KB |
Output is correct |
92 |
Correct |
6 ms |
4700 KB |
Output is correct |
93 |
Correct |
10 ms |
4700 KB |
Output is correct |
94 |
Correct |
1 ms |
860 KB |
Output is correct |
95 |
Correct |
7 ms |
4700 KB |
Output is correct |
96 |
Correct |
7 ms |
4700 KB |
Output is correct |
97 |
Correct |
1 ms |
1884 KB |
Output is correct |
98 |
Correct |
5 ms |
4700 KB |
Output is correct |
99 |
Correct |
5 ms |
4700 KB |
Output is correct |
100 |
Correct |
1 ms |
1740 KB |
Output is correct |
101 |
Correct |
3 ms |
4700 KB |
Output is correct |
102 |
Correct |
3 ms |
4700 KB |
Output is correct |
103 |
Correct |
6 ms |
4612 KB |
Output is correct |
104 |
Correct |
6 ms |
4188 KB |
Output is correct |
105 |
Correct |
7 ms |
4428 KB |
Output is correct |
106 |
Correct |
6 ms |
4700 KB |
Output is correct |
107 |
Correct |
6 ms |
4700 KB |
Output is correct |
108 |
Correct |
7 ms |
4700 KB |
Output is correct |
109 |
Correct |
6 ms |
4876 KB |
Output is correct |
110 |
Correct |
7 ms |
4700 KB |
Output is correct |
111 |
Correct |
6 ms |
4700 KB |
Output is correct |
112 |
Correct |
9 ms |
4700 KB |
Output is correct |
113 |
Correct |
6 ms |
4700 KB |
Output is correct |
114 |
Correct |
7 ms |
4700 KB |
Output is correct |
115 |
Correct |
6 ms |
4700 KB |
Output is correct |
116 |
Correct |
6 ms |
4700 KB |
Output is correct |
117 |
Correct |
6 ms |
4872 KB |
Output is correct |
118 |
Correct |
8 ms |
4700 KB |
Output is correct |
119 |
Correct |
6 ms |
4444 KB |
Output is correct |
120 |
Correct |
6 ms |
4792 KB |
Output is correct |
121 |
Correct |
6 ms |
4324 KB |
Output is correct |
122 |
Correct |
6 ms |
4184 KB |
Output is correct |
123 |
Correct |
6 ms |
4444 KB |
Output is correct |
124 |
Correct |
3 ms |
4444 KB |
Output is correct |
125 |
Correct |
5 ms |
4812 KB |
Output is correct |
126 |
Correct |
4 ms |
4440 KB |
Output is correct |
127 |
Correct |
5 ms |
4444 KB |
Output is correct |
128 |
Correct |
4 ms |
4700 KB |
Output is correct |
129 |
Correct |
4 ms |
4304 KB |
Output is correct |
130 |
Correct |
8 ms |
4956 KB |
Output is correct |
131 |
Correct |
6 ms |
4956 KB |
Output is correct |
132 |
Correct |
8 ms |
4980 KB |
Output is correct |
133 |
Correct |
6 ms |
4956 KB |
Output is correct |
134 |
Correct |
3 ms |
4444 KB |
Output is correct |
135 |
Correct |
2 ms |
2140 KB |
Output is correct |
136 |
Correct |
4 ms |
6748 KB |
Output is correct |
137 |
Correct |
4 ms |
6748 KB |
Output is correct |
138 |
Correct |
2 ms |
2396 KB |
Output is correct |
139 |
Correct |
5 ms |
6748 KB |
Output is correct |
140 |
Correct |
3 ms |
6748 KB |
Output is correct |
141 |
Correct |
2 ms |
2908 KB |
Output is correct |
142 |
Correct |
4 ms |
6748 KB |
Output is correct |
143 |
Correct |
4 ms |
6748 KB |
Output is correct |
144 |
Correct |
0 ms |
464 KB |
Output is correct |
145 |
Correct |
4 ms |
6748 KB |
Output is correct |
146 |
Correct |
3 ms |
6748 KB |
Output is correct |
147 |
Correct |
10 ms |
6260 KB |
Output is correct |
148 |
Correct |
8 ms |
6268 KB |
Output is correct |
149 |
Correct |
8 ms |
5980 KB |
Output is correct |
150 |
Correct |
13 ms |
6916 KB |
Output is correct |
151 |
Correct |
8 ms |
6748 KB |
Output is correct |
152 |
Correct |
10 ms |
6888 KB |
Output is correct |
153 |
Correct |
8 ms |
6748 KB |
Output is correct |
154 |
Correct |
9 ms |
6748 KB |
Output is correct |
155 |
Correct |
8 ms |
6740 KB |
Output is correct |
156 |
Correct |
10 ms |
6748 KB |
Output is correct |
157 |
Correct |
9 ms |
6916 KB |
Output is correct |
158 |
Correct |
9 ms |
6748 KB |
Output is correct |
159 |
Correct |
9 ms |
6908 KB |
Output is correct |
160 |
Correct |
8 ms |
6908 KB |
Output is correct |
161 |
Correct |
10 ms |
6748 KB |
Output is correct |
162 |
Correct |
8 ms |
6236 KB |
Output is correct |
163 |
Correct |
9 ms |
6236 KB |
Output is correct |
164 |
Correct |
9 ms |
6488 KB |
Output is correct |
165 |
Correct |
9 ms |
5976 KB |
Output is correct |
166 |
Correct |
8 ms |
6492 KB |
Output is correct |
167 |
Correct |
8 ms |
6104 KB |
Output is correct |
168 |
Correct |
3 ms |
6236 KB |
Output is correct |
169 |
Correct |
6 ms |
6232 KB |
Output is correct |
170 |
Correct |
6 ms |
6488 KB |
Output is correct |
171 |
Correct |
6 ms |
6308 KB |
Output is correct |
172 |
Correct |
5 ms |
5724 KB |
Output is correct |
173 |
Correct |
5 ms |
6360 KB |
Output is correct |
174 |
Correct |
9 ms |
6748 KB |
Output is correct |
175 |
Correct |
8 ms |
6748 KB |
Output is correct |
176 |
Correct |
8 ms |
6924 KB |
Output is correct |
177 |
Correct |
8 ms |
6748 KB |
Output is correct |
178 |
Correct |
3 ms |
5980 KB |
Output is correct |
179 |
Correct |
17 ms |
28764 KB |
Output is correct |
180 |
Correct |
61 ms |
110932 KB |
Output is correct |
181 |
Correct |
52 ms |
110928 KB |
Output is correct |
182 |
Correct |
14 ms |
29276 KB |
Output is correct |
183 |
Correct |
58 ms |
110928 KB |
Output is correct |
184 |
Correct |
57 ms |
110932 KB |
Output is correct |
185 |
Correct |
44 ms |
81488 KB |
Output is correct |
186 |
Correct |
55 ms |
111036 KB |
Output is correct |
187 |
Correct |
69 ms |
110928 KB |
Output is correct |
188 |
Correct |
41 ms |
57940 KB |
Output is correct |
189 |
Correct |
68 ms |
111040 KB |
Output is correct |
190 |
Correct |
56 ms |
110932 KB |
Output is correct |
191 |
Correct |
182 ms |
94292 KB |
Output is correct |
192 |
Correct |
207 ms |
101204 KB |
Output is correct |
193 |
Correct |
207 ms |
99408 KB |
Output is correct |
194 |
Correct |
150 ms |
110928 KB |
Output is correct |
195 |
Correct |
155 ms |
110928 KB |
Output is correct |
196 |
Correct |
161 ms |
110932 KB |
Output is correct |
197 |
Correct |
162 ms |
110948 KB |
Output is correct |
198 |
Correct |
161 ms |
111176 KB |
Output is correct |
199 |
Correct |
150 ms |
110932 KB |
Output is correct |
200 |
Correct |
161 ms |
111080 KB |
Output is correct |
201 |
Correct |
160 ms |
110968 KB |
Output is correct |
202 |
Correct |
190 ms |
111080 KB |
Output is correct |
203 |
Correct |
191 ms |
110972 KB |
Output is correct |
204 |
Correct |
197 ms |
111100 KB |
Output is correct |
205 |
Correct |
185 ms |
110932 KB |
Output is correct |
206 |
Correct |
144 ms |
97044 KB |
Output is correct |
207 |
Correct |
140 ms |
97872 KB |
Output is correct |
208 |
Correct |
132 ms |
93092 KB |
Output is correct |
209 |
Correct |
147 ms |
99472 KB |
Output is correct |
210 |
Correct |
143 ms |
98976 KB |
Output is correct |
211 |
Correct |
155 ms |
104892 KB |
Output is correct |
212 |
Correct |
50 ms |
95572 KB |
Output is correct |
213 |
Correct |
86 ms |
99928 KB |
Output is correct |
214 |
Correct |
77 ms |
94804 KB |
Output is correct |
215 |
Correct |
84 ms |
101904 KB |
Output is correct |
216 |
Correct |
111 ms |
93012 KB |
Output is correct |
217 |
Correct |
97 ms |
94628 KB |
Output is correct |
218 |
Correct |
201 ms |
111336 KB |
Output is correct |
219 |
Correct |
193 ms |
111188 KB |
Output is correct |
220 |
Correct |
226 ms |
111188 KB |
Output is correct |
221 |
Correct |
210 ms |
111188 KB |
Output is correct |
222 |
Correct |
52 ms |
93008 KB |
Output is correct |