QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#523253#9164. ToyDan4Life#35 356ms384108kbC++231.6kb2024-08-17 23:56:292024-08-17 23:56:30

Judging History

你现在查看的是最新测评结果

  • [2024-08-17 23:56:30]
  • 评测
  • 测评结果:35
  • 用时:356ms
  • 内存:384108kb
  • [2024-08-17 23:56:29]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) begin(a), end(a)
using vi = vector<int>;
using ll = long long;
const int mxN = (int)100;

string a[mxN];
int n, m, H, V;
int pref[mxN][mxN];
int hr, hc, vr, vc, dr, dc;
bitset<mxN> vis[mxN][mxN][mxN];

int getSum(int x1, int y1, int x2, int y2){
	x1++, y1++, x2++, y2++;
	return pref[x2][y2]-pref[x1-1][y2]-pref[x2][y1-1]+pref[x1-1][y1-1];
}

bool dfs(int hr, int hc, int vr, int vc){
	if(hr<0 or hr>=n or hc<0 or hc>m-H) return 0; 
	if(vr<0 or vr>n-V or vc<0 or vc>=m) return 0;
	if(vr+V-1<hr or vr>hr or vc<hc or vc>hc+H-1) return 0;
	if(getSum(hr,hc,hr,hc+H-1)) return 0;
	if(getSum(vr,vc,vr+V-1,vc)) return 0;
	if(vis[hr][hc][vr][vc]) return 0;
	
	
	vis[hr][hc][vr][vc]=1;
	if(hr==dr and hc>dc-H and hc<=dc)
		if(vc==dc and vr>dr-V and vr<=dr)
			return 1;
	if(dfs(hr-1,hc,vr,vc)) return 1;
	if(dfs(hr+1,hc,vr,vc)) return 1;
	if(dfs(hr,hc-1,vr,vc)) return 1;
	if(dfs(hr,hc+1,vr,vc)) return 1;
	if(dfs(hr,hc,vr-1,vc)) return 1;
	if(dfs(hr,hc,vr+1,vc)) return 1;
	if(dfs(hr,hc,vr,vc-1)) return 1;
	if(dfs(hr,hc,vr,vc+1)) return 1;
	return 0;
}


int main(){
	ios_base::sync_with_stdio(false); cin.tie(0);
	cin >> n >> m >> H >> V >> hr >> hc >> vr >> vc;
	swap(n,m), swap(hr,hc), swap(vr,vc);
	for(int i = 0; i < n; i++) cin >> a[i];
	for(int i = 0; i < n; i++){
		for(int j = 0; j < m; j++){
			if(a[i][j]=='*') dr=i, dc=j;
			pref[i+1][j+1] = pref[i+1][j]+pref[i][j+1]-pref[i][j]+(a[i][j]=='X');
		}
	}
	cout << (dfs(hr,hc,vr,vc)?"YES":"NO") << "\n";
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 14
Accepted

Test #1:

score: 14
Accepted
time: 1ms
memory: 3808kb

input:

32 16 23 15
3 8 4 1
................................
................................
................................
................................
................................
*...............................
................................
................................
...................

output:

YES

result:

ok answer is YES

Test #2:

score: 14
Accepted
time: 11ms
memory: 26652kb

input:

50 50 22 14
26 34 36 33
..................................................
..................................................
..................................................
..................................................
..................................................
........................

output:

YES

result:

ok answer is YES

Test #3:

score: 14
Accepted
time: 1ms
memory: 3840kb

input:

50 50 50 50
0 18 2 0
..................................................
...............................................X..
..................................................
..................................................
..................................................
...........................

output:

NO

result:

ok answer is NO

Test #4:

score: 14
Accepted
time: 1ms
memory: 4008kb

input:

5 47 4 47
1 25 3 0
.X...
.....
.....
.X...
.....
.....
.....
.....
.....
.....
.....
.....
..*..
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
X....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....

output:

YES

result:

ok answer is YES

Test #5:

score: 14
Accepted
time: 1ms
memory: 4848kb

input:

50 50 29 46
11 5 29 3
..................................................
..................................................
..................................................
..................................................
....................X.......................X.....
..........................

output:

NO

result:

ok answer is NO

Test #6:

score: 14
Accepted
time: 0ms
memory: 3732kb

input:

50 50 50 50
0 37 22 0
............X.............X..............X........
..................................................
..................................................
....................................X.............
................................X.................
....................X.....

output:

NO

result:

ok answer is NO

Test #7:

score: 14
Accepted
time: 0ms
memory: 3764kb

input:

27 34 19 18
5 29 20 14
............X..X.X.X..XX..X
.....X..X...XX.............
.......X.X........X........
X...................X...X..
....XX.....................
.................X........X
..........X.X.....X.......X
..........X......X....X....
X..X........XX.....X.......
..X.X............X..........

output:

NO

result:

ok answer is NO

Test #8:

score: 14
Accepted
time: 0ms
memory: 3732kb

input:

50 50 16 16
21 35 36 33
.X.............XX....X...X.......X................
.................X.......X.........X........X.....
...X........X......XX........X.......X...........X
.X......X.......X.....X.X................X.XX....X
......X.........................X.............X.X.
........X...X..X...X....

output:

NO

result:

ok answer is NO

Test #9:

score: 14
Accepted
time: 0ms
memory: 3700kb

input:

50 50 50 50
0 20 3 0
.......X..........................................
....X............X.......X.......X...........X....
.......X....X........X..X.......X..........X..X...
.X......X.......X.................X.............X.
.................X.X....X..XX.....................
.......X...................

output:

NO

result:

ok answer is NO

Test #10:

score: 14
Accepted
time: 0ms
memory: 3680kb

input:

4 7 4 5
0 2 0 1
.X..
.X..
....
..X.
..X.
.XX*
XXXX

output:

NO

result:

ok answer is NO

Test #11:

score: 14
Accepted
time: 0ms
memory: 3760kb

input:

50 50 13 13
2 46 11 36
.X.X.X.....XX.XX.X..XX..XXXXXXX.XXX...XX.X.X.XXXX.
.X..X...X.X.X.X.X.X..XX..XX.XXXX..X.X..XXX...X..X.
X..X...X....XX....XX......X...X..XXX.X.X..X.X.....
...X.XX...X..XX.X..XX.X...X.X...X.XXX.XX..XX..XX..
..X.XX...X.X.X..X.X.......X.X......X..X..X...X.X.X
......XX......X..X..X....

output:

NO

result:

ok answer is NO

Test #12:

score: 14
Accepted
time: 0ms
memory: 3704kb

input:

50 50 50 50
0 46 6 0
XX.....X....X...X.X.X..XX..XX...X.XX..X.......X...
XXX........X.X.X.XX..X..XX..XXX....X.XX.....X...XX
..X.X...X.X.........X..X....XX....X*XXXXXXX...XX..
....X..XX....X.X.X..X..XXX...XXX..XXX.X..X.XX.XXXX
XXX......X.X.....X.X.........XXXXX.XX..X.X.X.XXX.X
.X.....XXXX....X...X.XXX...

output:

NO

result:

ok answer is NO

Test #13:

score: 14
Accepted
time: 27ms
memory: 38772kb

input:

48 50 24 21
3 9 6 3
................................................
................................................
................................................
................................................
................................................
......................................

output:

NO

result:

ok answer is NO

Test #14:

score: 14
Accepted
time: 23ms
memory: 33184kb

input:

50 45 23 25
0 27 14 12
..................................................
..................................................
..................................................
..................................................
..................................................
.........................

output:

NO

result:

ok answer is NO

Test #15:

score: 14
Accepted
time: 24ms
memory: 31860kb

input:

50 46 23 25
2 25 20 16
..................................................
..................................................
..................................................
..................................................
..................................................
.........................

output:

NO

result:

ok answer is NO

Test #16:

score: 14
Accepted
time: 24ms
memory: 42392kb

input:

50 50 25 25
0 0 0 0
..................................................
..................................................
..................................................
..................................................
..................................................
............................

output:

NO

result:

ok answer is NO

Test #17:

score: 14
Accepted
time: 23ms
memory: 45212kb

input:

50 50 24 24
0 0 0 0
..................................................
..................................................
..................................................
..................................................
..................................................
............................

output:

NO

result:

ok answer is NO

Test #18:

score: 14
Accepted
time: 40ms
memory: 39624kb

input:

50 50 23 23
0 0 0 0
..................................................
..................................................
..................................................
..................................................
..................................................
............................

output:

NO

result:

ok answer is NO

Test #19:

score: 14
Accepted
time: 15ms
memory: 35808kb

input:

50 50 25 25
0 0 0 0
..................................................
..................................................
..................................................
..................................................
..................................................
............................

output:

YES

result:

ok answer is YES

Test #20:

score: 14
Accepted
time: 17ms
memory: 41924kb

input:

50 50 24 24
0 0 0 0
..................................................
..................................................
..................................................
..................................................
..................................................
............................

output:

YES

result:

ok answer is YES

Test #21:

score: 14
Accepted
time: 12ms
memory: 39928kb

input:

50 50 23 23
0 0 0 0
..................................................
..................................................
..................................................
..................................................
..................................................
............................

output:

YES

result:

ok answer is YES

Test #22:

score: 14
Accepted
time: 9ms
memory: 19840kb

input:

50 50 12 12
0 0 0 0
.........................X.......................*
.........................X........................
.........................X........................
.........................X........................
.........................X........................
............................

output:

YES

result:

ok answer is YES

Test #23:

score: 14
Accepted
time: 4ms
memory: 20056kb

input:

50 50 11 11
0 0 0 0
.........................X.......................*
.........................X........................
.........................X........................
.........................X........................
.........................X........................
............................

output:

YES

result:

ok answer is YES

Test #24:

score: 14
Accepted
time: 8ms
memory: 14852kb

input:

50 50 12 12
0 0 0 0
.........................X.......................*
.........................X........................
.........................X........................
.........................X........................
.........................X........................
............................

output:

YES

result:

ok answer is YES

Test #25:

score: 14
Accepted
time: 0ms
memory: 15468kb

input:

50 50 11 11
0 0 0 0
.........................X.......................*
.........................X........................
.........................X........................
.........................X........................
.........................X........................
............................

output:

YES

result:

ok answer is YES

Test #26:

score: 14
Accepted
time: 0ms
memory: 15032kb

input:

50 50 10 10
0 0 0 0
.........................X.......................*
.........................X........................
.........................X........................
.........................X........................
.........................X........................
............................

output:

YES

result:

ok answer is YES

Test #27:

score: 14
Accepted
time: 3ms
memory: 12060kb

input:

50 50 9 9
0 0 0 0
.........................X.......................*
.........................X........................
.........................X........................
.........................X........................
.........................X........................
.........................X....

output:

YES

result:

ok answer is YES

Test #28:

score: 14
Accepted
time: 0ms
memory: 11980kb

input:

50 47 8 8
0 0 0 0
..................................................
..................................................
..................................................
..................................................
..................................................
..............................

output:

YES

result:

ok answer is YES

Test #29:

score: 14
Accepted
time: 12ms
memory: 17912kb

input:

45 48 10 10
0 0 0 0
.............................................
.............................................
.............................................
.............................................
.............................................
.............................................
.......

output:

NO

result:

ok answer is NO

Test #30:

score: 14
Accepted
time: 0ms
memory: 9496kb

input:

48 47 6 6
0 0 0 0
................................................
................................................
................................................
................................................
................................................
........................................

output:

YES

result:

ok answer is YES

Test #31:

score: 14
Accepted
time: 10ms
memory: 13824kb

input:

50 50 6 6
0 0 0 0
..................................................
..................................................
..................................................
..................................................
..................................................
..............................

output:

NO

result:

ok answer is NO

Test #32:

score: 14
Accepted
time: 0ms
memory: 10680kb

input:

46 49 9 9
0 0 0 0
..............................................
..............................................
..............................................
..............................................
..............................................
..............................................
...

output:

YES

result:

ok answer is YES

Test #33:

score: 14
Accepted
time: 3ms
memory: 14196kb

input:

47 48 8 8
0 0 0 0
...............................................
...............................................
...............................................
...............................................
...............................................
.............................................

output:

YES

result:

ok answer is YES

Test #34:

score: 14
Accepted
time: 1ms
memory: 3900kb

input:

46 48 10 12
0 24 0 24
.X...X...X...X...X...X...X...X...X...X...X...X
.X...X...X...X...X...X...X...X...X...X...X...X
.X...X...X...X...X...X...X...X...X...X...X...X
.X...X...X...X...X...X...X...X...X...X...X...X
.X...X...X...X...X...X...X...X...X...X...X...X
.X...X...X...X...X...X...X...X...X...X...X....

output:

YES

result:

ok answer is YES

Test #35:

score: 14
Accepted
time: 4ms
memory: 7056kb

input:

46 45 10 11
0 0 0 0
.......................X......................
.......................X......................
.......................X......................
.......................X......................
.......................X......................
.......................X........................

output:

NO

result:

ok answer is NO

Test #36:

score: 14
Accepted
time: 4ms
memory: 7272kb

input:

45 48 11 12
0 0 0 0
......................X......................
......................X......................
......................X......................
......................X......................
......................X......................
......................X......................
.......

output:

NO

result:

ok answer is NO

Test #37:

score: 14
Accepted
time: 4ms
memory: 7308kb

input:

47 47 10 11
0 0 0 0
.......................X.......................
.......................X.......................
.......................X.......................
.......................X.......................
.......................X.......................
.......................X...................

output:

NO

result:

ok answer is NO

Test #38:

score: 14
Accepted
time: 4ms
memory: 7292kb

input:

45 48 9 12
0 0 0 0
......................X......................
......................X......................
......................X......................
......................X......................
......................X......................
......................X......................
........

output:

NO

result:

ok answer is NO

Test #39:

score: 14
Accepted
time: 0ms
memory: 7260kb

input:

48 48 11 10
0 0 0 0
........................X.......................
........................X.......................
........................X.......................
........................X.......................
........................X.......................
........................X.............

output:

NO

result:

ok answer is NO

Test #40:

score: 14
Accepted
time: 1ms
memory: 3868kb

input:

50 50 50 50
0 30 1 0
..................................................
..................................................
..................................................
..................................................
..................................................
...........................

output:

YES

result:

ok answer is YES

Test #41:

score: 14
Accepted
time: 1ms
memory: 4084kb

input:

50 50 50 50
0 36 36 0
..................................................
..................................................
..................................................
..................................................
..................................................
..........................

output:

YES

result:

ok answer is YES

Test #42:

score: 14
Accepted
time: 1ms
memory: 3936kb

input:

50 50 50 50
0 20 23 0
..................................................
..................................................
..................................................
..................................................
..................................................
..........................

output:

YES

result:

ok answer is YES

Test #43:

score: 14
Accepted
time: 1ms
memory: 4072kb

input:

50 50 50 50
0 2 30 0
..................................................
..................................................
..................................................
..................................................
..................................................
...........................

output:

YES

result:

ok answer is YES

Test #44:

score: 14
Accepted
time: 0ms
memory: 3640kb

input:

48 45 11 11
0 0 0 0
*...............................................
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

YES

result:

ok answer is YES

Subtask #2:

score: 21
Accepted

Dependency #1:

100%
Accepted

Test #45:

score: 21
Accepted
time: 8ms
memory: 10632kb

input:

65 28 13 17
21 18 29 11
.................................................................
.................................................................
................................................................X
......................................................X..........
...............

output:

NO

result:

ok answer is NO

Test #46:

score: 21
Accepted
time: 7ms
memory: 8068kb

input:

90 90 76 46
14 60 38 23
..........................................................................................
..........................................................................................
................................................................................X.........
......

output:

NO

result:

ok answer is NO

Test #47:

score: 21
Accepted
time: 1ms
memory: 3932kb

input:

90 90 90 90
0 36 88 0
..........................................................................................
..........................................................................................
..........................................................................................
........

output:

NO

result:

ok answer is NO

Test #48:

score: 21
Accepted
time: 1ms
memory: 5940kb

input:

72 89 62 70
8 14 61 9
.....................................................................X..
........................................................................
.....X..................................................................
..............................................................

output:

NO

result:

ok answer is NO

Test #49:

score: 21
Accepted
time: 8ms
memory: 19316kb

input:

90 90 34 30
27 48 57 48
..............................................................X...........................
...........X..................................................................X...........
.....................................X............................................X.......
......

output:

NO

result:

ok answer is NO

Test #50:

score: 21
Accepted
time: 0ms
memory: 3748kb

input:

90 90 90 90
0 73 81 0
..........................................................................................
.....................................................................................X....
..........................................................................................
........

output:

NO

result:

ok answer is NO

Test #51:

score: 21
Accepted
time: 0ms
memory: 3732kb

input:

85 55 14 43
15 39 20 10
.....X.................X..................X.X......XX........XXXX..............X.....
.................X....X...........X........X..XXX........X................X..........
....X........X..X...X.X.........................X...........X.........X.........X....
..............X......

output:

NO

result:

ok answer is NO

Test #52:

score: 21
Accepted
time: 0ms
memory: 3680kb

input:

90 90 59 36
21 62 34 53
X............................X.............X.......XX......X...X.....X.............X...X..
.................X..........X.....X.........X...................................XX...XX..X
..................XX..X...XX.....XXX......X....X..........................................
......

output:

NO

result:

ok answer is NO

Test #53:

score: 21
Accepted
time: 0ms
memory: 3728kb

input:

90 90 90 90
0 30 34 0
.X..........................................X........X......................X....X........
.......X.X.............X.....................X....X.................X...............X...XX
....X.......X...........................X......X..X.........X...........X...X........X....
........

output:

NO

result:

ok answer is NO

Test #54:

score: 21
Accepted
time: 0ms
memory: 3788kb

input:

30 90 11 10
11 77 13 75
X.XX.X...X.......XX.X.X..XX.X.
X...XXX..X.XXXX..XXX.X....X.XX
.X........X.X........XX...X.XX
XX..X.....X...X.XXX...X.X.XX.X
XXX.........X..X.X...XXX.XX...
..X.X...X...XXX..X..XX.XX.X..X
....XXX.XXX...X.....X..XX.X...
X...X..X.X..XXXX.X..XX..X...X.
......X.X.X...X.XXX.XX.X..X....

output:

NO

result:

ok answer is NO

Test #55:

score: 21
Accepted
time: 0ms
memory: 3796kb

input:

90 90 66 80
2 5 17 0
X...XXX.X...XX....XX..XX.XX..X..XXXX...XXX..X....XXX.X...XX..X..XX..XXXX.X...XXX...XX.....
X...XXX..X...X.X...XXXX.X.X...X.X...X.X.XX.X..XXX.X..X...X....X.X.XX.....XX..X......XXX...
.X.......X......X........XXXXX.X.X..X..X.XX.X..........X.......X.X..X..X.XX...X.X....X...X
.X.......

output:

NO

result:

ok answer is NO

Test #56:

score: 21
Accepted
time: 0ms
memory: 3748kb

input:

90 90 90 90
0 9 65 0
..X..X.......XX.X.....X..XX.X...XXX.X..XX..X...X.X.X.XX........X.....XX..X....X...X.X....X
....X....X.X......XXX..X.X....X....XXX.....XX..XX...XX.....XXX....X...XX.......X......X.XX
XX..X.XX.XXX....X....XXX.XXX....X....XXX...X.X..XXXX..X.XX..X..X..XX.X.X...X..XXX.X..X...X
.XX......

output:

NO

result:

ok answer is NO

Test #57:

score: 21
Accepted
time: 275ms
memory: 310400kb

input:

84 87 38 39
4 39 27 25
....................................................................................
....................................................................................
....................................................................................
.........................

output:

NO

result:

ok answer is NO

Test #58:

score: 21
Accepted
time: 277ms
memory: 307112kb

input:

81 87 38 38
6 39 21 26
.................................................................................
.................................................................................
.................................................................................
..................................

output:

NO

result:

ok answer is NO

Test #59:

score: 21
Accepted
time: 268ms
memory: 295604kb

input:

88 82 40 39
12 30 43 27
........................................................................................
........................................................................................
........................................................................................
............

output:

NO

result:

ok answer is NO

Test #60:

score: 21
Accepted
time: 345ms
memory: 384108kb

input:

90 90 45 45
0 0 0 0
..........................................................................................
..........................................................................................
..........................................................................................
..........

output:

NO

result:

ok answer is NO

Test #61:

score: 21
Accepted
time: 353ms
memory: 346996kb

input:

90 90 44 44
0 0 0 0
..........................................................................................
..........................................................................................
..........................................................................................
..........

output:

NO

result:

ok answer is NO

Test #62:

score: 21
Accepted
time: 356ms
memory: 290248kb

input:

90 90 43 43
0 0 0 0
..........................................................................................
..........................................................................................
..........................................................................................
..........

output:

NO

result:

ok answer is NO

Test #63:

score: 21
Accepted
time: 148ms
memory: 365472kb

input:

90 90 45 45
0 0 0 0
..........................................................................................
..........................................................................................
..........................................................................................
..........

output:

YES

result:

ok answer is YES

Test #64:

score: 21
Accepted
time: 143ms
memory: 328548kb

input:

90 90 44 44
0 0 0 0
..........................................................................................
..........................................................................................
..........................................................................................
..........

output:

YES

result:

ok answer is YES

Test #65:

score: 21
Accepted
time: 119ms
memory: 291828kb

input:

90 90 43 43
0 0 0 0
..........................................................................................
..........................................................................................
..........................................................................................
..........

output:

YES

result:

ok answer is YES

Test #66:

score: 21
Accepted
time: 76ms
memory: 181664kb

input:

90 90 22 22
0 0 0 0
.............................................X...........................................*
.............................................X............................................
.............................................X............................................
..........

output:

YES

result:

ok answer is YES

Test #67:

score: 21
Accepted
time: 63ms
memory: 152092kb

input:

90 90 21 21
0 0 0 0
.............................................X...........................................*
.............................................X............................................
.............................................X............................................
..........

output:

YES

result:

ok answer is YES

Test #68:

score: 21
Accepted
time: 53ms
memory: 113120kb

input:

90 90 22 22
0 0 0 0
.............................................X...........................................*
.............................................X............................................
.............................................X............................................
..........

output:

YES

result:

ok answer is YES

Test #69:

score: 21
Accepted
time: 48ms
memory: 102688kb

input:

90 90 21 21
0 0 0 0
.............................................X...........................................*
.............................................X............................................
.............................................X............................................
..........

output:

YES

result:

ok answer is YES

Test #70:

score: 21
Accepted
time: 58ms
memory: 88988kb

input:

90 90 20 20
0 0 0 0
.............................................X...........................................*
.............................................X............................................
.............................................X............................................
..........

output:

YES

result:

ok answer is YES

Test #71:

score: 21
Accepted
time: 27ms
memory: 75072kb

input:

90 90 19 19
0 0 0 0
.............................................X...........................................*
.............................................X............................................
.............................................X............................................
..........

output:

YES

result:

ok answer is YES

Test #72:

score: 21
Accepted
time: 14ms
memory: 31804kb

input:

84 87 9 9
0 0 0 0
....................................................................................
....................................................................................
....................................................................................
..............................

output:

YES

result:

ok answer is YES

Test #73:

score: 21
Accepted
time: 44ms
memory: 53792kb

input:

89 82 9 9
0 0 0 0
.........................................................................................
.........................................................................................
.........................................................................................
...............

output:

NO

result:

ok answer is NO

Test #74:

score: 21
Accepted
time: 19ms
memory: 58504kb

input:

90 90 9 9
0 0 0 0
..........................................................................................
..........................................................................................
..........................................................................................
............

output:

YES

result:

ok answer is YES

Test #75:

score: 21
Accepted
time: 20ms
memory: 38104kb

input:

86 89 6 6
0 0 0 0
......................................................................................
......................................................................................
......................................................................................
........................

output:

NO

result:

ok answer is NO

Test #76:

score: 21
Accepted
time: 16ms
memory: 55392kb

input:

89 90 8 8
0 0 0 0
.........................................................................................
.........................................................................................
.........................................................................................
...............

output:

YES

result:

ok answer is YES

Test #77:

score: 21
Accepted
time: 11ms
memory: 36124kb

input:

83 88 6 6
0 0 0 0
...................................................................................
...................................................................................
...................................................................................
.................................

output:

YES

result:

ok answer is YES

Test #78:

score: 21
Accepted
time: 2ms
memory: 5396kb

input:

86 88 18 22
0 44 0 44
.X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X
.X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X
.X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X...X
.X...X...X...X......

output:

YES

result:

ok answer is YES

Test #79:

score: 21
Accepted
time: 22ms
memory: 33032kb

input:

84 82 19 18
0 0 0 0
..........................................X.........................................
..........................................X.........................................
..........................................X.........................................
............................

output:

NO

result:

ok answer is NO

Test #80:

score: 21
Accepted
time: 34ms
memory: 33184kb

input:

86 86 19 20
0 0 0 0
...........................................X..........................................
...........................................X..........................................
...........................................X..........................................
......................

output:

NO

result:

ok answer is NO

Test #81:

score: 21
Accepted
time: 27ms
memory: 33916kb

input:

81 85 19 19
0 0 0 0
........................................X........................................
........................................X........................................
........................................X........................................
.....................................

output:

NO

result:

ok answer is NO

Test #82:

score: 21
Accepted
time: 28ms
memory: 40160kb

input:

90 84 19 21
0 0 0 0
.............................................X............................................
.............................................X............................................
.............................................X............................................
..........

output:

NO

result:

ok answer is NO

Test #83:

score: 21
Accepted
time: 24ms
memory: 27464kb

input:

82 87 19 20
0 0 0 0
.........................................X........................................
.........................................X........................................
.........................................X........................................
..................................

output:

NO

result:

ok answer is NO

Test #84:

score: 21
Accepted
time: 1ms
memory: 4676kb

input:

90 90 90 90
0 72 10 0
..........................................................................................
..........................................................................................
..........................................................................................
........

output:

YES

result:

ok answer is YES

Test #85:

score: 21
Accepted
time: 1ms
memory: 4704kb

input:

90 90 90 90
0 72 21 0
..........................................................................................
..........................................................................................
..........................................................................................
........

output:

YES

result:

ok answer is YES

Test #86:

score: 21
Accepted
time: 1ms
memory: 4444kb

input:

90 90 90 90
0 27 35 0
..........................................................................................
..........................................................................................
..........................................................................................
........

output:

YES

result:

ok answer is YES

Test #87:

score: 21
Accepted
time: 1ms
memory: 4384kb

input:

90 90 90 90
0 50 25 0
..........................................................................................
..........................................................................................
..........................................................................................
........

output:

YES

result:

ok answer is YES

Test #88:

score: 21
Accepted
time: 0ms
memory: 3624kb

input:

90 89 21 22
0 0 0 0
*.........................................................................................
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.XXXXXX...

output:

YES

result:

ok answer is YES

Subtask #3:

score: 0
Runtime Error

Test #89:

score: 9
Accepted
time: 0ms
memory: 16236kb

input:

105 31 8 4
70 27 75 26
.........................................................................................................
.........................................................................................................
....................................................................

output:

YES

result:

ok answer is YES

Test #90:

score: 0
Runtime Error

input:

300 300 4 8
231 246 234 240
...................................................................................................................................................................................................................................................................................

output:


result:


Subtask #4:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%

Subtask #5:

score: 0
Skipped

Dependency #4:

0%