#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define en cout << '\n'
#define vi vector<int>
#define pii pair<int, int>
#define ff first
#define ss second
#define all(x) x.begin(),x.end()
const int N = 1500+100;
int n, m, k, l, xh, yh, xv, yv, pref[N][N], H[N][N], V[N][N], vis[N][N], L[N][N], R[N][N], U[N][N], D[N][N];
string s[N];
int arr[4][2]={
{0, 1},
{1, 0},
{-1, 0},
{0, -1}
};
int get(int r1, int r2, int c1, int c2){
return pref[r2][c2] - pref[r1 - 1][c2] - pref[r2][c1 - 1] + pref[r1 - 1][c1 - 1];
}
void solve(){
cin >> m >> n >> k >> l;
cin >> yh >> xh >> yv >> xv;
++xh, ++yh, ++xv, ++yv;
for(int i = 1; i <= n; ++i){
cin >> s[i];
s[i] = " " + s[i];
}
for(int i = 0; i <= n; ++i) for(int j = 0; j <= m; ++j) pref[i][j] = 0;
for(int i = 0; i <= n; ++i) for(int j = 0; j <= m; ++j) H[i][j] = V[i][j] = vis[i][j] = L[i][j] = R[i][j] = D[i][j] = U[i][j] = 0;
for(int i = 1; i <= n; ++i){
for(int j = 1; j <= m; ++j){
pref[i][j] = pref[i - 1][j] + pref[i][j - 1] - pref[i - 1][j - 1];
if(s[i][j] == 'X') ++pref[i][j];
}
}
H[xh][yh] = 1;
queue<pii> q;
q.push({xh, yh});
while(!q.empty()){
int x = q.front().ff;
int y = q.front().ss;
q.pop();
for(int i = 0; i < 4; ++i){
int nx = x + arr[i][0];
int ny = y + arr[i][1];
if(nx > 0 && ny > 0 && nx <= n && ny + k - 1 <= m && H[nx][ny] == 0){
if(get(nx, nx, ny, ny + k - 1) == 0){
H[nx][ny] = 1;
q.push({nx, ny});
}
}
}
}
V[xv][yv] = 1;
q.push({xv, yv});
while(!q.empty()){
int x = q.front().ff;
int y = q.front().ss;
q.pop();
for(int i = 0; i < 4; ++i){
int nx = x + arr[i][0];
int ny = y + arr[i][1];
if(nx > 0 && ny > 0 && nx + l - 1 <= n && ny <= m && V[nx][ny] == 0){
if(get(nx, nx+l-1, ny, ny) == 0){
V[nx][ny] = 1;
q.push({nx, ny});
}
}
}
}
for(int i = n; i >= 1; --i){
for(int j = m; j >= 1; --j){
if(s[i][j] == 'X') continue;
for(int i1 = i; i1 >= max(1, i - l + 1); --i1)
if(get(i1, i, j, j) == 0 && V[i1][j]){
if(V[i1][j + 1]) R[i][j] = 1;
if(V[i1][j - 1]) L[i][j] = 1;
}
for(int i1 = j; i1 >= max(1, j - k + 1); --i1)
if(get(i, i, i1, j) == 0 && H[i][i1]){
if(H[i - 1][i1]) U[i][j] = 1;
if(H[i + 1][i1]) D[i][j] = 1;
}
}
}
// for(int i = 1; i <= n; ++i){
// for(int j = 1; j <= m; ++j){
// cout << L[i][j];
// }
// en;
// }
// assert(H[xh][yv] && V[xh][yv]);
vis[xh][yv] = 1;
q.push({xh, yv});
while(!q.empty()){
int x = q.front().ff;
int y = q.front().ss;
q.pop();
for(int i = 0; i < 4; ++i){
int nx = x + arr[i][0];
int ny = y + arr[i][1];
if(nx > 0 && ny > 0 && nx <= n && ny <= m && !vis[nx][ny] && s[nx][ny] != 'X'){
if((nx == x - 1 && U[x][y]) || (nx == x + 1 && D[x][y]) || (ny == y + 1 && R[x][y]) || (ny == y - 1 && L[x][y])){
vis[nx][ny] = 1;
q.push({nx, ny});
}
}
}
}
for(int i = 1; i <= n; ++i){
for(int j = 1; j <= m; ++j){
if(s[i][j] == '*' && vis[i][j]){
cout << "YES";
return;
}
}
}
cout << "NO";
}
int main(){
cin.tie(0); ios::sync_with_stdio(0);
solve();
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
604 KB |
Output is correct |
2 |
Correct |
0 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
604 KB |
Output is correct |
2 |
Correct |
0 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
860 KB |
Output is correct |
4 |
Correct |
1 ms |
2140 KB |
Output is correct |
5 |
Correct |
1 ms |
2140 KB |
Output is correct |
6 |
Correct |
1 ms |
1884 KB |
Output is correct |
7 |
Correct |
1 ms |
2020 KB |
Output is correct |
8 |
Correct |
1 ms |
2140 KB |
Output is correct |
9 |
Correct |
1 ms |
1628 KB |
Output is correct |
10 |
Correct |
1 ms |
2044 KB |
Output is correct |
11 |
Correct |
1 ms |
2136 KB |
Output is correct |
12 |
Correct |
0 ms |
600 KB |
Output is correct |
13 |
Correct |
1 ms |
2140 KB |
Output is correct |
14 |
Correct |
1 ms |
2136 KB |
Output is correct |
15 |
Correct |
1 ms |
2140 KB |
Output is correct |
16 |
Correct |
1 ms |
1884 KB |
Output is correct |
17 |
Correct |
1 ms |
1884 KB |
Output is correct |
18 |
Correct |
1 ms |
2136 KB |
Output is correct |
19 |
Correct |
1 ms |
2140 KB |
Output is correct |
20 |
Correct |
1 ms |
2140 KB |
Output is correct |
21 |
Correct |
1 ms |
2156 KB |
Output is correct |
22 |
Correct |
1 ms |
2140 KB |
Output is correct |
23 |
Correct |
1 ms |
2140 KB |
Output is correct |
24 |
Correct |
1 ms |
2140 KB |
Output is correct |
25 |
Correct |
1 ms |
2140 KB |
Output is correct |
26 |
Correct |
1 ms |
2140 KB |
Output is correct |
27 |
Correct |
1 ms |
2140 KB |
Output is correct |
28 |
Correct |
1 ms |
2140 KB |
Output is correct |
29 |
Correct |
1 ms |
2140 KB |
Output is correct |
30 |
Correct |
1 ms |
1884 KB |
Output is correct |
31 |
Correct |
1 ms |
1884 KB |
Output is correct |
32 |
Correct |
1 ms |
2076 KB |
Output is correct |
33 |
Correct |
1 ms |
2140 KB |
Output is correct |
34 |
Correct |
1 ms |
2140 KB |
Output is correct |
35 |
Correct |
1 ms |
1884 KB |
Output is correct |
36 |
Correct |
1 ms |
1884 KB |
Output is correct |
37 |
Correct |
1 ms |
1880 KB |
Output is correct |
38 |
Correct |
1 ms |
1880 KB |
Output is correct |
39 |
Correct |
1 ms |
1884 KB |
Output is correct |
40 |
Correct |
1 ms |
1884 KB |
Output is correct |
41 |
Correct |
1 ms |
1884 KB |
Output is correct |
42 |
Correct |
1 ms |
2140 KB |
Output is correct |
43 |
Correct |
1 ms |
2140 KB |
Output is correct |
44 |
Correct |
1 ms |
2140 KB |
Output is correct |
45 |
Correct |
1 ms |
2140 KB |
Output is correct |
46 |
Correct |
1 ms |
1884 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
604 KB |
Output is correct |
2 |
Correct |
0 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
860 KB |
Output is correct |
4 |
Correct |
1 ms |
2140 KB |
Output is correct |
5 |
Correct |
1 ms |
2140 KB |
Output is correct |
6 |
Correct |
1 ms |
1884 KB |
Output is correct |
7 |
Correct |
1 ms |
2020 KB |
Output is correct |
8 |
Correct |
1 ms |
2140 KB |
Output is correct |
9 |
Correct |
1 ms |
1628 KB |
Output is correct |
10 |
Correct |
1 ms |
2044 KB |
Output is correct |
11 |
Correct |
1 ms |
2136 KB |
Output is correct |
12 |
Correct |
0 ms |
600 KB |
Output is correct |
13 |
Correct |
1 ms |
2140 KB |
Output is correct |
14 |
Correct |
1 ms |
2136 KB |
Output is correct |
15 |
Correct |
1 ms |
2140 KB |
Output is correct |
16 |
Correct |
1 ms |
1884 KB |
Output is correct |
17 |
Correct |
1 ms |
1884 KB |
Output is correct |
18 |
Correct |
1 ms |
2136 KB |
Output is correct |
19 |
Correct |
1 ms |
2140 KB |
Output is correct |
20 |
Correct |
1 ms |
2140 KB |
Output is correct |
21 |
Correct |
1 ms |
2156 KB |
Output is correct |
22 |
Correct |
1 ms |
2140 KB |
Output is correct |
23 |
Correct |
1 ms |
2140 KB |
Output is correct |
24 |
Correct |
1 ms |
2140 KB |
Output is correct |
25 |
Correct |
1 ms |
2140 KB |
Output is correct |
26 |
Correct |
1 ms |
2140 KB |
Output is correct |
27 |
Correct |
1 ms |
2140 KB |
Output is correct |
28 |
Correct |
1 ms |
2140 KB |
Output is correct |
29 |
Correct |
1 ms |
2140 KB |
Output is correct |
30 |
Correct |
1 ms |
1884 KB |
Output is correct |
31 |
Correct |
1 ms |
1884 KB |
Output is correct |
32 |
Correct |
1 ms |
2076 KB |
Output is correct |
33 |
Correct |
1 ms |
2140 KB |
Output is correct |
34 |
Correct |
1 ms |
2140 KB |
Output is correct |
35 |
Correct |
1 ms |
1884 KB |
Output is correct |
36 |
Correct |
1 ms |
1884 KB |
Output is correct |
37 |
Correct |
1 ms |
1880 KB |
Output is correct |
38 |
Correct |
1 ms |
1880 KB |
Output is correct |
39 |
Correct |
1 ms |
1884 KB |
Output is correct |
40 |
Correct |
1 ms |
1884 KB |
Output is correct |
41 |
Correct |
1 ms |
1884 KB |
Output is correct |
42 |
Correct |
1 ms |
2140 KB |
Output is correct |
43 |
Correct |
1 ms |
2140 KB |
Output is correct |
44 |
Correct |
1 ms |
2140 KB |
Output is correct |
45 |
Correct |
1 ms |
2140 KB |
Output is correct |
46 |
Correct |
1 ms |
1884 KB |
Output is correct |
47 |
Correct |
1 ms |
1368 KB |
Output is correct |
48 |
Correct |
2 ms |
3676 KB |
Output is correct |
49 |
Correct |
2 ms |
3676 KB |
Output is correct |
50 |
Correct |
2 ms |
3420 KB |
Output is correct |
51 |
Correct |
2 ms |
3420 KB |
Output is correct |
52 |
Correct |
2 ms |
3676 KB |
Output is correct |
53 |
Correct |
1 ms |
2396 KB |
Output is correct |
54 |
Correct |
2 ms |
3676 KB |
Output is correct |
55 |
Correct |
2 ms |
3676 KB |
Output is correct |
56 |
Correct |
1 ms |
3420 KB |
Output is correct |
57 |
Correct |
3 ms |
3676 KB |
Output is correct |
58 |
Correct |
2 ms |
3676 KB |
Output is correct |
59 |
Correct |
2 ms |
3420 KB |
Output is correct |
60 |
Correct |
3 ms |
3420 KB |
Output is correct |
61 |
Correct |
2 ms |
3336 KB |
Output is correct |
62 |
Correct |
3 ms |
3420 KB |
Output is correct |
63 |
Correct |
2 ms |
3420 KB |
Output is correct |
64 |
Correct |
3 ms |
3676 KB |
Output is correct |
65 |
Correct |
3 ms |
3420 KB |
Output is correct |
66 |
Correct |
3 ms |
3672 KB |
Output is correct |
67 |
Correct |
3 ms |
3676 KB |
Output is correct |
68 |
Correct |
2 ms |
3676 KB |
Output is correct |
69 |
Correct |
2 ms |
3420 KB |
Output is correct |
70 |
Correct |
2 ms |
3604 KB |
Output is correct |
71 |
Correct |
2 ms |
3676 KB |
Output is correct |
72 |
Correct |
2 ms |
3420 KB |
Output is correct |
73 |
Correct |
2 ms |
3676 KB |
Output is correct |
74 |
Correct |
2 ms |
3420 KB |
Output is correct |
75 |
Correct |
2 ms |
3164 KB |
Output is correct |
76 |
Correct |
2 ms |
3420 KB |
Output is correct |
77 |
Correct |
2 ms |
3588 KB |
Output is correct |
78 |
Correct |
2 ms |
3420 KB |
Output is correct |
79 |
Correct |
2 ms |
3420 KB |
Output is correct |
80 |
Correct |
2 ms |
3420 KB |
Output is correct |
81 |
Correct |
2 ms |
3164 KB |
Output is correct |
82 |
Correct |
2 ms |
3420 KB |
Output is correct |
83 |
Correct |
2 ms |
3420 KB |
Output is correct |
84 |
Correct |
2 ms |
3336 KB |
Output is correct |
85 |
Correct |
2 ms |
3420 KB |
Output is correct |
86 |
Correct |
3 ms |
3420 KB |
Output is correct |
87 |
Correct |
3 ms |
3676 KB |
Output is correct |
88 |
Correct |
2 ms |
3676 KB |
Output is correct |
89 |
Correct |
2 ms |
3672 KB |
Output is correct |
90 |
Correct |
1 ms |
3420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
604 KB |
Output is correct |
2 |
Correct |
0 ms |
604 KB |
Output is correct |
3 |
Correct |
1 ms |
1544 KB |
Output is correct |
4 |
Correct |
11 ms |
12636 KB |
Output is correct |
5 |
Correct |
14 ms |
12804 KB |
Output is correct |
6 |
Correct |
2 ms |
2908 KB |
Output is correct |
7 |
Correct |
15 ms |
12664 KB |
Output is correct |
8 |
Correct |
13 ms |
12800 KB |
Output is correct |
9 |
Correct |
2 ms |
4880 KB |
Output is correct |
10 |
Correct |
9 ms |
12636 KB |
Output is correct |
11 |
Correct |
8 ms |
12632 KB |
Output is correct |
12 |
Correct |
4 ms |
9028 KB |
Output is correct |
13 |
Correct |
7 ms |
12644 KB |
Output is correct |
14 |
Correct |
8 ms |
12632 KB |
Output is correct |
15 |
Correct |
11 ms |
12388 KB |
Output is correct |
16 |
Correct |
14 ms |
12120 KB |
Output is correct |
17 |
Correct |
11 ms |
12636 KB |
Output is correct |
18 |
Correct |
12 ms |
12644 KB |
Output is correct |
19 |
Correct |
14 ms |
12628 KB |
Output is correct |
20 |
Correct |
12 ms |
12644 KB |
Output is correct |
21 |
Correct |
13 ms |
12636 KB |
Output is correct |
22 |
Correct |
12 ms |
12632 KB |
Output is correct |
23 |
Correct |
11 ms |
12640 KB |
Output is correct |
24 |
Correct |
12 ms |
12772 KB |
Output is correct |
25 |
Correct |
12 ms |
12644 KB |
Output is correct |
26 |
Correct |
12 ms |
12600 KB |
Output is correct |
27 |
Correct |
11 ms |
12636 KB |
Output is correct |
28 |
Correct |
11 ms |
12632 KB |
Output is correct |
29 |
Correct |
10 ms |
12656 KB |
Output is correct |
30 |
Correct |
10 ms |
12124 KB |
Output is correct |
31 |
Correct |
10 ms |
12380 KB |
Output is correct |
32 |
Correct |
10 ms |
12708 KB |
Output is correct |
33 |
Correct |
10 ms |
12376 KB |
Output is correct |
34 |
Correct |
8 ms |
11612 KB |
Output is correct |
35 |
Correct |
10 ms |
12068 KB |
Output is correct |
36 |
Correct |
7 ms |
12124 KB |
Output is correct |
37 |
Correct |
9 ms |
12396 KB |
Output is correct |
38 |
Correct |
14 ms |
12552 KB |
Output is correct |
39 |
Correct |
10 ms |
12376 KB |
Output is correct |
40 |
Correct |
10 ms |
12632 KB |
Output is correct |
41 |
Correct |
10 ms |
12636 KB |
Output is correct |
42 |
Correct |
11 ms |
12636 KB |
Output is correct |
43 |
Correct |
11 ms |
12636 KB |
Output is correct |
44 |
Correct |
11 ms |
12804 KB |
Output is correct |
45 |
Correct |
11 ms |
12636 KB |
Output is correct |
46 |
Correct |
4 ms |
12120 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
604 KB |
Output is correct |
2 |
Correct |
0 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
860 KB |
Output is correct |
4 |
Correct |
1 ms |
2140 KB |
Output is correct |
5 |
Correct |
1 ms |
2140 KB |
Output is correct |
6 |
Correct |
1 ms |
1884 KB |
Output is correct |
7 |
Correct |
1 ms |
2020 KB |
Output is correct |
8 |
Correct |
1 ms |
2140 KB |
Output is correct |
9 |
Correct |
1 ms |
1628 KB |
Output is correct |
10 |
Correct |
1 ms |
2044 KB |
Output is correct |
11 |
Correct |
1 ms |
2136 KB |
Output is correct |
12 |
Correct |
0 ms |
600 KB |
Output is correct |
13 |
Correct |
1 ms |
2140 KB |
Output is correct |
14 |
Correct |
1 ms |
2136 KB |
Output is correct |
15 |
Correct |
1 ms |
2140 KB |
Output is correct |
16 |
Correct |
1 ms |
1884 KB |
Output is correct |
17 |
Correct |
1 ms |
1884 KB |
Output is correct |
18 |
Correct |
1 ms |
2136 KB |
Output is correct |
19 |
Correct |
1 ms |
2140 KB |
Output is correct |
20 |
Correct |
1 ms |
2140 KB |
Output is correct |
21 |
Correct |
1 ms |
2156 KB |
Output is correct |
22 |
Correct |
1 ms |
2140 KB |
Output is correct |
23 |
Correct |
1 ms |
2140 KB |
Output is correct |
24 |
Correct |
1 ms |
2140 KB |
Output is correct |
25 |
Correct |
1 ms |
2140 KB |
Output is correct |
26 |
Correct |
1 ms |
2140 KB |
Output is correct |
27 |
Correct |
1 ms |
2140 KB |
Output is correct |
28 |
Correct |
1 ms |
2140 KB |
Output is correct |
29 |
Correct |
1 ms |
2140 KB |
Output is correct |
30 |
Correct |
1 ms |
1884 KB |
Output is correct |
31 |
Correct |
1 ms |
1884 KB |
Output is correct |
32 |
Correct |
1 ms |
2076 KB |
Output is correct |
33 |
Correct |
1 ms |
2140 KB |
Output is correct |
34 |
Correct |
1 ms |
2140 KB |
Output is correct |
35 |
Correct |
1 ms |
1884 KB |
Output is correct |
36 |
Correct |
1 ms |
1884 KB |
Output is correct |
37 |
Correct |
1 ms |
1880 KB |
Output is correct |
38 |
Correct |
1 ms |
1880 KB |
Output is correct |
39 |
Correct |
1 ms |
1884 KB |
Output is correct |
40 |
Correct |
1 ms |
1884 KB |
Output is correct |
41 |
Correct |
1 ms |
1884 KB |
Output is correct |
42 |
Correct |
1 ms |
2140 KB |
Output is correct |
43 |
Correct |
1 ms |
2140 KB |
Output is correct |
44 |
Correct |
1 ms |
2140 KB |
Output is correct |
45 |
Correct |
1 ms |
2140 KB |
Output is correct |
46 |
Correct |
1 ms |
1884 KB |
Output is correct |
47 |
Correct |
1 ms |
1368 KB |
Output is correct |
48 |
Correct |
2 ms |
3676 KB |
Output is correct |
49 |
Correct |
2 ms |
3676 KB |
Output is correct |
50 |
Correct |
2 ms |
3420 KB |
Output is correct |
51 |
Correct |
2 ms |
3420 KB |
Output is correct |
52 |
Correct |
2 ms |
3676 KB |
Output is correct |
53 |
Correct |
1 ms |
2396 KB |
Output is correct |
54 |
Correct |
2 ms |
3676 KB |
Output is correct |
55 |
Correct |
2 ms |
3676 KB |
Output is correct |
56 |
Correct |
1 ms |
3420 KB |
Output is correct |
57 |
Correct |
3 ms |
3676 KB |
Output is correct |
58 |
Correct |
2 ms |
3676 KB |
Output is correct |
59 |
Correct |
2 ms |
3420 KB |
Output is correct |
60 |
Correct |
3 ms |
3420 KB |
Output is correct |
61 |
Correct |
2 ms |
3336 KB |
Output is correct |
62 |
Correct |
3 ms |
3420 KB |
Output is correct |
63 |
Correct |
2 ms |
3420 KB |
Output is correct |
64 |
Correct |
3 ms |
3676 KB |
Output is correct |
65 |
Correct |
3 ms |
3420 KB |
Output is correct |
66 |
Correct |
3 ms |
3672 KB |
Output is correct |
67 |
Correct |
3 ms |
3676 KB |
Output is correct |
68 |
Correct |
2 ms |
3676 KB |
Output is correct |
69 |
Correct |
2 ms |
3420 KB |
Output is correct |
70 |
Correct |
2 ms |
3604 KB |
Output is correct |
71 |
Correct |
2 ms |
3676 KB |
Output is correct |
72 |
Correct |
2 ms |
3420 KB |
Output is correct |
73 |
Correct |
2 ms |
3676 KB |
Output is correct |
74 |
Correct |
2 ms |
3420 KB |
Output is correct |
75 |
Correct |
2 ms |
3164 KB |
Output is correct |
76 |
Correct |
2 ms |
3420 KB |
Output is correct |
77 |
Correct |
2 ms |
3588 KB |
Output is correct |
78 |
Correct |
2 ms |
3420 KB |
Output is correct |
79 |
Correct |
2 ms |
3420 KB |
Output is correct |
80 |
Correct |
2 ms |
3420 KB |
Output is correct |
81 |
Correct |
2 ms |
3164 KB |
Output is correct |
82 |
Correct |
2 ms |
3420 KB |
Output is correct |
83 |
Correct |
2 ms |
3420 KB |
Output is correct |
84 |
Correct |
2 ms |
3336 KB |
Output is correct |
85 |
Correct |
2 ms |
3420 KB |
Output is correct |
86 |
Correct |
3 ms |
3420 KB |
Output is correct |
87 |
Correct |
3 ms |
3676 KB |
Output is correct |
88 |
Correct |
2 ms |
3676 KB |
Output is correct |
89 |
Correct |
2 ms |
3672 KB |
Output is correct |
90 |
Correct |
1 ms |
3420 KB |
Output is correct |
91 |
Correct |
1 ms |
1544 KB |
Output is correct |
92 |
Correct |
11 ms |
12636 KB |
Output is correct |
93 |
Correct |
14 ms |
12804 KB |
Output is correct |
94 |
Correct |
2 ms |
2908 KB |
Output is correct |
95 |
Correct |
15 ms |
12664 KB |
Output is correct |
96 |
Correct |
13 ms |
12800 KB |
Output is correct |
97 |
Correct |
2 ms |
4880 KB |
Output is correct |
98 |
Correct |
9 ms |
12636 KB |
Output is correct |
99 |
Correct |
8 ms |
12632 KB |
Output is correct |
100 |
Correct |
4 ms |
9028 KB |
Output is correct |
101 |
Correct |
7 ms |
12644 KB |
Output is correct |
102 |
Correct |
8 ms |
12632 KB |
Output is correct |
103 |
Correct |
11 ms |
12388 KB |
Output is correct |
104 |
Correct |
14 ms |
12120 KB |
Output is correct |
105 |
Correct |
11 ms |
12636 KB |
Output is correct |
106 |
Correct |
12 ms |
12644 KB |
Output is correct |
107 |
Correct |
14 ms |
12628 KB |
Output is correct |
108 |
Correct |
12 ms |
12644 KB |
Output is correct |
109 |
Correct |
13 ms |
12636 KB |
Output is correct |
110 |
Correct |
12 ms |
12632 KB |
Output is correct |
111 |
Correct |
11 ms |
12640 KB |
Output is correct |
112 |
Correct |
12 ms |
12772 KB |
Output is correct |
113 |
Correct |
12 ms |
12644 KB |
Output is correct |
114 |
Correct |
12 ms |
12600 KB |
Output is correct |
115 |
Correct |
11 ms |
12636 KB |
Output is correct |
116 |
Correct |
11 ms |
12632 KB |
Output is correct |
117 |
Correct |
10 ms |
12656 KB |
Output is correct |
118 |
Correct |
10 ms |
12124 KB |
Output is correct |
119 |
Correct |
10 ms |
12380 KB |
Output is correct |
120 |
Correct |
10 ms |
12708 KB |
Output is correct |
121 |
Correct |
10 ms |
12376 KB |
Output is correct |
122 |
Correct |
8 ms |
11612 KB |
Output is correct |
123 |
Correct |
10 ms |
12068 KB |
Output is correct |
124 |
Correct |
7 ms |
12124 KB |
Output is correct |
125 |
Correct |
9 ms |
12396 KB |
Output is correct |
126 |
Correct |
14 ms |
12552 KB |
Output is correct |
127 |
Correct |
10 ms |
12376 KB |
Output is correct |
128 |
Correct |
10 ms |
12632 KB |
Output is correct |
129 |
Correct |
10 ms |
12636 KB |
Output is correct |
130 |
Correct |
11 ms |
12636 KB |
Output is correct |
131 |
Correct |
11 ms |
12636 KB |
Output is correct |
132 |
Correct |
11 ms |
12804 KB |
Output is correct |
133 |
Correct |
11 ms |
12636 KB |
Output is correct |
134 |
Correct |
4 ms |
12120 KB |
Output is correct |
135 |
Correct |
13 ms |
8796 KB |
Output is correct |
136 |
Correct |
53 ms |
16004 KB |
Output is correct |
137 |
Correct |
77 ms |
15960 KB |
Output is correct |
138 |
Correct |
8 ms |
7512 KB |
Output is correct |
139 |
Correct |
40 ms |
15960 KB |
Output is correct |
140 |
Correct |
60 ms |
15964 KB |
Output is correct |
141 |
Correct |
18 ms |
12892 KB |
Output is correct |
142 |
Correct |
46 ms |
16012 KB |
Output is correct |
143 |
Correct |
53 ms |
15964 KB |
Output is correct |
144 |
Correct |
1 ms |
1628 KB |
Output is correct |
145 |
Correct |
37 ms |
15960 KB |
Output is correct |
146 |
Correct |
43 ms |
15964 KB |
Output is correct |
147 |
Correct |
63 ms |
15704 KB |
Output is correct |
148 |
Correct |
73 ms |
14940 KB |
Output is correct |
149 |
Correct |
60 ms |
14680 KB |
Output is correct |
150 |
Correct |
71 ms |
15960 KB |
Output is correct |
151 |
Correct |
72 ms |
15964 KB |
Output is correct |
152 |
Correct |
72 ms |
15960 KB |
Output is correct |
153 |
Correct |
71 ms |
15960 KB |
Output is correct |
154 |
Correct |
72 ms |
15964 KB |
Output is correct |
155 |
Correct |
76 ms |
15964 KB |
Output is correct |
156 |
Correct |
51 ms |
15960 KB |
Output is correct |
157 |
Correct |
57 ms |
15964 KB |
Output is correct |
158 |
Correct |
45 ms |
15964 KB |
Output is correct |
159 |
Correct |
46 ms |
15964 KB |
Output is correct |
160 |
Correct |
45 ms |
15964 KB |
Output is correct |
161 |
Correct |
45 ms |
15964 KB |
Output is correct |
162 |
Correct |
12 ms |
14940 KB |
Output is correct |
163 |
Correct |
12 ms |
14860 KB |
Output is correct |
164 |
Correct |
17 ms |
15452 KB |
Output is correct |
165 |
Correct |
15 ms |
14424 KB |
Output is correct |
166 |
Correct |
14 ms |
15228 KB |
Output is correct |
167 |
Correct |
13 ms |
14608 KB |
Output is correct |
168 |
Correct |
25 ms |
15064 KB |
Output is correct |
169 |
Correct |
38 ms |
15452 KB |
Output is correct |
170 |
Correct |
40 ms |
15708 KB |
Output is correct |
171 |
Correct |
37 ms |
14920 KB |
Output is correct |
172 |
Correct |
34 ms |
14940 KB |
Output is correct |
173 |
Correct |
39 ms |
15196 KB |
Output is correct |
174 |
Correct |
75 ms |
15964 KB |
Output is correct |
175 |
Correct |
72 ms |
15964 KB |
Output is correct |
176 |
Correct |
71 ms |
15964 KB |
Output is correct |
177 |
Correct |
72 ms |
15960 KB |
Output is correct |
178 |
Correct |
7 ms |
15448 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
604 KB |
Output is correct |
2 |
Correct |
0 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
860 KB |
Output is correct |
4 |
Correct |
1 ms |
2140 KB |
Output is correct |
5 |
Correct |
1 ms |
2140 KB |
Output is correct |
6 |
Correct |
1 ms |
1884 KB |
Output is correct |
7 |
Correct |
1 ms |
2020 KB |
Output is correct |
8 |
Correct |
1 ms |
2140 KB |
Output is correct |
9 |
Correct |
1 ms |
1628 KB |
Output is correct |
10 |
Correct |
1 ms |
2044 KB |
Output is correct |
11 |
Correct |
1 ms |
2136 KB |
Output is correct |
12 |
Correct |
0 ms |
600 KB |
Output is correct |
13 |
Correct |
1 ms |
2140 KB |
Output is correct |
14 |
Correct |
1 ms |
2136 KB |
Output is correct |
15 |
Correct |
1 ms |
2140 KB |
Output is correct |
16 |
Correct |
1 ms |
1884 KB |
Output is correct |
17 |
Correct |
1 ms |
1884 KB |
Output is correct |
18 |
Correct |
1 ms |
2136 KB |
Output is correct |
19 |
Correct |
1 ms |
2140 KB |
Output is correct |
20 |
Correct |
1 ms |
2140 KB |
Output is correct |
21 |
Correct |
1 ms |
2156 KB |
Output is correct |
22 |
Correct |
1 ms |
2140 KB |
Output is correct |
23 |
Correct |
1 ms |
2140 KB |
Output is correct |
24 |
Correct |
1 ms |
2140 KB |
Output is correct |
25 |
Correct |
1 ms |
2140 KB |
Output is correct |
26 |
Correct |
1 ms |
2140 KB |
Output is correct |
27 |
Correct |
1 ms |
2140 KB |
Output is correct |
28 |
Correct |
1 ms |
2140 KB |
Output is correct |
29 |
Correct |
1 ms |
2140 KB |
Output is correct |
30 |
Correct |
1 ms |
1884 KB |
Output is correct |
31 |
Correct |
1 ms |
1884 KB |
Output is correct |
32 |
Correct |
1 ms |
2076 KB |
Output is correct |
33 |
Correct |
1 ms |
2140 KB |
Output is correct |
34 |
Correct |
1 ms |
2140 KB |
Output is correct |
35 |
Correct |
1 ms |
1884 KB |
Output is correct |
36 |
Correct |
1 ms |
1884 KB |
Output is correct |
37 |
Correct |
1 ms |
1880 KB |
Output is correct |
38 |
Correct |
1 ms |
1880 KB |
Output is correct |
39 |
Correct |
1 ms |
1884 KB |
Output is correct |
40 |
Correct |
1 ms |
1884 KB |
Output is correct |
41 |
Correct |
1 ms |
1884 KB |
Output is correct |
42 |
Correct |
1 ms |
2140 KB |
Output is correct |
43 |
Correct |
1 ms |
2140 KB |
Output is correct |
44 |
Correct |
1 ms |
2140 KB |
Output is correct |
45 |
Correct |
1 ms |
2140 KB |
Output is correct |
46 |
Correct |
1 ms |
1884 KB |
Output is correct |
47 |
Correct |
1 ms |
1368 KB |
Output is correct |
48 |
Correct |
2 ms |
3676 KB |
Output is correct |
49 |
Correct |
2 ms |
3676 KB |
Output is correct |
50 |
Correct |
2 ms |
3420 KB |
Output is correct |
51 |
Correct |
2 ms |
3420 KB |
Output is correct |
52 |
Correct |
2 ms |
3676 KB |
Output is correct |
53 |
Correct |
1 ms |
2396 KB |
Output is correct |
54 |
Correct |
2 ms |
3676 KB |
Output is correct |
55 |
Correct |
2 ms |
3676 KB |
Output is correct |
56 |
Correct |
1 ms |
3420 KB |
Output is correct |
57 |
Correct |
3 ms |
3676 KB |
Output is correct |
58 |
Correct |
2 ms |
3676 KB |
Output is correct |
59 |
Correct |
2 ms |
3420 KB |
Output is correct |
60 |
Correct |
3 ms |
3420 KB |
Output is correct |
61 |
Correct |
2 ms |
3336 KB |
Output is correct |
62 |
Correct |
3 ms |
3420 KB |
Output is correct |
63 |
Correct |
2 ms |
3420 KB |
Output is correct |
64 |
Correct |
3 ms |
3676 KB |
Output is correct |
65 |
Correct |
3 ms |
3420 KB |
Output is correct |
66 |
Correct |
3 ms |
3672 KB |
Output is correct |
67 |
Correct |
3 ms |
3676 KB |
Output is correct |
68 |
Correct |
2 ms |
3676 KB |
Output is correct |
69 |
Correct |
2 ms |
3420 KB |
Output is correct |
70 |
Correct |
2 ms |
3604 KB |
Output is correct |
71 |
Correct |
2 ms |
3676 KB |
Output is correct |
72 |
Correct |
2 ms |
3420 KB |
Output is correct |
73 |
Correct |
2 ms |
3676 KB |
Output is correct |
74 |
Correct |
2 ms |
3420 KB |
Output is correct |
75 |
Correct |
2 ms |
3164 KB |
Output is correct |
76 |
Correct |
2 ms |
3420 KB |
Output is correct |
77 |
Correct |
2 ms |
3588 KB |
Output is correct |
78 |
Correct |
2 ms |
3420 KB |
Output is correct |
79 |
Correct |
2 ms |
3420 KB |
Output is correct |
80 |
Correct |
2 ms |
3420 KB |
Output is correct |
81 |
Correct |
2 ms |
3164 KB |
Output is correct |
82 |
Correct |
2 ms |
3420 KB |
Output is correct |
83 |
Correct |
2 ms |
3420 KB |
Output is correct |
84 |
Correct |
2 ms |
3336 KB |
Output is correct |
85 |
Correct |
2 ms |
3420 KB |
Output is correct |
86 |
Correct |
3 ms |
3420 KB |
Output is correct |
87 |
Correct |
3 ms |
3676 KB |
Output is correct |
88 |
Correct |
2 ms |
3676 KB |
Output is correct |
89 |
Correct |
2 ms |
3672 KB |
Output is correct |
90 |
Correct |
1 ms |
3420 KB |
Output is correct |
91 |
Correct |
1 ms |
1544 KB |
Output is correct |
92 |
Correct |
11 ms |
12636 KB |
Output is correct |
93 |
Correct |
14 ms |
12804 KB |
Output is correct |
94 |
Correct |
2 ms |
2908 KB |
Output is correct |
95 |
Correct |
15 ms |
12664 KB |
Output is correct |
96 |
Correct |
13 ms |
12800 KB |
Output is correct |
97 |
Correct |
2 ms |
4880 KB |
Output is correct |
98 |
Correct |
9 ms |
12636 KB |
Output is correct |
99 |
Correct |
8 ms |
12632 KB |
Output is correct |
100 |
Correct |
4 ms |
9028 KB |
Output is correct |
101 |
Correct |
7 ms |
12644 KB |
Output is correct |
102 |
Correct |
8 ms |
12632 KB |
Output is correct |
103 |
Correct |
11 ms |
12388 KB |
Output is correct |
104 |
Correct |
14 ms |
12120 KB |
Output is correct |
105 |
Correct |
11 ms |
12636 KB |
Output is correct |
106 |
Correct |
12 ms |
12644 KB |
Output is correct |
107 |
Correct |
14 ms |
12628 KB |
Output is correct |
108 |
Correct |
12 ms |
12644 KB |
Output is correct |
109 |
Correct |
13 ms |
12636 KB |
Output is correct |
110 |
Correct |
12 ms |
12632 KB |
Output is correct |
111 |
Correct |
11 ms |
12640 KB |
Output is correct |
112 |
Correct |
12 ms |
12772 KB |
Output is correct |
113 |
Correct |
12 ms |
12644 KB |
Output is correct |
114 |
Correct |
12 ms |
12600 KB |
Output is correct |
115 |
Correct |
11 ms |
12636 KB |
Output is correct |
116 |
Correct |
11 ms |
12632 KB |
Output is correct |
117 |
Correct |
10 ms |
12656 KB |
Output is correct |
118 |
Correct |
10 ms |
12124 KB |
Output is correct |
119 |
Correct |
10 ms |
12380 KB |
Output is correct |
120 |
Correct |
10 ms |
12708 KB |
Output is correct |
121 |
Correct |
10 ms |
12376 KB |
Output is correct |
122 |
Correct |
8 ms |
11612 KB |
Output is correct |
123 |
Correct |
10 ms |
12068 KB |
Output is correct |
124 |
Correct |
7 ms |
12124 KB |
Output is correct |
125 |
Correct |
9 ms |
12396 KB |
Output is correct |
126 |
Correct |
14 ms |
12552 KB |
Output is correct |
127 |
Correct |
10 ms |
12376 KB |
Output is correct |
128 |
Correct |
10 ms |
12632 KB |
Output is correct |
129 |
Correct |
10 ms |
12636 KB |
Output is correct |
130 |
Correct |
11 ms |
12636 KB |
Output is correct |
131 |
Correct |
11 ms |
12636 KB |
Output is correct |
132 |
Correct |
11 ms |
12804 KB |
Output is correct |
133 |
Correct |
11 ms |
12636 KB |
Output is correct |
134 |
Correct |
4 ms |
12120 KB |
Output is correct |
135 |
Correct |
13 ms |
8796 KB |
Output is correct |
136 |
Correct |
53 ms |
16004 KB |
Output is correct |
137 |
Correct |
77 ms |
15960 KB |
Output is correct |
138 |
Correct |
8 ms |
7512 KB |
Output is correct |
139 |
Correct |
40 ms |
15960 KB |
Output is correct |
140 |
Correct |
60 ms |
15964 KB |
Output is correct |
141 |
Correct |
18 ms |
12892 KB |
Output is correct |
142 |
Correct |
46 ms |
16012 KB |
Output is correct |
143 |
Correct |
53 ms |
15964 KB |
Output is correct |
144 |
Correct |
1 ms |
1628 KB |
Output is correct |
145 |
Correct |
37 ms |
15960 KB |
Output is correct |
146 |
Correct |
43 ms |
15964 KB |
Output is correct |
147 |
Correct |
63 ms |
15704 KB |
Output is correct |
148 |
Correct |
73 ms |
14940 KB |
Output is correct |
149 |
Correct |
60 ms |
14680 KB |
Output is correct |
150 |
Correct |
71 ms |
15960 KB |
Output is correct |
151 |
Correct |
72 ms |
15964 KB |
Output is correct |
152 |
Correct |
72 ms |
15960 KB |
Output is correct |
153 |
Correct |
71 ms |
15960 KB |
Output is correct |
154 |
Correct |
72 ms |
15964 KB |
Output is correct |
155 |
Correct |
76 ms |
15964 KB |
Output is correct |
156 |
Correct |
51 ms |
15960 KB |
Output is correct |
157 |
Correct |
57 ms |
15964 KB |
Output is correct |
158 |
Correct |
45 ms |
15964 KB |
Output is correct |
159 |
Correct |
46 ms |
15964 KB |
Output is correct |
160 |
Correct |
45 ms |
15964 KB |
Output is correct |
161 |
Correct |
45 ms |
15964 KB |
Output is correct |
162 |
Correct |
12 ms |
14940 KB |
Output is correct |
163 |
Correct |
12 ms |
14860 KB |
Output is correct |
164 |
Correct |
17 ms |
15452 KB |
Output is correct |
165 |
Correct |
15 ms |
14424 KB |
Output is correct |
166 |
Correct |
14 ms |
15228 KB |
Output is correct |
167 |
Correct |
13 ms |
14608 KB |
Output is correct |
168 |
Correct |
25 ms |
15064 KB |
Output is correct |
169 |
Correct |
38 ms |
15452 KB |
Output is correct |
170 |
Correct |
40 ms |
15708 KB |
Output is correct |
171 |
Correct |
37 ms |
14920 KB |
Output is correct |
172 |
Correct |
34 ms |
14940 KB |
Output is correct |
173 |
Correct |
39 ms |
15196 KB |
Output is correct |
174 |
Correct |
75 ms |
15964 KB |
Output is correct |
175 |
Correct |
72 ms |
15964 KB |
Output is correct |
176 |
Correct |
71 ms |
15964 KB |
Output is correct |
177 |
Correct |
72 ms |
15960 KB |
Output is correct |
178 |
Correct |
7 ms |
15448 KB |
Output is correct |
179 |
Correct |
230 ms |
43984 KB |
Output is correct |
180 |
Execution timed out |
1545 ms |
80212 KB |
Time limit exceeded |
181 |
Halted |
0 ms |
0 KB |
- |