#include <bits/stdc++.h>
#define div /
#define ll long long
#define fore(i, l, r) for(int i=int(l); i<int(r); i++)
#define sz(a) int((a).size())
using namespace std;
const int INF = 1e9;
const int MX = 5e5 + 23;
const int MOD = 1000000007;
const int N = 1e6;
int w,h,k,l,xh,yh,xv,yv;
char grid[1505][1505];
int up[1505][1505],down[1505][1505],lijevo[1505][1505],desno[1505][1505],visited[1505][1505],ans;
void floodfill(int x, int y) {
if(grid[x][y] == '*') {
ans=1;
return;
}
if(visited[x][y])
return;
visited[x][y] = 1;
// pomjeranje u desno
if(y < w-1)
if(grid[x][y+1] != 'X' and min(up[x][y],up[x][y+1])+min(down[x][y],down[x][y+1])-1 >= l)
floodfill(x,y+1);
// pomjeranje u lijevo
if(y > 0)
if(grid[x][y-1] != 'X' and min(up[x][y],up[x][y-1])+min(down[x][y],down[x][y-1])-1 >= l)
floodfill(x,y-1);
// pomjeranje gore
if(x > 0)
if(grid[x-1][y] != 'X' and min(lijevo[x][y],lijevo[x-1][y])+min(desno[x][y],desno[x-1][y])-1 >= k)
floodfill(x-1,y);
// pomjeranje dole
if(x < h-1)
if(grid[x+1][y] != 'X' and min(lijevo[x][y],lijevo[x+1][y])+min(desno[x][y],desno[x+1][y])-1 >= k)
floodfill(x+1,y);
}
void solve() {
cin >> w >> h >> k >> l;
cin >> xh >> yh >> xv >> yv;
fore(i,0,h)
fore(j,0,w)
cin >> grid[i][j];
fore(j,0,w) { // racunanje up i down
fore(i,0,h) {
if(grid[i][j] == 'X')
up[i][j] = 0;
else if(i==0)
up[i][j] = 1;
else if(i)
up[i][j] = up[i-1][j]+1;
}
for(int i=h-1; i>=0; i--) {
if(grid[i][j] == 'X')
down[i][j] = 0;
else if(i == h-1)
down[i][j] = 1;
else if(i < h-1)
down[i][j] = down[i+1][j]+1;
}
}
fore(i,0,h) { // racunanje left i desno
fore(j,0,w) {
if(grid[i][j] == 'X')
desno[i][j] = 0;
else if(j==0)
desno[i][j] = 1;
else if(j)
desno[i][j] = desno[i][j-1]+1;
}
for(int j=w-1; j>=0; j--) {
if(grid[i][j] == 'X')
lijevo[i][j] = 0;
else if(j == w-1)
lijevo[i][j] = 1;
else if(j < w-1)
lijevo[i][j] = lijevo[i][j+1]+1;
}
}
floodfill(yh,xv);
if(ans)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
int main() {
ios::sync_with_stdio(false);
int t=1;
while(t--) solve();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
10588 KB |
Output is correct |
2 |
Correct |
1 ms |
10588 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
10588 KB |
Output is correct |
2 |
Correct |
1 ms |
10588 KB |
Output is correct |
3 |
Correct |
1 ms |
10588 KB |
Output is correct |
4 |
Correct |
2 ms |
13148 KB |
Output is correct |
5 |
Correct |
2 ms |
12892 KB |
Output is correct |
6 |
Correct |
2 ms |
12892 KB |
Output is correct |
7 |
Correct |
2 ms |
12632 KB |
Output is correct |
8 |
Correct |
2 ms |
12636 KB |
Output is correct |
9 |
Correct |
1 ms |
10588 KB |
Output is correct |
10 |
Correct |
1 ms |
12636 KB |
Output is correct |
11 |
Correct |
2 ms |
12636 KB |
Output is correct |
12 |
Correct |
2 ms |
10844 KB |
Output is correct |
13 |
Correct |
2 ms |
12636 KB |
Output is correct |
14 |
Correct |
2 ms |
12636 KB |
Output is correct |
15 |
Correct |
2 ms |
13148 KB |
Output is correct |
16 |
Correct |
1 ms |
10844 KB |
Output is correct |
17 |
Correct |
1 ms |
12892 KB |
Output is correct |
18 |
Correct |
2 ms |
13148 KB |
Output is correct |
19 |
Correct |
2 ms |
13148 KB |
Output is correct |
20 |
Correct |
1 ms |
13148 KB |
Output is correct |
21 |
Correct |
1 ms |
13148 KB |
Output is correct |
22 |
Correct |
1 ms |
13148 KB |
Output is correct |
23 |
Correct |
2 ms |
13144 KB |
Output is correct |
24 |
Correct |
2 ms |
13148 KB |
Output is correct |
25 |
Correct |
2 ms |
13148 KB |
Output is correct |
26 |
Correct |
1 ms |
13148 KB |
Output is correct |
27 |
Correct |
1 ms |
13032 KB |
Output is correct |
28 |
Correct |
2 ms |
13148 KB |
Output is correct |
29 |
Correct |
2 ms |
13148 KB |
Output is correct |
30 |
Correct |
1 ms |
13148 KB |
Output is correct |
31 |
Correct |
1 ms |
13148 KB |
Output is correct |
32 |
Correct |
2 ms |
13148 KB |
Output is correct |
33 |
Correct |
2 ms |
13008 KB |
Output is correct |
34 |
Correct |
2 ms |
13148 KB |
Output is correct |
35 |
Correct |
2 ms |
13148 KB |
Output is correct |
36 |
Correct |
2 ms |
12636 KB |
Output is correct |
37 |
Correct |
2 ms |
10840 KB |
Output is correct |
38 |
Correct |
1 ms |
12892 KB |
Output is correct |
39 |
Correct |
2 ms |
12892 KB |
Output is correct |
40 |
Correct |
2 ms |
12892 KB |
Output is correct |
41 |
Correct |
1 ms |
12892 KB |
Output is correct |
42 |
Correct |
1 ms |
13148 KB |
Output is correct |
43 |
Correct |
2 ms |
13148 KB |
Output is correct |
44 |
Correct |
2 ms |
12892 KB |
Output is correct |
45 |
Correct |
2 ms |
13148 KB |
Output is correct |
46 |
Correct |
1 ms |
10588 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
10588 KB |
Output is correct |
2 |
Correct |
1 ms |
10588 KB |
Output is correct |
3 |
Correct |
1 ms |
10588 KB |
Output is correct |
4 |
Correct |
2 ms |
13148 KB |
Output is correct |
5 |
Correct |
2 ms |
12892 KB |
Output is correct |
6 |
Correct |
2 ms |
12892 KB |
Output is correct |
7 |
Correct |
2 ms |
12632 KB |
Output is correct |
8 |
Correct |
2 ms |
12636 KB |
Output is correct |
9 |
Correct |
1 ms |
10588 KB |
Output is correct |
10 |
Correct |
1 ms |
12636 KB |
Output is correct |
11 |
Correct |
2 ms |
12636 KB |
Output is correct |
12 |
Correct |
2 ms |
10844 KB |
Output is correct |
13 |
Correct |
2 ms |
12636 KB |
Output is correct |
14 |
Correct |
2 ms |
12636 KB |
Output is correct |
15 |
Correct |
2 ms |
13148 KB |
Output is correct |
16 |
Correct |
1 ms |
10844 KB |
Output is correct |
17 |
Correct |
1 ms |
12892 KB |
Output is correct |
18 |
Correct |
2 ms |
13148 KB |
Output is correct |
19 |
Correct |
2 ms |
13148 KB |
Output is correct |
20 |
Correct |
1 ms |
13148 KB |
Output is correct |
21 |
Correct |
1 ms |
13148 KB |
Output is correct |
22 |
Correct |
1 ms |
13148 KB |
Output is correct |
23 |
Correct |
2 ms |
13144 KB |
Output is correct |
24 |
Correct |
2 ms |
13148 KB |
Output is correct |
25 |
Correct |
2 ms |
13148 KB |
Output is correct |
26 |
Correct |
1 ms |
13148 KB |
Output is correct |
27 |
Correct |
1 ms |
13032 KB |
Output is correct |
28 |
Correct |
2 ms |
13148 KB |
Output is correct |
29 |
Correct |
2 ms |
13148 KB |
Output is correct |
30 |
Correct |
1 ms |
13148 KB |
Output is correct |
31 |
Correct |
1 ms |
13148 KB |
Output is correct |
32 |
Correct |
2 ms |
13148 KB |
Output is correct |
33 |
Correct |
2 ms |
13008 KB |
Output is correct |
34 |
Correct |
2 ms |
13148 KB |
Output is correct |
35 |
Correct |
2 ms |
13148 KB |
Output is correct |
36 |
Correct |
2 ms |
12636 KB |
Output is correct |
37 |
Correct |
2 ms |
10840 KB |
Output is correct |
38 |
Correct |
1 ms |
12892 KB |
Output is correct |
39 |
Correct |
2 ms |
12892 KB |
Output is correct |
40 |
Correct |
2 ms |
12892 KB |
Output is correct |
41 |
Correct |
1 ms |
12892 KB |
Output is correct |
42 |
Correct |
1 ms |
13148 KB |
Output is correct |
43 |
Correct |
2 ms |
13148 KB |
Output is correct |
44 |
Correct |
2 ms |
12892 KB |
Output is correct |
45 |
Correct |
2 ms |
13148 KB |
Output is correct |
46 |
Correct |
1 ms |
10588 KB |
Output is correct |
47 |
Correct |
1 ms |
10844 KB |
Output is correct |
48 |
Correct |
2 ms |
12772 KB |
Output is correct |
49 |
Correct |
2 ms |
12892 KB |
Output is correct |
50 |
Correct |
1 ms |
12636 KB |
Output is correct |
51 |
Correct |
2 ms |
12636 KB |
Output is correct |
52 |
Correct |
2 ms |
12636 KB |
Output is correct |
53 |
Correct |
2 ms |
12636 KB |
Output is correct |
54 |
Correct |
2 ms |
12636 KB |
Output is correct |
55 |
Correct |
2 ms |
12636 KB |
Output is correct |
56 |
Correct |
2 ms |
12636 KB |
Output is correct |
57 |
Correct |
2 ms |
12636 KB |
Output is correct |
58 |
Correct |
2 ms |
12632 KB |
Output is correct |
59 |
Correct |
2 ms |
13404 KB |
Output is correct |
60 |
Correct |
3 ms |
13404 KB |
Output is correct |
61 |
Correct |
2 ms |
13400 KB |
Output is correct |
62 |
Correct |
3 ms |
13916 KB |
Output is correct |
63 |
Correct |
3 ms |
13916 KB |
Output is correct |
64 |
Correct |
3 ms |
13916 KB |
Output is correct |
65 |
Correct |
2 ms |
13916 KB |
Output is correct |
66 |
Correct |
2 ms |
13800 KB |
Output is correct |
67 |
Correct |
3 ms |
13916 KB |
Output is correct |
68 |
Correct |
2 ms |
13660 KB |
Output is correct |
69 |
Correct |
3 ms |
13612 KB |
Output is correct |
70 |
Correct |
2 ms |
13660 KB |
Output is correct |
71 |
Correct |
2 ms |
13660 KB |
Output is correct |
72 |
Correct |
3 ms |
13660 KB |
Output is correct |
73 |
Correct |
3 ms |
13736 KB |
Output is correct |
74 |
Correct |
3 ms |
13912 KB |
Output is correct |
75 |
Correct |
3 ms |
13912 KB |
Output is correct |
76 |
Correct |
3 ms |
13916 KB |
Output is correct |
77 |
Correct |
3 ms |
13916 KB |
Output is correct |
78 |
Correct |
3 ms |
13868 KB |
Output is correct |
79 |
Correct |
2 ms |
13788 KB |
Output is correct |
80 |
Correct |
1 ms |
12632 KB |
Output is correct |
81 |
Correct |
2 ms |
13148 KB |
Output is correct |
82 |
Correct |
2 ms |
13148 KB |
Output is correct |
83 |
Correct |
2 ms |
13148 KB |
Output is correct |
84 |
Correct |
2 ms |
13148 KB |
Output is correct |
85 |
Correct |
2 ms |
13148 KB |
Output is correct |
86 |
Correct |
2 ms |
13660 KB |
Output is correct |
87 |
Correct |
2 ms |
13660 KB |
Output is correct |
88 |
Correct |
3 ms |
13656 KB |
Output is correct |
89 |
Correct |
3 ms |
13656 KB |
Output is correct |
90 |
Correct |
1 ms |
12632 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
10588 KB |
Output is correct |
2 |
Correct |
1 ms |
10588 KB |
Output is correct |
3 |
Correct |
1 ms |
11100 KB |
Output is correct |
4 |
Correct |
10 ms |
26480 KB |
Output is correct |
5 |
Correct |
9 ms |
24412 KB |
Output is correct |
6 |
Correct |
2 ms |
13400 KB |
Output is correct |
7 |
Correct |
8 ms |
23388 KB |
Output is correct |
8 |
Correct |
10 ms |
24784 KB |
Output is correct |
9 |
Correct |
2 ms |
12632 KB |
Output is correct |
10 |
Correct |
4 ms |
19036 KB |
Output is correct |
11 |
Correct |
4 ms |
18996 KB |
Output is correct |
12 |
Correct |
3 ms |
14684 KB |
Output is correct |
13 |
Correct |
4 ms |
18780 KB |
Output is correct |
14 |
Correct |
4 ms |
18780 KB |
Output is correct |
15 |
Correct |
14 ms |
29340 KB |
Output is correct |
16 |
Correct |
11 ms |
27484 KB |
Output is correct |
17 |
Correct |
9 ms |
27996 KB |
Output is correct |
18 |
Correct |
11 ms |
30300 KB |
Output is correct |
19 |
Correct |
12 ms |
30284 KB |
Output is correct |
20 |
Correct |
12 ms |
30296 KB |
Output is correct |
21 |
Correct |
13 ms |
30168 KB |
Output is correct |
22 |
Correct |
12 ms |
30296 KB |
Output is correct |
23 |
Correct |
12 ms |
30252 KB |
Output is correct |
24 |
Correct |
11 ms |
27932 KB |
Output is correct |
25 |
Correct |
11 ms |
27736 KB |
Output is correct |
26 |
Correct |
11 ms |
27704 KB |
Output is correct |
27 |
Correct |
10 ms |
27740 KB |
Output is correct |
28 |
Correct |
10 ms |
27740 KB |
Output is correct |
29 |
Correct |
12 ms |
27740 KB |
Output is correct |
30 |
Correct |
12 ms |
29784 KB |
Output is correct |
31 |
Correct |
12 ms |
29532 KB |
Output is correct |
32 |
Correct |
12 ms |
30020 KB |
Output is correct |
33 |
Correct |
11 ms |
29020 KB |
Output is correct |
34 |
Correct |
10 ms |
26972 KB |
Output is correct |
35 |
Correct |
11 ms |
26972 KB |
Output is correct |
36 |
Correct |
4 ms |
19032 KB |
Output is correct |
37 |
Correct |
6 ms |
22832 KB |
Output is correct |
38 |
Correct |
7 ms |
22620 KB |
Output is correct |
39 |
Correct |
7 ms |
22828 KB |
Output is correct |
40 |
Correct |
7 ms |
22876 KB |
Output is correct |
41 |
Correct |
7 ms |
22620 KB |
Output is correct |
42 |
Correct |
10 ms |
27592 KB |
Output is correct |
43 |
Correct |
11 ms |
27480 KB |
Output is correct |
44 |
Correct |
10 ms |
27992 KB |
Output is correct |
45 |
Correct |
11 ms |
28252 KB |
Output is correct |
46 |
Correct |
3 ms |
16732 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
10588 KB |
Output is correct |
2 |
Correct |
1 ms |
10588 KB |
Output is correct |
3 |
Correct |
1 ms |
10588 KB |
Output is correct |
4 |
Correct |
2 ms |
13148 KB |
Output is correct |
5 |
Correct |
2 ms |
12892 KB |
Output is correct |
6 |
Correct |
2 ms |
12892 KB |
Output is correct |
7 |
Correct |
2 ms |
12632 KB |
Output is correct |
8 |
Correct |
2 ms |
12636 KB |
Output is correct |
9 |
Correct |
1 ms |
10588 KB |
Output is correct |
10 |
Correct |
1 ms |
12636 KB |
Output is correct |
11 |
Correct |
2 ms |
12636 KB |
Output is correct |
12 |
Correct |
2 ms |
10844 KB |
Output is correct |
13 |
Correct |
2 ms |
12636 KB |
Output is correct |
14 |
Correct |
2 ms |
12636 KB |
Output is correct |
15 |
Correct |
2 ms |
13148 KB |
Output is correct |
16 |
Correct |
1 ms |
10844 KB |
Output is correct |
17 |
Correct |
1 ms |
12892 KB |
Output is correct |
18 |
Correct |
2 ms |
13148 KB |
Output is correct |
19 |
Correct |
2 ms |
13148 KB |
Output is correct |
20 |
Correct |
1 ms |
13148 KB |
Output is correct |
21 |
Correct |
1 ms |
13148 KB |
Output is correct |
22 |
Correct |
1 ms |
13148 KB |
Output is correct |
23 |
Correct |
2 ms |
13144 KB |
Output is correct |
24 |
Correct |
2 ms |
13148 KB |
Output is correct |
25 |
Correct |
2 ms |
13148 KB |
Output is correct |
26 |
Correct |
1 ms |
13148 KB |
Output is correct |
27 |
Correct |
1 ms |
13032 KB |
Output is correct |
28 |
Correct |
2 ms |
13148 KB |
Output is correct |
29 |
Correct |
2 ms |
13148 KB |
Output is correct |
30 |
Correct |
1 ms |
13148 KB |
Output is correct |
31 |
Correct |
1 ms |
13148 KB |
Output is correct |
32 |
Correct |
2 ms |
13148 KB |
Output is correct |
33 |
Correct |
2 ms |
13008 KB |
Output is correct |
34 |
Correct |
2 ms |
13148 KB |
Output is correct |
35 |
Correct |
2 ms |
13148 KB |
Output is correct |
36 |
Correct |
2 ms |
12636 KB |
Output is correct |
37 |
Correct |
2 ms |
10840 KB |
Output is correct |
38 |
Correct |
1 ms |
12892 KB |
Output is correct |
39 |
Correct |
2 ms |
12892 KB |
Output is correct |
40 |
Correct |
2 ms |
12892 KB |
Output is correct |
41 |
Correct |
1 ms |
12892 KB |
Output is correct |
42 |
Correct |
1 ms |
13148 KB |
Output is correct |
43 |
Correct |
2 ms |
13148 KB |
Output is correct |
44 |
Correct |
2 ms |
12892 KB |
Output is correct |
45 |
Correct |
2 ms |
13148 KB |
Output is correct |
46 |
Correct |
1 ms |
10588 KB |
Output is correct |
47 |
Correct |
1 ms |
10844 KB |
Output is correct |
48 |
Correct |
2 ms |
12772 KB |
Output is correct |
49 |
Correct |
2 ms |
12892 KB |
Output is correct |
50 |
Correct |
1 ms |
12636 KB |
Output is correct |
51 |
Correct |
2 ms |
12636 KB |
Output is correct |
52 |
Correct |
2 ms |
12636 KB |
Output is correct |
53 |
Correct |
2 ms |
12636 KB |
Output is correct |
54 |
Correct |
2 ms |
12636 KB |
Output is correct |
55 |
Correct |
2 ms |
12636 KB |
Output is correct |
56 |
Correct |
2 ms |
12636 KB |
Output is correct |
57 |
Correct |
2 ms |
12636 KB |
Output is correct |
58 |
Correct |
2 ms |
12632 KB |
Output is correct |
59 |
Correct |
2 ms |
13404 KB |
Output is correct |
60 |
Correct |
3 ms |
13404 KB |
Output is correct |
61 |
Correct |
2 ms |
13400 KB |
Output is correct |
62 |
Correct |
3 ms |
13916 KB |
Output is correct |
63 |
Correct |
3 ms |
13916 KB |
Output is correct |
64 |
Correct |
3 ms |
13916 KB |
Output is correct |
65 |
Correct |
2 ms |
13916 KB |
Output is correct |
66 |
Correct |
2 ms |
13800 KB |
Output is correct |
67 |
Correct |
3 ms |
13916 KB |
Output is correct |
68 |
Correct |
2 ms |
13660 KB |
Output is correct |
69 |
Correct |
3 ms |
13612 KB |
Output is correct |
70 |
Correct |
2 ms |
13660 KB |
Output is correct |
71 |
Correct |
2 ms |
13660 KB |
Output is correct |
72 |
Correct |
3 ms |
13660 KB |
Output is correct |
73 |
Correct |
3 ms |
13736 KB |
Output is correct |
74 |
Correct |
3 ms |
13912 KB |
Output is correct |
75 |
Correct |
3 ms |
13912 KB |
Output is correct |
76 |
Correct |
3 ms |
13916 KB |
Output is correct |
77 |
Correct |
3 ms |
13916 KB |
Output is correct |
78 |
Correct |
3 ms |
13868 KB |
Output is correct |
79 |
Correct |
2 ms |
13788 KB |
Output is correct |
80 |
Correct |
1 ms |
12632 KB |
Output is correct |
81 |
Correct |
2 ms |
13148 KB |
Output is correct |
82 |
Correct |
2 ms |
13148 KB |
Output is correct |
83 |
Correct |
2 ms |
13148 KB |
Output is correct |
84 |
Correct |
2 ms |
13148 KB |
Output is correct |
85 |
Correct |
2 ms |
13148 KB |
Output is correct |
86 |
Correct |
2 ms |
13660 KB |
Output is correct |
87 |
Correct |
2 ms |
13660 KB |
Output is correct |
88 |
Correct |
3 ms |
13656 KB |
Output is correct |
89 |
Correct |
3 ms |
13656 KB |
Output is correct |
90 |
Correct |
1 ms |
12632 KB |
Output is correct |
91 |
Correct |
1 ms |
11100 KB |
Output is correct |
92 |
Correct |
10 ms |
26480 KB |
Output is correct |
93 |
Correct |
9 ms |
24412 KB |
Output is correct |
94 |
Correct |
2 ms |
13400 KB |
Output is correct |
95 |
Correct |
8 ms |
23388 KB |
Output is correct |
96 |
Correct |
10 ms |
24784 KB |
Output is correct |
97 |
Correct |
2 ms |
12632 KB |
Output is correct |
98 |
Correct |
4 ms |
19036 KB |
Output is correct |
99 |
Correct |
4 ms |
18996 KB |
Output is correct |
100 |
Correct |
3 ms |
14684 KB |
Output is correct |
101 |
Correct |
4 ms |
18780 KB |
Output is correct |
102 |
Correct |
4 ms |
18780 KB |
Output is correct |
103 |
Correct |
14 ms |
29340 KB |
Output is correct |
104 |
Correct |
11 ms |
27484 KB |
Output is correct |
105 |
Correct |
9 ms |
27996 KB |
Output is correct |
106 |
Correct |
11 ms |
30300 KB |
Output is correct |
107 |
Correct |
12 ms |
30284 KB |
Output is correct |
108 |
Correct |
12 ms |
30296 KB |
Output is correct |
109 |
Correct |
13 ms |
30168 KB |
Output is correct |
110 |
Correct |
12 ms |
30296 KB |
Output is correct |
111 |
Correct |
12 ms |
30252 KB |
Output is correct |
112 |
Correct |
11 ms |
27932 KB |
Output is correct |
113 |
Correct |
11 ms |
27736 KB |
Output is correct |
114 |
Correct |
11 ms |
27704 KB |
Output is correct |
115 |
Correct |
10 ms |
27740 KB |
Output is correct |
116 |
Correct |
10 ms |
27740 KB |
Output is correct |
117 |
Correct |
12 ms |
27740 KB |
Output is correct |
118 |
Correct |
12 ms |
29784 KB |
Output is correct |
119 |
Correct |
12 ms |
29532 KB |
Output is correct |
120 |
Correct |
12 ms |
30020 KB |
Output is correct |
121 |
Correct |
11 ms |
29020 KB |
Output is correct |
122 |
Correct |
10 ms |
26972 KB |
Output is correct |
123 |
Correct |
11 ms |
26972 KB |
Output is correct |
124 |
Correct |
4 ms |
19032 KB |
Output is correct |
125 |
Correct |
6 ms |
22832 KB |
Output is correct |
126 |
Correct |
7 ms |
22620 KB |
Output is correct |
127 |
Correct |
7 ms |
22828 KB |
Output is correct |
128 |
Correct |
7 ms |
22876 KB |
Output is correct |
129 |
Correct |
7 ms |
22620 KB |
Output is correct |
130 |
Correct |
10 ms |
27592 KB |
Output is correct |
131 |
Correct |
11 ms |
27480 KB |
Output is correct |
132 |
Correct |
10 ms |
27992 KB |
Output is correct |
133 |
Correct |
11 ms |
28252 KB |
Output is correct |
134 |
Correct |
3 ms |
16732 KB |
Output is correct |
135 |
Correct |
2 ms |
14940 KB |
Output is correct |
136 |
Correct |
5 ms |
19036 KB |
Output is correct |
137 |
Correct |
4 ms |
19032 KB |
Output is correct |
138 |
Correct |
2 ms |
14684 KB |
Output is correct |
139 |
Correct |
5 ms |
19008 KB |
Output is correct |
140 |
Correct |
4 ms |
19032 KB |
Output is correct |
141 |
Correct |
3 ms |
18780 KB |
Output is correct |
142 |
Correct |
4 ms |
19036 KB |
Output is correct |
143 |
Correct |
5 ms |
19032 KB |
Output is correct |
144 |
Correct |
2 ms |
10584 KB |
Output is correct |
145 |
Correct |
5 ms |
19036 KB |
Output is correct |
146 |
Correct |
6 ms |
19008 KB |
Output is correct |
147 |
Correct |
12 ms |
27196 KB |
Output is correct |
148 |
Correct |
13 ms |
28764 KB |
Output is correct |
149 |
Correct |
13 ms |
29020 KB |
Output is correct |
150 |
Correct |
17 ms |
35160 KB |
Output is correct |
151 |
Correct |
16 ms |
34908 KB |
Output is correct |
152 |
Correct |
15 ms |
34904 KB |
Output is correct |
153 |
Correct |
18 ms |
34908 KB |
Output is correct |
154 |
Correct |
17 ms |
34908 KB |
Output is correct |
155 |
Correct |
17 ms |
34904 KB |
Output is correct |
156 |
Correct |
15 ms |
31576 KB |
Output is correct |
157 |
Correct |
14 ms |
31580 KB |
Output is correct |
158 |
Correct |
14 ms |
31300 KB |
Output is correct |
159 |
Correct |
14 ms |
31320 KB |
Output is correct |
160 |
Correct |
14 ms |
31324 KB |
Output is correct |
161 |
Correct |
15 ms |
31324 KB |
Output is correct |
162 |
Correct |
21 ms |
33644 KB |
Output is correct |
163 |
Correct |
14 ms |
33372 KB |
Output is correct |
164 |
Correct |
15 ms |
34488 KB |
Output is correct |
165 |
Correct |
15 ms |
32860 KB |
Output is correct |
166 |
Correct |
16 ms |
34120 KB |
Output is correct |
167 |
Correct |
16 ms |
33372 KB |
Output is correct |
168 |
Correct |
4 ms |
19036 KB |
Output is correct |
169 |
Correct |
8 ms |
24412 KB |
Output is correct |
170 |
Correct |
9 ms |
24284 KB |
Output is correct |
171 |
Correct |
8 ms |
24300 KB |
Output is correct |
172 |
Correct |
8 ms |
23876 KB |
Output is correct |
173 |
Correct |
8 ms |
24412 KB |
Output is correct |
174 |
Correct |
14 ms |
32084 KB |
Output is correct |
175 |
Correct |
16 ms |
34396 KB |
Output is correct |
176 |
Correct |
16 ms |
34272 KB |
Output is correct |
177 |
Correct |
13 ms |
29132 KB |
Output is correct |
178 |
Correct |
4 ms |
19036 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
10588 KB |
Output is correct |
2 |
Correct |
1 ms |
10588 KB |
Output is correct |
3 |
Correct |
1 ms |
10588 KB |
Output is correct |
4 |
Correct |
2 ms |
13148 KB |
Output is correct |
5 |
Correct |
2 ms |
12892 KB |
Output is correct |
6 |
Correct |
2 ms |
12892 KB |
Output is correct |
7 |
Correct |
2 ms |
12632 KB |
Output is correct |
8 |
Correct |
2 ms |
12636 KB |
Output is correct |
9 |
Correct |
1 ms |
10588 KB |
Output is correct |
10 |
Correct |
1 ms |
12636 KB |
Output is correct |
11 |
Correct |
2 ms |
12636 KB |
Output is correct |
12 |
Correct |
2 ms |
10844 KB |
Output is correct |
13 |
Correct |
2 ms |
12636 KB |
Output is correct |
14 |
Correct |
2 ms |
12636 KB |
Output is correct |
15 |
Correct |
2 ms |
13148 KB |
Output is correct |
16 |
Correct |
1 ms |
10844 KB |
Output is correct |
17 |
Correct |
1 ms |
12892 KB |
Output is correct |
18 |
Correct |
2 ms |
13148 KB |
Output is correct |
19 |
Correct |
2 ms |
13148 KB |
Output is correct |
20 |
Correct |
1 ms |
13148 KB |
Output is correct |
21 |
Correct |
1 ms |
13148 KB |
Output is correct |
22 |
Correct |
1 ms |
13148 KB |
Output is correct |
23 |
Correct |
2 ms |
13144 KB |
Output is correct |
24 |
Correct |
2 ms |
13148 KB |
Output is correct |
25 |
Correct |
2 ms |
13148 KB |
Output is correct |
26 |
Correct |
1 ms |
13148 KB |
Output is correct |
27 |
Correct |
1 ms |
13032 KB |
Output is correct |
28 |
Correct |
2 ms |
13148 KB |
Output is correct |
29 |
Correct |
2 ms |
13148 KB |
Output is correct |
30 |
Correct |
1 ms |
13148 KB |
Output is correct |
31 |
Correct |
1 ms |
13148 KB |
Output is correct |
32 |
Correct |
2 ms |
13148 KB |
Output is correct |
33 |
Correct |
2 ms |
13008 KB |
Output is correct |
34 |
Correct |
2 ms |
13148 KB |
Output is correct |
35 |
Correct |
2 ms |
13148 KB |
Output is correct |
36 |
Correct |
2 ms |
12636 KB |
Output is correct |
37 |
Correct |
2 ms |
10840 KB |
Output is correct |
38 |
Correct |
1 ms |
12892 KB |
Output is correct |
39 |
Correct |
2 ms |
12892 KB |
Output is correct |
40 |
Correct |
2 ms |
12892 KB |
Output is correct |
41 |
Correct |
1 ms |
12892 KB |
Output is correct |
42 |
Correct |
1 ms |
13148 KB |
Output is correct |
43 |
Correct |
2 ms |
13148 KB |
Output is correct |
44 |
Correct |
2 ms |
12892 KB |
Output is correct |
45 |
Correct |
2 ms |
13148 KB |
Output is correct |
46 |
Correct |
1 ms |
10588 KB |
Output is correct |
47 |
Correct |
1 ms |
10844 KB |
Output is correct |
48 |
Correct |
2 ms |
12772 KB |
Output is correct |
49 |
Correct |
2 ms |
12892 KB |
Output is correct |
50 |
Correct |
1 ms |
12636 KB |
Output is correct |
51 |
Correct |
2 ms |
12636 KB |
Output is correct |
52 |
Correct |
2 ms |
12636 KB |
Output is correct |
53 |
Correct |
2 ms |
12636 KB |
Output is correct |
54 |
Correct |
2 ms |
12636 KB |
Output is correct |
55 |
Correct |
2 ms |
12636 KB |
Output is correct |
56 |
Correct |
2 ms |
12636 KB |
Output is correct |
57 |
Correct |
2 ms |
12636 KB |
Output is correct |
58 |
Correct |
2 ms |
12632 KB |
Output is correct |
59 |
Correct |
2 ms |
13404 KB |
Output is correct |
60 |
Correct |
3 ms |
13404 KB |
Output is correct |
61 |
Correct |
2 ms |
13400 KB |
Output is correct |
62 |
Correct |
3 ms |
13916 KB |
Output is correct |
63 |
Correct |
3 ms |
13916 KB |
Output is correct |
64 |
Correct |
3 ms |
13916 KB |
Output is correct |
65 |
Correct |
2 ms |
13916 KB |
Output is correct |
66 |
Correct |
2 ms |
13800 KB |
Output is correct |
67 |
Correct |
3 ms |
13916 KB |
Output is correct |
68 |
Correct |
2 ms |
13660 KB |
Output is correct |
69 |
Correct |
3 ms |
13612 KB |
Output is correct |
70 |
Correct |
2 ms |
13660 KB |
Output is correct |
71 |
Correct |
2 ms |
13660 KB |
Output is correct |
72 |
Correct |
3 ms |
13660 KB |
Output is correct |
73 |
Correct |
3 ms |
13736 KB |
Output is correct |
74 |
Correct |
3 ms |
13912 KB |
Output is correct |
75 |
Correct |
3 ms |
13912 KB |
Output is correct |
76 |
Correct |
3 ms |
13916 KB |
Output is correct |
77 |
Correct |
3 ms |
13916 KB |
Output is correct |
78 |
Correct |
3 ms |
13868 KB |
Output is correct |
79 |
Correct |
2 ms |
13788 KB |
Output is correct |
80 |
Correct |
1 ms |
12632 KB |
Output is correct |
81 |
Correct |
2 ms |
13148 KB |
Output is correct |
82 |
Correct |
2 ms |
13148 KB |
Output is correct |
83 |
Correct |
2 ms |
13148 KB |
Output is correct |
84 |
Correct |
2 ms |
13148 KB |
Output is correct |
85 |
Correct |
2 ms |
13148 KB |
Output is correct |
86 |
Correct |
2 ms |
13660 KB |
Output is correct |
87 |
Correct |
2 ms |
13660 KB |
Output is correct |
88 |
Correct |
3 ms |
13656 KB |
Output is correct |
89 |
Correct |
3 ms |
13656 KB |
Output is correct |
90 |
Correct |
1 ms |
12632 KB |
Output is correct |
91 |
Correct |
1 ms |
11100 KB |
Output is correct |
92 |
Correct |
10 ms |
26480 KB |
Output is correct |
93 |
Correct |
9 ms |
24412 KB |
Output is correct |
94 |
Correct |
2 ms |
13400 KB |
Output is correct |
95 |
Correct |
8 ms |
23388 KB |
Output is correct |
96 |
Correct |
10 ms |
24784 KB |
Output is correct |
97 |
Correct |
2 ms |
12632 KB |
Output is correct |
98 |
Correct |
4 ms |
19036 KB |
Output is correct |
99 |
Correct |
4 ms |
18996 KB |
Output is correct |
100 |
Correct |
3 ms |
14684 KB |
Output is correct |
101 |
Correct |
4 ms |
18780 KB |
Output is correct |
102 |
Correct |
4 ms |
18780 KB |
Output is correct |
103 |
Correct |
14 ms |
29340 KB |
Output is correct |
104 |
Correct |
11 ms |
27484 KB |
Output is correct |
105 |
Correct |
9 ms |
27996 KB |
Output is correct |
106 |
Correct |
11 ms |
30300 KB |
Output is correct |
107 |
Correct |
12 ms |
30284 KB |
Output is correct |
108 |
Correct |
12 ms |
30296 KB |
Output is correct |
109 |
Correct |
13 ms |
30168 KB |
Output is correct |
110 |
Correct |
12 ms |
30296 KB |
Output is correct |
111 |
Correct |
12 ms |
30252 KB |
Output is correct |
112 |
Correct |
11 ms |
27932 KB |
Output is correct |
113 |
Correct |
11 ms |
27736 KB |
Output is correct |
114 |
Correct |
11 ms |
27704 KB |
Output is correct |
115 |
Correct |
10 ms |
27740 KB |
Output is correct |
116 |
Correct |
10 ms |
27740 KB |
Output is correct |
117 |
Correct |
12 ms |
27740 KB |
Output is correct |
118 |
Correct |
12 ms |
29784 KB |
Output is correct |
119 |
Correct |
12 ms |
29532 KB |
Output is correct |
120 |
Correct |
12 ms |
30020 KB |
Output is correct |
121 |
Correct |
11 ms |
29020 KB |
Output is correct |
122 |
Correct |
10 ms |
26972 KB |
Output is correct |
123 |
Correct |
11 ms |
26972 KB |
Output is correct |
124 |
Correct |
4 ms |
19032 KB |
Output is correct |
125 |
Correct |
6 ms |
22832 KB |
Output is correct |
126 |
Correct |
7 ms |
22620 KB |
Output is correct |
127 |
Correct |
7 ms |
22828 KB |
Output is correct |
128 |
Correct |
7 ms |
22876 KB |
Output is correct |
129 |
Correct |
7 ms |
22620 KB |
Output is correct |
130 |
Correct |
10 ms |
27592 KB |
Output is correct |
131 |
Correct |
11 ms |
27480 KB |
Output is correct |
132 |
Correct |
10 ms |
27992 KB |
Output is correct |
133 |
Correct |
11 ms |
28252 KB |
Output is correct |
134 |
Correct |
3 ms |
16732 KB |
Output is correct |
135 |
Correct |
2 ms |
14940 KB |
Output is correct |
136 |
Correct |
5 ms |
19036 KB |
Output is correct |
137 |
Correct |
4 ms |
19032 KB |
Output is correct |
138 |
Correct |
2 ms |
14684 KB |
Output is correct |
139 |
Correct |
5 ms |
19008 KB |
Output is correct |
140 |
Correct |
4 ms |
19032 KB |
Output is correct |
141 |
Correct |
3 ms |
18780 KB |
Output is correct |
142 |
Correct |
4 ms |
19036 KB |
Output is correct |
143 |
Correct |
5 ms |
19032 KB |
Output is correct |
144 |
Correct |
2 ms |
10584 KB |
Output is correct |
145 |
Correct |
5 ms |
19036 KB |
Output is correct |
146 |
Correct |
6 ms |
19008 KB |
Output is correct |
147 |
Correct |
12 ms |
27196 KB |
Output is correct |
148 |
Correct |
13 ms |
28764 KB |
Output is correct |
149 |
Correct |
13 ms |
29020 KB |
Output is correct |
150 |
Correct |
17 ms |
35160 KB |
Output is correct |
151 |
Correct |
16 ms |
34908 KB |
Output is correct |
152 |
Correct |
15 ms |
34904 KB |
Output is correct |
153 |
Correct |
18 ms |
34908 KB |
Output is correct |
154 |
Correct |
17 ms |
34908 KB |
Output is correct |
155 |
Correct |
17 ms |
34904 KB |
Output is correct |
156 |
Correct |
15 ms |
31576 KB |
Output is correct |
157 |
Correct |
14 ms |
31580 KB |
Output is correct |
158 |
Correct |
14 ms |
31300 KB |
Output is correct |
159 |
Correct |
14 ms |
31320 KB |
Output is correct |
160 |
Correct |
14 ms |
31324 KB |
Output is correct |
161 |
Correct |
15 ms |
31324 KB |
Output is correct |
162 |
Correct |
21 ms |
33644 KB |
Output is correct |
163 |
Correct |
14 ms |
33372 KB |
Output is correct |
164 |
Correct |
15 ms |
34488 KB |
Output is correct |
165 |
Correct |
15 ms |
32860 KB |
Output is correct |
166 |
Correct |
16 ms |
34120 KB |
Output is correct |
167 |
Correct |
16 ms |
33372 KB |
Output is correct |
168 |
Correct |
4 ms |
19036 KB |
Output is correct |
169 |
Correct |
8 ms |
24412 KB |
Output is correct |
170 |
Correct |
9 ms |
24284 KB |
Output is correct |
171 |
Correct |
8 ms |
24300 KB |
Output is correct |
172 |
Correct |
8 ms |
23876 KB |
Output is correct |
173 |
Correct |
8 ms |
24412 KB |
Output is correct |
174 |
Correct |
14 ms |
32084 KB |
Output is correct |
175 |
Correct |
16 ms |
34396 KB |
Output is correct |
176 |
Correct |
16 ms |
34272 KB |
Output is correct |
177 |
Correct |
13 ms |
29132 KB |
Output is correct |
178 |
Correct |
4 ms |
19036 KB |
Output is correct |
179 |
Correct |
13 ms |
30556 KB |
Output is correct |
180 |
Correct |
44 ms |
40020 KB |
Output is correct |
181 |
Correct |
44 ms |
39916 KB |
Output is correct |
182 |
Correct |
14 ms |
36184 KB |
Output is correct |
183 |
Correct |
43 ms |
39908 KB |
Output is correct |
184 |
Correct |
44 ms |
40020 KB |
Output is correct |
185 |
Correct |
34 ms |
39512 KB |
Output is correct |
186 |
Correct |
49 ms |
40020 KB |
Output is correct |
187 |
Correct |
54 ms |
40108 KB |
Output is correct |
188 |
Correct |
39 ms |
38736 KB |
Output is correct |
189 |
Correct |
70 ms |
40020 KB |
Output is correct |
190 |
Correct |
71 ms |
40116 KB |
Output is correct |
191 |
Correct |
183 ms |
157264 KB |
Output is correct |
192 |
Correct |
212 ms |
218196 KB |
Output is correct |
193 |
Correct |
202 ms |
202752 KB |
Output is correct |
194 |
Correct |
255 ms |
295068 KB |
Output is correct |
195 |
Correct |
259 ms |
294736 KB |
Output is correct |
196 |
Correct |
300 ms |
294736 KB |
Output is correct |
197 |
Correct |
260 ms |
294888 KB |
Output is correct |
198 |
Correct |
250 ms |
294736 KB |
Output is correct |
199 |
Correct |
235 ms |
294992 KB |
Output is correct |
200 |
Correct |
219 ms |
233044 KB |
Output is correct |
201 |
Correct |
225 ms |
233192 KB |
Output is correct |
202 |
Correct |
230 ms |
232608 KB |
Output is correct |
203 |
Correct |
227 ms |
232708 KB |
Output is correct |
204 |
Correct |
228 ms |
232864 KB |
Output is correct |
205 |
Correct |
220 ms |
232708 KB |
Output is correct |
206 |
Correct |
213 ms |
263248 KB |
Output is correct |
207 |
Correct |
232 ms |
264916 KB |
Output is correct |
208 |
Correct |
208 ms |
253776 KB |
Output is correct |
209 |
Correct |
223 ms |
267856 KB |
Output is correct |
210 |
Correct |
248 ms |
267432 KB |
Output is correct |
211 |
Correct |
242 ms |
280916 KB |
Output is correct |
212 |
Correct |
42 ms |
39764 KB |
Output is correct |
213 |
Correct |
102 ms |
118864 KB |
Output is correct |
214 |
Correct |
101 ms |
114656 KB |
Output is correct |
215 |
Correct |
110 ms |
120144 KB |
Output is correct |
216 |
Correct |
93 ms |
113464 KB |
Output is correct |
217 |
Correct |
100 ms |
114692 KB |
Output is correct |
218 |
Correct |
273 ms |
268880 KB |
Output is correct |
219 |
Correct |
208 ms |
191056 KB |
Output is correct |
220 |
Correct |
243 ms |
267388 KB |
Output is correct |
221 |
Correct |
249 ms |
254792 KB |
Output is correct |
222 |
Correct |
32 ms |
39696 KB |
Output is correct |