#include <bits/stdc++.h>
#define MAX 3005
using namespace std;
bool mat[MAX][MAX];
int nrobsv[MAX][MAX],nrobso[MAX][MAX];
int nrdreptv[MAX][MAX],nrdrepto[MAX][MAX];
bool sol[MAX][MAX];
int m,n,c,l;
void myfill(int i,int j)
{
sol[i][j]=1;
if(nrdrepto[i-1][j+c-1] && !sol[i-1][j])
myfill(i-1,j);
if(nrdrepto[i][j+c-1] && !sol[i+1][j])
myfill(i+1,j);
if(nrdreptv[i+l-1][j] && !sol[i][j+1])
myfill(i,j+1);
if(nrdreptv[i+l-1][j-1] && !sol[i][j-1])
myfill(i,j-1);
}
int main()
{
memset(mat,1,sizeof(mat));
cin>>m>>n>>c>>l;
int xh,yh,xv,yv;
cin>>xh>>yh>>xv>>yv;
int i,j;
int starl,starc;
for(i=1;i<=n;++i)
for(j=1;j<=m;++j)
{
char ch;
cin>>ch;
mat[i][j]=(ch=='X') ? 1 : 0;
if(ch=='*')
{
starl=i;
starc=j;
}
}
for(j=1;j<m+c;++j)
nrobsv[0][j]=2*l;
for(i=1;i<n+l;++i)
nrobso[i][0]=2*c;
for(i=1;i<n+l;++i)
for(j=1;j<m+c;++j)
{
nrobsv[i][j]=nrobsv[i-1][j]-(i-l<=0 || mat[i-l][j])-(i-l<=0 || mat[i-l][j+1])+mat[i][j]+mat[i][j+1];
nrobso[i][j]=nrobso[i][j-1]-(j-c<=0 || mat[i][j-c])-(j-c<=0 || mat[i+1][j-c])+mat[i][j]+mat[i+1][j];
nrdreptv[i][j]=nrdreptv[i-1][j]-(i-l>0 && !nrobsv[i-l][j])+(!nrobsv[i][j]);
nrdrepto[i][j]=nrdrepto[i][j-1]-(j-c>0 && !nrobso[i][j-c])+(!nrobso[i][j]);
}
myfill(yh+1,xv+1);
cout<<((sol[starl][starc]) ? "YES" : "NO");
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
13400 KB |
Output is correct |
2 |
Correct |
2 ms |
13660 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
13400 KB |
Output is correct |
2 |
Correct |
2 ms |
13660 KB |
Output is correct |
3 |
Correct |
2 ms |
15964 KB |
Output is correct |
4 |
Correct |
3 ms |
18524 KB |
Output is correct |
5 |
Correct |
3 ms |
20572 KB |
Output is correct |
6 |
Correct |
2 ms |
18612 KB |
Output is correct |
7 |
Correct |
3 ms |
18524 KB |
Output is correct |
8 |
Correct |
3 ms |
20524 KB |
Output is correct |
9 |
Correct |
2 ms |
15900 KB |
Output is correct |
10 |
Correct |
2 ms |
18268 KB |
Output is correct |
11 |
Correct |
3 ms |
20468 KB |
Output is correct |
12 |
Correct |
2 ms |
13492 KB |
Output is correct |
13 |
Correct |
2 ms |
18212 KB |
Output is correct |
14 |
Correct |
3 ms |
20572 KB |
Output is correct |
15 |
Correct |
3 ms |
18524 KB |
Output is correct |
16 |
Correct |
2 ms |
18520 KB |
Output is correct |
17 |
Correct |
3 ms |
18524 KB |
Output is correct |
18 |
Correct |
3 ms |
18524 KB |
Output is correct |
19 |
Correct |
3 ms |
18524 KB |
Output is correct |
20 |
Correct |
5 ms |
18780 KB |
Output is correct |
21 |
Correct |
3 ms |
18524 KB |
Output is correct |
22 |
Correct |
3 ms |
18524 KB |
Output is correct |
23 |
Correct |
2 ms |
18524 KB |
Output is correct |
24 |
Correct |
3 ms |
18620 KB |
Output is correct |
25 |
Correct |
3 ms |
18524 KB |
Output is correct |
26 |
Correct |
3 ms |
18524 KB |
Output is correct |
27 |
Correct |
2 ms |
18524 KB |
Output is correct |
28 |
Correct |
2 ms |
18360 KB |
Output is correct |
29 |
Correct |
2 ms |
16220 KB |
Output is correct |
30 |
Correct |
2 ms |
16476 KB |
Output is correct |
31 |
Correct |
2 ms |
16476 KB |
Output is correct |
32 |
Correct |
2 ms |
16416 KB |
Output is correct |
33 |
Correct |
2 ms |
16476 KB |
Output is correct |
34 |
Correct |
2 ms |
16476 KB |
Output is correct |
35 |
Correct |
2 ms |
16476 KB |
Output is correct |
36 |
Correct |
2 ms |
18012 KB |
Output is correct |
37 |
Correct |
2 ms |
16220 KB |
Output is correct |
38 |
Correct |
2 ms |
18220 KB |
Output is correct |
39 |
Correct |
2 ms |
16220 KB |
Output is correct |
40 |
Correct |
2 ms |
18252 KB |
Output is correct |
41 |
Correct |
3 ms |
16220 KB |
Output is correct |
42 |
Correct |
3 ms |
20828 KB |
Output is correct |
43 |
Correct |
3 ms |
20828 KB |
Output is correct |
44 |
Correct |
3 ms |
20828 KB |
Output is correct |
45 |
Correct |
3 ms |
20828 KB |
Output is correct |
46 |
Correct |
2 ms |
15964 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
13400 KB |
Output is correct |
2 |
Correct |
2 ms |
13660 KB |
Output is correct |
3 |
Correct |
2 ms |
15964 KB |
Output is correct |
4 |
Correct |
3 ms |
18524 KB |
Output is correct |
5 |
Correct |
3 ms |
20572 KB |
Output is correct |
6 |
Correct |
2 ms |
18612 KB |
Output is correct |
7 |
Correct |
3 ms |
18524 KB |
Output is correct |
8 |
Correct |
3 ms |
20524 KB |
Output is correct |
9 |
Correct |
2 ms |
15900 KB |
Output is correct |
10 |
Correct |
2 ms |
18268 KB |
Output is correct |
11 |
Correct |
3 ms |
20468 KB |
Output is correct |
12 |
Correct |
2 ms |
13492 KB |
Output is correct |
13 |
Correct |
2 ms |
18212 KB |
Output is correct |
14 |
Correct |
3 ms |
20572 KB |
Output is correct |
15 |
Correct |
3 ms |
18524 KB |
Output is correct |
16 |
Correct |
2 ms |
18520 KB |
Output is correct |
17 |
Correct |
3 ms |
18524 KB |
Output is correct |
18 |
Correct |
3 ms |
18524 KB |
Output is correct |
19 |
Correct |
3 ms |
18524 KB |
Output is correct |
20 |
Correct |
5 ms |
18780 KB |
Output is correct |
21 |
Correct |
3 ms |
18524 KB |
Output is correct |
22 |
Correct |
3 ms |
18524 KB |
Output is correct |
23 |
Correct |
2 ms |
18524 KB |
Output is correct |
24 |
Correct |
3 ms |
18620 KB |
Output is correct |
25 |
Correct |
3 ms |
18524 KB |
Output is correct |
26 |
Correct |
3 ms |
18524 KB |
Output is correct |
27 |
Correct |
2 ms |
18524 KB |
Output is correct |
28 |
Correct |
2 ms |
18360 KB |
Output is correct |
29 |
Correct |
2 ms |
16220 KB |
Output is correct |
30 |
Correct |
2 ms |
16476 KB |
Output is correct |
31 |
Correct |
2 ms |
16476 KB |
Output is correct |
32 |
Correct |
2 ms |
16416 KB |
Output is correct |
33 |
Correct |
2 ms |
16476 KB |
Output is correct |
34 |
Correct |
2 ms |
16476 KB |
Output is correct |
35 |
Correct |
2 ms |
16476 KB |
Output is correct |
36 |
Correct |
2 ms |
18012 KB |
Output is correct |
37 |
Correct |
2 ms |
16220 KB |
Output is correct |
38 |
Correct |
2 ms |
18220 KB |
Output is correct |
39 |
Correct |
2 ms |
16220 KB |
Output is correct |
40 |
Correct |
2 ms |
18252 KB |
Output is correct |
41 |
Correct |
3 ms |
16220 KB |
Output is correct |
42 |
Correct |
3 ms |
20828 KB |
Output is correct |
43 |
Correct |
3 ms |
20828 KB |
Output is correct |
44 |
Correct |
3 ms |
20828 KB |
Output is correct |
45 |
Correct |
3 ms |
20828 KB |
Output is correct |
46 |
Correct |
2 ms |
15964 KB |
Output is correct |
47 |
Correct |
2 ms |
15960 KB |
Output is correct |
48 |
Correct |
3 ms |
20824 KB |
Output is correct |
49 |
Correct |
3 ms |
21080 KB |
Output is correct |
50 |
Correct |
3 ms |
20828 KB |
Output is correct |
51 |
Correct |
3 ms |
20572 KB |
Output is correct |
52 |
Correct |
3 ms |
23132 KB |
Output is correct |
53 |
Correct |
3 ms |
18520 KB |
Output is correct |
54 |
Correct |
3 ms |
22620 KB |
Output is correct |
55 |
Correct |
4 ms |
21084 KB |
Output is correct |
56 |
Correct |
3 ms |
22620 KB |
Output is correct |
57 |
Correct |
3 ms |
21020 KB |
Output is correct |
58 |
Correct |
3 ms |
21084 KB |
Output is correct |
59 |
Correct |
3 ms |
21340 KB |
Output is correct |
60 |
Correct |
3 ms |
21340 KB |
Output is correct |
61 |
Correct |
4 ms |
21340 KB |
Output is correct |
62 |
Correct |
4 ms |
21848 KB |
Output is correct |
63 |
Correct |
4 ms |
21804 KB |
Output is correct |
64 |
Correct |
4 ms |
21852 KB |
Output is correct |
65 |
Correct |
4 ms |
21852 KB |
Output is correct |
66 |
Correct |
4 ms |
21944 KB |
Output is correct |
67 |
Correct |
4 ms |
21852 KB |
Output is correct |
68 |
Correct |
4 ms |
21596 KB |
Output is correct |
69 |
Correct |
5 ms |
21596 KB |
Output is correct |
70 |
Correct |
4 ms |
21336 KB |
Output is correct |
71 |
Correct |
3 ms |
21340 KB |
Output is correct |
72 |
Correct |
3 ms |
21304 KB |
Output is correct |
73 |
Correct |
3 ms |
21472 KB |
Output is correct |
74 |
Correct |
3 ms |
19548 KB |
Output is correct |
75 |
Correct |
3 ms |
19292 KB |
Output is correct |
76 |
Correct |
3 ms |
21596 KB |
Output is correct |
77 |
Correct |
4 ms |
19548 KB |
Output is correct |
78 |
Correct |
3 ms |
19548 KB |
Output is correct |
79 |
Correct |
3 ms |
19548 KB |
Output is correct |
80 |
Correct |
3 ms |
20572 KB |
Output is correct |
81 |
Correct |
3 ms |
20996 KB |
Output is correct |
82 |
Correct |
3 ms |
21084 KB |
Output is correct |
83 |
Correct |
4 ms |
20828 KB |
Output is correct |
84 |
Correct |
3 ms |
21080 KB |
Output is correct |
85 |
Correct |
3 ms |
21084 KB |
Output is correct |
86 |
Correct |
4 ms |
23900 KB |
Output is correct |
87 |
Correct |
4 ms |
23764 KB |
Output is correct |
88 |
Correct |
5 ms |
21852 KB |
Output is correct |
89 |
Correct |
6 ms |
21852 KB |
Output is correct |
90 |
Correct |
3 ms |
20572 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
13400 KB |
Output is correct |
2 |
Correct |
2 ms |
13660 KB |
Output is correct |
3 |
Correct |
3 ms |
16216 KB |
Output is correct |
4 |
Correct |
12 ms |
36488 KB |
Output is correct |
5 |
Correct |
10 ms |
34396 KB |
Output is correct |
6 |
Correct |
3 ms |
19036 KB |
Output is correct |
7 |
Correct |
10 ms |
33056 KB |
Output is correct |
8 |
Correct |
10 ms |
34396 KB |
Output is correct |
9 |
Correct |
4 ms |
20828 KB |
Output is correct |
10 |
Correct |
7 ms |
27948 KB |
Output is correct |
11 |
Correct |
7 ms |
30044 KB |
Output is correct |
12 |
Correct |
7 ms |
27740 KB |
Output is correct |
13 |
Correct |
7 ms |
30044 KB |
Output is correct |
14 |
Correct |
10 ms |
30044 KB |
Output is correct |
15 |
Correct |
14 ms |
38492 KB |
Output is correct |
16 |
Correct |
12 ms |
36128 KB |
Output is correct |
17 |
Correct |
13 ms |
37724 KB |
Output is correct |
18 |
Correct |
13 ms |
38748 KB |
Output is correct |
19 |
Correct |
13 ms |
38744 KB |
Output is correct |
20 |
Correct |
13 ms |
38744 KB |
Output is correct |
21 |
Correct |
13 ms |
38748 KB |
Output is correct |
22 |
Correct |
15 ms |
38748 KB |
Output is correct |
23 |
Correct |
16 ms |
38748 KB |
Output is correct |
24 |
Correct |
13 ms |
38612 KB |
Output is correct |
25 |
Correct |
15 ms |
38748 KB |
Output is correct |
26 |
Correct |
12 ms |
34884 KB |
Output is correct |
27 |
Correct |
11 ms |
34908 KB |
Output is correct |
28 |
Correct |
12 ms |
35076 KB |
Output is correct |
29 |
Correct |
11 ms |
35032 KB |
Output is correct |
30 |
Correct |
15 ms |
38232 KB |
Output is correct |
31 |
Correct |
16 ms |
37980 KB |
Output is correct |
32 |
Correct |
13 ms |
38488 KB |
Output is correct |
33 |
Correct |
12 ms |
37720 KB |
Output is correct |
34 |
Correct |
12 ms |
37468 KB |
Output is correct |
35 |
Correct |
12 ms |
37720 KB |
Output is correct |
36 |
Correct |
7 ms |
30040 KB |
Output is correct |
37 |
Correct |
9 ms |
31792 KB |
Output is correct |
38 |
Correct |
9 ms |
31332 KB |
Output is correct |
39 |
Correct |
10 ms |
31528 KB |
Output is correct |
40 |
Correct |
10 ms |
31564 KB |
Output is correct |
41 |
Correct |
8 ms |
31580 KB |
Output is correct |
42 |
Correct |
11 ms |
36788 KB |
Output is correct |
43 |
Correct |
13 ms |
37416 KB |
Output is correct |
44 |
Correct |
12 ms |
35932 KB |
Output is correct |
45 |
Correct |
13 ms |
37980 KB |
Output is correct |
46 |
Correct |
6 ms |
28020 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
13400 KB |
Output is correct |
2 |
Correct |
2 ms |
13660 KB |
Output is correct |
3 |
Correct |
2 ms |
15964 KB |
Output is correct |
4 |
Correct |
3 ms |
18524 KB |
Output is correct |
5 |
Correct |
3 ms |
20572 KB |
Output is correct |
6 |
Correct |
2 ms |
18612 KB |
Output is correct |
7 |
Correct |
3 ms |
18524 KB |
Output is correct |
8 |
Correct |
3 ms |
20524 KB |
Output is correct |
9 |
Correct |
2 ms |
15900 KB |
Output is correct |
10 |
Correct |
2 ms |
18268 KB |
Output is correct |
11 |
Correct |
3 ms |
20468 KB |
Output is correct |
12 |
Correct |
2 ms |
13492 KB |
Output is correct |
13 |
Correct |
2 ms |
18212 KB |
Output is correct |
14 |
Correct |
3 ms |
20572 KB |
Output is correct |
15 |
Correct |
3 ms |
18524 KB |
Output is correct |
16 |
Correct |
2 ms |
18520 KB |
Output is correct |
17 |
Correct |
3 ms |
18524 KB |
Output is correct |
18 |
Correct |
3 ms |
18524 KB |
Output is correct |
19 |
Correct |
3 ms |
18524 KB |
Output is correct |
20 |
Correct |
5 ms |
18780 KB |
Output is correct |
21 |
Correct |
3 ms |
18524 KB |
Output is correct |
22 |
Correct |
3 ms |
18524 KB |
Output is correct |
23 |
Correct |
2 ms |
18524 KB |
Output is correct |
24 |
Correct |
3 ms |
18620 KB |
Output is correct |
25 |
Correct |
3 ms |
18524 KB |
Output is correct |
26 |
Correct |
3 ms |
18524 KB |
Output is correct |
27 |
Correct |
2 ms |
18524 KB |
Output is correct |
28 |
Correct |
2 ms |
18360 KB |
Output is correct |
29 |
Correct |
2 ms |
16220 KB |
Output is correct |
30 |
Correct |
2 ms |
16476 KB |
Output is correct |
31 |
Correct |
2 ms |
16476 KB |
Output is correct |
32 |
Correct |
2 ms |
16416 KB |
Output is correct |
33 |
Correct |
2 ms |
16476 KB |
Output is correct |
34 |
Correct |
2 ms |
16476 KB |
Output is correct |
35 |
Correct |
2 ms |
16476 KB |
Output is correct |
36 |
Correct |
2 ms |
18012 KB |
Output is correct |
37 |
Correct |
2 ms |
16220 KB |
Output is correct |
38 |
Correct |
2 ms |
18220 KB |
Output is correct |
39 |
Correct |
2 ms |
16220 KB |
Output is correct |
40 |
Correct |
2 ms |
18252 KB |
Output is correct |
41 |
Correct |
3 ms |
16220 KB |
Output is correct |
42 |
Correct |
3 ms |
20828 KB |
Output is correct |
43 |
Correct |
3 ms |
20828 KB |
Output is correct |
44 |
Correct |
3 ms |
20828 KB |
Output is correct |
45 |
Correct |
3 ms |
20828 KB |
Output is correct |
46 |
Correct |
2 ms |
15964 KB |
Output is correct |
47 |
Correct |
2 ms |
15960 KB |
Output is correct |
48 |
Correct |
3 ms |
20824 KB |
Output is correct |
49 |
Correct |
3 ms |
21080 KB |
Output is correct |
50 |
Correct |
3 ms |
20828 KB |
Output is correct |
51 |
Correct |
3 ms |
20572 KB |
Output is correct |
52 |
Correct |
3 ms |
23132 KB |
Output is correct |
53 |
Correct |
3 ms |
18520 KB |
Output is correct |
54 |
Correct |
3 ms |
22620 KB |
Output is correct |
55 |
Correct |
4 ms |
21084 KB |
Output is correct |
56 |
Correct |
3 ms |
22620 KB |
Output is correct |
57 |
Correct |
3 ms |
21020 KB |
Output is correct |
58 |
Correct |
3 ms |
21084 KB |
Output is correct |
59 |
Correct |
3 ms |
21340 KB |
Output is correct |
60 |
Correct |
3 ms |
21340 KB |
Output is correct |
61 |
Correct |
4 ms |
21340 KB |
Output is correct |
62 |
Correct |
4 ms |
21848 KB |
Output is correct |
63 |
Correct |
4 ms |
21804 KB |
Output is correct |
64 |
Correct |
4 ms |
21852 KB |
Output is correct |
65 |
Correct |
4 ms |
21852 KB |
Output is correct |
66 |
Correct |
4 ms |
21944 KB |
Output is correct |
67 |
Correct |
4 ms |
21852 KB |
Output is correct |
68 |
Correct |
4 ms |
21596 KB |
Output is correct |
69 |
Correct |
5 ms |
21596 KB |
Output is correct |
70 |
Correct |
4 ms |
21336 KB |
Output is correct |
71 |
Correct |
3 ms |
21340 KB |
Output is correct |
72 |
Correct |
3 ms |
21304 KB |
Output is correct |
73 |
Correct |
3 ms |
21472 KB |
Output is correct |
74 |
Correct |
3 ms |
19548 KB |
Output is correct |
75 |
Correct |
3 ms |
19292 KB |
Output is correct |
76 |
Correct |
3 ms |
21596 KB |
Output is correct |
77 |
Correct |
4 ms |
19548 KB |
Output is correct |
78 |
Correct |
3 ms |
19548 KB |
Output is correct |
79 |
Correct |
3 ms |
19548 KB |
Output is correct |
80 |
Correct |
3 ms |
20572 KB |
Output is correct |
81 |
Correct |
3 ms |
20996 KB |
Output is correct |
82 |
Correct |
3 ms |
21084 KB |
Output is correct |
83 |
Correct |
4 ms |
20828 KB |
Output is correct |
84 |
Correct |
3 ms |
21080 KB |
Output is correct |
85 |
Correct |
3 ms |
21084 KB |
Output is correct |
86 |
Correct |
4 ms |
23900 KB |
Output is correct |
87 |
Correct |
4 ms |
23764 KB |
Output is correct |
88 |
Correct |
5 ms |
21852 KB |
Output is correct |
89 |
Correct |
6 ms |
21852 KB |
Output is correct |
90 |
Correct |
3 ms |
20572 KB |
Output is correct |
91 |
Correct |
3 ms |
16216 KB |
Output is correct |
92 |
Correct |
12 ms |
36488 KB |
Output is correct |
93 |
Correct |
10 ms |
34396 KB |
Output is correct |
94 |
Correct |
3 ms |
19036 KB |
Output is correct |
95 |
Correct |
10 ms |
33056 KB |
Output is correct |
96 |
Correct |
10 ms |
34396 KB |
Output is correct |
97 |
Correct |
4 ms |
20828 KB |
Output is correct |
98 |
Correct |
7 ms |
27948 KB |
Output is correct |
99 |
Correct |
7 ms |
30044 KB |
Output is correct |
100 |
Correct |
7 ms |
27740 KB |
Output is correct |
101 |
Correct |
7 ms |
30044 KB |
Output is correct |
102 |
Correct |
10 ms |
30044 KB |
Output is correct |
103 |
Correct |
14 ms |
38492 KB |
Output is correct |
104 |
Correct |
12 ms |
36128 KB |
Output is correct |
105 |
Correct |
13 ms |
37724 KB |
Output is correct |
106 |
Correct |
13 ms |
38748 KB |
Output is correct |
107 |
Correct |
13 ms |
38744 KB |
Output is correct |
108 |
Correct |
13 ms |
38744 KB |
Output is correct |
109 |
Correct |
13 ms |
38748 KB |
Output is correct |
110 |
Correct |
15 ms |
38748 KB |
Output is correct |
111 |
Correct |
16 ms |
38748 KB |
Output is correct |
112 |
Correct |
13 ms |
38612 KB |
Output is correct |
113 |
Correct |
15 ms |
38748 KB |
Output is correct |
114 |
Correct |
12 ms |
34884 KB |
Output is correct |
115 |
Correct |
11 ms |
34908 KB |
Output is correct |
116 |
Correct |
12 ms |
35076 KB |
Output is correct |
117 |
Correct |
11 ms |
35032 KB |
Output is correct |
118 |
Correct |
15 ms |
38232 KB |
Output is correct |
119 |
Correct |
16 ms |
37980 KB |
Output is correct |
120 |
Correct |
13 ms |
38488 KB |
Output is correct |
121 |
Correct |
12 ms |
37720 KB |
Output is correct |
122 |
Correct |
12 ms |
37468 KB |
Output is correct |
123 |
Correct |
12 ms |
37720 KB |
Output is correct |
124 |
Correct |
7 ms |
30040 KB |
Output is correct |
125 |
Correct |
9 ms |
31792 KB |
Output is correct |
126 |
Correct |
9 ms |
31332 KB |
Output is correct |
127 |
Correct |
10 ms |
31528 KB |
Output is correct |
128 |
Correct |
10 ms |
31564 KB |
Output is correct |
129 |
Correct |
8 ms |
31580 KB |
Output is correct |
130 |
Correct |
11 ms |
36788 KB |
Output is correct |
131 |
Correct |
13 ms |
37416 KB |
Output is correct |
132 |
Correct |
12 ms |
35932 KB |
Output is correct |
133 |
Correct |
13 ms |
37980 KB |
Output is correct |
134 |
Correct |
6 ms |
28020 KB |
Output is correct |
135 |
Correct |
5 ms |
30300 KB |
Output is correct |
136 |
Correct |
9 ms |
36700 KB |
Output is correct |
137 |
Correct |
14 ms |
50520 KB |
Output is correct |
138 |
Correct |
5 ms |
23388 KB |
Output is correct |
139 |
Correct |
9 ms |
38748 KB |
Output is correct |
140 |
Correct |
11 ms |
50312 KB |
Output is correct |
141 |
Correct |
8 ms |
41820 KB |
Output is correct |
142 |
Correct |
9 ms |
39068 KB |
Output is correct |
143 |
Correct |
14 ms |
50524 KB |
Output is correct |
144 |
Correct |
3 ms |
15964 KB |
Output is correct |
145 |
Correct |
12 ms |
45844 KB |
Output is correct |
146 |
Correct |
14 ms |
50524 KB |
Output is correct |
147 |
Correct |
18 ms |
46428 KB |
Output is correct |
148 |
Correct |
19 ms |
48736 KB |
Output is correct |
149 |
Correct |
18 ms |
48472 KB |
Output is correct |
150 |
Correct |
19 ms |
52308 KB |
Output is correct |
151 |
Correct |
22 ms |
52312 KB |
Output is correct |
152 |
Correct |
20 ms |
52104 KB |
Output is correct |
153 |
Correct |
20 ms |
52124 KB |
Output is correct |
154 |
Correct |
19 ms |
52312 KB |
Output is correct |
155 |
Correct |
21 ms |
52312 KB |
Output is correct |
156 |
Correct |
20 ms |
51660 KB |
Output is correct |
157 |
Correct |
18 ms |
51804 KB |
Output is correct |
158 |
Correct |
21 ms |
46740 KB |
Output is correct |
159 |
Correct |
16 ms |
46428 KB |
Output is correct |
160 |
Correct |
15 ms |
46552 KB |
Output is correct |
161 |
Correct |
15 ms |
44380 KB |
Output is correct |
162 |
Correct |
16 ms |
42380 KB |
Output is correct |
163 |
Correct |
15 ms |
41820 KB |
Output is correct |
164 |
Correct |
18 ms |
43100 KB |
Output is correct |
165 |
Correct |
21 ms |
41560 KB |
Output is correct |
166 |
Correct |
18 ms |
42840 KB |
Output is correct |
167 |
Correct |
19 ms |
42076 KB |
Output is correct |
168 |
Correct |
10 ms |
36444 KB |
Output is correct |
169 |
Correct |
11 ms |
39320 KB |
Output is correct |
170 |
Correct |
11 ms |
39516 KB |
Output is correct |
171 |
Correct |
12 ms |
39304 KB |
Output is correct |
172 |
Correct |
11 ms |
39004 KB |
Output is correct |
173 |
Correct |
11 ms |
39364 KB |
Output is correct |
174 |
Correct |
18 ms |
58716 KB |
Output is correct |
175 |
Correct |
21 ms |
61276 KB |
Output is correct |
176 |
Correct |
19 ms |
60312 KB |
Output is correct |
177 |
Correct |
17 ms |
57684 KB |
Output is correct |
178 |
Correct |
8 ms |
34396 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
13400 KB |
Output is correct |
2 |
Correct |
2 ms |
13660 KB |
Output is correct |
3 |
Correct |
2 ms |
15964 KB |
Output is correct |
4 |
Correct |
3 ms |
18524 KB |
Output is correct |
5 |
Correct |
3 ms |
20572 KB |
Output is correct |
6 |
Correct |
2 ms |
18612 KB |
Output is correct |
7 |
Correct |
3 ms |
18524 KB |
Output is correct |
8 |
Correct |
3 ms |
20524 KB |
Output is correct |
9 |
Correct |
2 ms |
15900 KB |
Output is correct |
10 |
Correct |
2 ms |
18268 KB |
Output is correct |
11 |
Correct |
3 ms |
20468 KB |
Output is correct |
12 |
Correct |
2 ms |
13492 KB |
Output is correct |
13 |
Correct |
2 ms |
18212 KB |
Output is correct |
14 |
Correct |
3 ms |
20572 KB |
Output is correct |
15 |
Correct |
3 ms |
18524 KB |
Output is correct |
16 |
Correct |
2 ms |
18520 KB |
Output is correct |
17 |
Correct |
3 ms |
18524 KB |
Output is correct |
18 |
Correct |
3 ms |
18524 KB |
Output is correct |
19 |
Correct |
3 ms |
18524 KB |
Output is correct |
20 |
Correct |
5 ms |
18780 KB |
Output is correct |
21 |
Correct |
3 ms |
18524 KB |
Output is correct |
22 |
Correct |
3 ms |
18524 KB |
Output is correct |
23 |
Correct |
2 ms |
18524 KB |
Output is correct |
24 |
Correct |
3 ms |
18620 KB |
Output is correct |
25 |
Correct |
3 ms |
18524 KB |
Output is correct |
26 |
Correct |
3 ms |
18524 KB |
Output is correct |
27 |
Correct |
2 ms |
18524 KB |
Output is correct |
28 |
Correct |
2 ms |
18360 KB |
Output is correct |
29 |
Correct |
2 ms |
16220 KB |
Output is correct |
30 |
Correct |
2 ms |
16476 KB |
Output is correct |
31 |
Correct |
2 ms |
16476 KB |
Output is correct |
32 |
Correct |
2 ms |
16416 KB |
Output is correct |
33 |
Correct |
2 ms |
16476 KB |
Output is correct |
34 |
Correct |
2 ms |
16476 KB |
Output is correct |
35 |
Correct |
2 ms |
16476 KB |
Output is correct |
36 |
Correct |
2 ms |
18012 KB |
Output is correct |
37 |
Correct |
2 ms |
16220 KB |
Output is correct |
38 |
Correct |
2 ms |
18220 KB |
Output is correct |
39 |
Correct |
2 ms |
16220 KB |
Output is correct |
40 |
Correct |
2 ms |
18252 KB |
Output is correct |
41 |
Correct |
3 ms |
16220 KB |
Output is correct |
42 |
Correct |
3 ms |
20828 KB |
Output is correct |
43 |
Correct |
3 ms |
20828 KB |
Output is correct |
44 |
Correct |
3 ms |
20828 KB |
Output is correct |
45 |
Correct |
3 ms |
20828 KB |
Output is correct |
46 |
Correct |
2 ms |
15964 KB |
Output is correct |
47 |
Correct |
2 ms |
15960 KB |
Output is correct |
48 |
Correct |
3 ms |
20824 KB |
Output is correct |
49 |
Correct |
3 ms |
21080 KB |
Output is correct |
50 |
Correct |
3 ms |
20828 KB |
Output is correct |
51 |
Correct |
3 ms |
20572 KB |
Output is correct |
52 |
Correct |
3 ms |
23132 KB |
Output is correct |
53 |
Correct |
3 ms |
18520 KB |
Output is correct |
54 |
Correct |
3 ms |
22620 KB |
Output is correct |
55 |
Correct |
4 ms |
21084 KB |
Output is correct |
56 |
Correct |
3 ms |
22620 KB |
Output is correct |
57 |
Correct |
3 ms |
21020 KB |
Output is correct |
58 |
Correct |
3 ms |
21084 KB |
Output is correct |
59 |
Correct |
3 ms |
21340 KB |
Output is correct |
60 |
Correct |
3 ms |
21340 KB |
Output is correct |
61 |
Correct |
4 ms |
21340 KB |
Output is correct |
62 |
Correct |
4 ms |
21848 KB |
Output is correct |
63 |
Correct |
4 ms |
21804 KB |
Output is correct |
64 |
Correct |
4 ms |
21852 KB |
Output is correct |
65 |
Correct |
4 ms |
21852 KB |
Output is correct |
66 |
Correct |
4 ms |
21944 KB |
Output is correct |
67 |
Correct |
4 ms |
21852 KB |
Output is correct |
68 |
Correct |
4 ms |
21596 KB |
Output is correct |
69 |
Correct |
5 ms |
21596 KB |
Output is correct |
70 |
Correct |
4 ms |
21336 KB |
Output is correct |
71 |
Correct |
3 ms |
21340 KB |
Output is correct |
72 |
Correct |
3 ms |
21304 KB |
Output is correct |
73 |
Correct |
3 ms |
21472 KB |
Output is correct |
74 |
Correct |
3 ms |
19548 KB |
Output is correct |
75 |
Correct |
3 ms |
19292 KB |
Output is correct |
76 |
Correct |
3 ms |
21596 KB |
Output is correct |
77 |
Correct |
4 ms |
19548 KB |
Output is correct |
78 |
Correct |
3 ms |
19548 KB |
Output is correct |
79 |
Correct |
3 ms |
19548 KB |
Output is correct |
80 |
Correct |
3 ms |
20572 KB |
Output is correct |
81 |
Correct |
3 ms |
20996 KB |
Output is correct |
82 |
Correct |
3 ms |
21084 KB |
Output is correct |
83 |
Correct |
4 ms |
20828 KB |
Output is correct |
84 |
Correct |
3 ms |
21080 KB |
Output is correct |
85 |
Correct |
3 ms |
21084 KB |
Output is correct |
86 |
Correct |
4 ms |
23900 KB |
Output is correct |
87 |
Correct |
4 ms |
23764 KB |
Output is correct |
88 |
Correct |
5 ms |
21852 KB |
Output is correct |
89 |
Correct |
6 ms |
21852 KB |
Output is correct |
90 |
Correct |
3 ms |
20572 KB |
Output is correct |
91 |
Correct |
3 ms |
16216 KB |
Output is correct |
92 |
Correct |
12 ms |
36488 KB |
Output is correct |
93 |
Correct |
10 ms |
34396 KB |
Output is correct |
94 |
Correct |
3 ms |
19036 KB |
Output is correct |
95 |
Correct |
10 ms |
33056 KB |
Output is correct |
96 |
Correct |
10 ms |
34396 KB |
Output is correct |
97 |
Correct |
4 ms |
20828 KB |
Output is correct |
98 |
Correct |
7 ms |
27948 KB |
Output is correct |
99 |
Correct |
7 ms |
30044 KB |
Output is correct |
100 |
Correct |
7 ms |
27740 KB |
Output is correct |
101 |
Correct |
7 ms |
30044 KB |
Output is correct |
102 |
Correct |
10 ms |
30044 KB |
Output is correct |
103 |
Correct |
14 ms |
38492 KB |
Output is correct |
104 |
Correct |
12 ms |
36128 KB |
Output is correct |
105 |
Correct |
13 ms |
37724 KB |
Output is correct |
106 |
Correct |
13 ms |
38748 KB |
Output is correct |
107 |
Correct |
13 ms |
38744 KB |
Output is correct |
108 |
Correct |
13 ms |
38744 KB |
Output is correct |
109 |
Correct |
13 ms |
38748 KB |
Output is correct |
110 |
Correct |
15 ms |
38748 KB |
Output is correct |
111 |
Correct |
16 ms |
38748 KB |
Output is correct |
112 |
Correct |
13 ms |
38612 KB |
Output is correct |
113 |
Correct |
15 ms |
38748 KB |
Output is correct |
114 |
Correct |
12 ms |
34884 KB |
Output is correct |
115 |
Correct |
11 ms |
34908 KB |
Output is correct |
116 |
Correct |
12 ms |
35076 KB |
Output is correct |
117 |
Correct |
11 ms |
35032 KB |
Output is correct |
118 |
Correct |
15 ms |
38232 KB |
Output is correct |
119 |
Correct |
16 ms |
37980 KB |
Output is correct |
120 |
Correct |
13 ms |
38488 KB |
Output is correct |
121 |
Correct |
12 ms |
37720 KB |
Output is correct |
122 |
Correct |
12 ms |
37468 KB |
Output is correct |
123 |
Correct |
12 ms |
37720 KB |
Output is correct |
124 |
Correct |
7 ms |
30040 KB |
Output is correct |
125 |
Correct |
9 ms |
31792 KB |
Output is correct |
126 |
Correct |
9 ms |
31332 KB |
Output is correct |
127 |
Correct |
10 ms |
31528 KB |
Output is correct |
128 |
Correct |
10 ms |
31564 KB |
Output is correct |
129 |
Correct |
8 ms |
31580 KB |
Output is correct |
130 |
Correct |
11 ms |
36788 KB |
Output is correct |
131 |
Correct |
13 ms |
37416 KB |
Output is correct |
132 |
Correct |
12 ms |
35932 KB |
Output is correct |
133 |
Correct |
13 ms |
37980 KB |
Output is correct |
134 |
Correct |
6 ms |
28020 KB |
Output is correct |
135 |
Correct |
5 ms |
30300 KB |
Output is correct |
136 |
Correct |
9 ms |
36700 KB |
Output is correct |
137 |
Correct |
14 ms |
50520 KB |
Output is correct |
138 |
Correct |
5 ms |
23388 KB |
Output is correct |
139 |
Correct |
9 ms |
38748 KB |
Output is correct |
140 |
Correct |
11 ms |
50312 KB |
Output is correct |
141 |
Correct |
8 ms |
41820 KB |
Output is correct |
142 |
Correct |
9 ms |
39068 KB |
Output is correct |
143 |
Correct |
14 ms |
50524 KB |
Output is correct |
144 |
Correct |
3 ms |
15964 KB |
Output is correct |
145 |
Correct |
12 ms |
45844 KB |
Output is correct |
146 |
Correct |
14 ms |
50524 KB |
Output is correct |
147 |
Correct |
18 ms |
46428 KB |
Output is correct |
148 |
Correct |
19 ms |
48736 KB |
Output is correct |
149 |
Correct |
18 ms |
48472 KB |
Output is correct |
150 |
Correct |
19 ms |
52308 KB |
Output is correct |
151 |
Correct |
22 ms |
52312 KB |
Output is correct |
152 |
Correct |
20 ms |
52104 KB |
Output is correct |
153 |
Correct |
20 ms |
52124 KB |
Output is correct |
154 |
Correct |
19 ms |
52312 KB |
Output is correct |
155 |
Correct |
21 ms |
52312 KB |
Output is correct |
156 |
Correct |
20 ms |
51660 KB |
Output is correct |
157 |
Correct |
18 ms |
51804 KB |
Output is correct |
158 |
Correct |
21 ms |
46740 KB |
Output is correct |
159 |
Correct |
16 ms |
46428 KB |
Output is correct |
160 |
Correct |
15 ms |
46552 KB |
Output is correct |
161 |
Correct |
15 ms |
44380 KB |
Output is correct |
162 |
Correct |
16 ms |
42380 KB |
Output is correct |
163 |
Correct |
15 ms |
41820 KB |
Output is correct |
164 |
Correct |
18 ms |
43100 KB |
Output is correct |
165 |
Correct |
21 ms |
41560 KB |
Output is correct |
166 |
Correct |
18 ms |
42840 KB |
Output is correct |
167 |
Correct |
19 ms |
42076 KB |
Output is correct |
168 |
Correct |
10 ms |
36444 KB |
Output is correct |
169 |
Correct |
11 ms |
39320 KB |
Output is correct |
170 |
Correct |
11 ms |
39516 KB |
Output is correct |
171 |
Correct |
12 ms |
39304 KB |
Output is correct |
172 |
Correct |
11 ms |
39004 KB |
Output is correct |
173 |
Correct |
11 ms |
39364 KB |
Output is correct |
174 |
Correct |
18 ms |
58716 KB |
Output is correct |
175 |
Correct |
21 ms |
61276 KB |
Output is correct |
176 |
Correct |
19 ms |
60312 KB |
Output is correct |
177 |
Correct |
17 ms |
57684 KB |
Output is correct |
178 |
Correct |
8 ms |
34396 KB |
Output is correct |
179 |
Correct |
26 ms |
56400 KB |
Output is correct |
180 |
Correct |
101 ms |
111344 KB |
Output is correct |
181 |
Correct |
127 ms |
152692 KB |
Output is correct |
182 |
Correct |
37 ms |
96084 KB |
Output is correct |
183 |
Correct |
94 ms |
114516 KB |
Output is correct |
184 |
Correct |
125 ms |
152660 KB |
Output is correct |
185 |
Correct |
81 ms |
103364 KB |
Output is correct |
186 |
Correct |
107 ms |
131952 KB |
Output is correct |
187 |
Correct |
125 ms |
152656 KB |
Output is correct |
188 |
Correct |
50 ms |
80212 KB |
Output is correct |
189 |
Correct |
97 ms |
92452 KB |
Output is correct |
190 |
Correct |
124 ms |
152656 KB |
Output is correct |
191 |
Correct |
207 ms |
227668 KB |
Output is correct |
192 |
Correct |
230 ms |
233300 KB |
Output is correct |
193 |
Correct |
239 ms |
262488 KB |
Output is correct |
194 |
Correct |
314 ms |
372560 KB |
Output is correct |
195 |
Correct |
306 ms |
372484 KB |
Output is correct |
196 |
Correct |
304 ms |
372292 KB |
Output is correct |
197 |
Correct |
449 ms |
372576 KB |
Output is correct |
198 |
Correct |
326 ms |
372560 KB |
Output is correct |
199 |
Correct |
320 ms |
372484 KB |
Output is correct |
200 |
Correct |
283 ms |
354132 KB |
Output is correct |
201 |
Correct |
298 ms |
354132 KB |
Output is correct |
202 |
Correct |
299 ms |
262480 KB |
Output is correct |
203 |
Correct |
259 ms |
262712 KB |
Output is correct |
204 |
Correct |
273 ms |
262144 KB |
Output is correct |
205 |
Correct |
272 ms |
261972 KB |
Output is correct |
206 |
Correct |
231 ms |
301956 KB |
Output is correct |
207 |
Correct |
234 ms |
301392 KB |
Output is correct |
208 |
Correct |
219 ms |
290388 KB |
Output is correct |
209 |
Correct |
285 ms |
309500 KB |
Output is correct |
210 |
Correct |
248 ms |
304468 KB |
Output is correct |
211 |
Correct |
262 ms |
320768 KB |
Output is correct |
212 |
Correct |
82 ms |
94292 KB |
Output is correct |
213 |
Correct |
141 ms |
171604 KB |
Output is correct |
214 |
Correct |
127 ms |
167252 KB |
Output is correct |
215 |
Correct |
149 ms |
173652 KB |
Output is correct |
216 |
Correct |
142 ms |
165200 KB |
Output is correct |
217 |
Correct |
129 ms |
167252 KB |
Output is correct |
218 |
Correct |
313 ms |
350956 KB |
Output is correct |
219 |
Correct |
312 ms |
345680 KB |
Output is correct |
220 |
Correct |
296 ms |
322896 KB |
Output is correct |
221 |
Correct |
291 ms |
347656 KB |
Output is correct |
222 |
Correct |
79 ms |
95600 KB |
Output is correct |