QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#532854#9164. ToyMispertion#100 ✓585ms291712kbC++234.1kb2024-08-25 13:20:592024-08-25 13:21:00

Judging History

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

  • [2024-08-25 13:21:00]
  • 评测
  • 测评结果:100
  • 用时:585ms
  • 内存:291712kb
  • [2024-08-25 13:20:59]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
#pragma GCC optimize("Ofast")

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
#define int ll
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define pb push_back
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define mispertion ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define F first
#define S second
#define getlast(s) (*s.rbegin())
#define debg cout << "OK\n"

const ld PI = 3.1415926535;
const int N = 1500 + 10;
const int M = 1e5 + 10;
int mod = 998244353;
const int infi = INT_MAX;
const ll infl = 1e16;
const int P = 2;

int mult(int a, int b){
    return a * 1LL * b % mod;
}

int sum(int a, int b){
    if(a + b >= mod)
        return a + b - mod;
    if(a + b < 0)
        return a + b + mod;
    return a + b;
}

int binpow(int a, int n){
    if (n == 0)
        return 1;
    if (n % 2 == 1){
        return mult(binpow(a, n - 1), a);
    }
    else{
        auto b = binpow(a, n / 2);
        return mult(b, b);
    }
}

int n, m, w, h, tmp, a[N][N], pr[N][N], mxu[N][N], mxb[N][N], mxl[N][N], mxr[N][N], used[N][N];
pii st, en;

int gets(int u, int l, int b, int r){
    return pr[b][r] - pr[b][l - 1] - pr[u - 1][r] + pr[u - 1][l - 1];
}

void dfs(int i, int j){
    used[i][j] = 1;
    if(i - 1 > 0 && !used[i - 1][j]){
        int l = max(mxl[i][j], mxl[i - 1][j]), r = min(mxr[i][j], mxr[i - 1][j]);
        if(r - l + 1 >= w)
            dfs(i - 1, j);
    }

    if(i + 1 <= n && !used[i + 1][j]){
        int l = max(mxl[i][j], mxl[i + 1][j]), r = min(mxr[i][j], mxr[i + 1][j]);
        if(r - l + 1 >= w)
            dfs(i + 1, j);
    }
    if(j - 1 > 0 && !used[i][j - 1]){
        int u = max(mxu[i][j], mxu[i][j - 1]), b = min(mxb[i][j], mxb[i][j - 1]);
        if(b - u + 1 >= h)
            dfs(i, j - 1);
    }

    if(j + 1 <= m && !used[i][j + 1]){
        int u = max(mxu[i][j], mxu[i][j + 1]), b = min(mxb[i][j], mxb[i][j + 1]);
        if(b - u + 1 >= h)
            dfs(i, j + 1);
    }
}

void solve(){
    cin >> m >> n >> w >> h;
    cin >> tmp >> st.F >> st.S >> tmp;
    st.F++;
    st.S++;
    for(int i = 1; i <= n; i++){
        string s;
        cin >> s;
        for(int j = 0; j < m; j++){
            if(s[j] == 'X')
                a[i][j + 1] = 1;
            if(s[j] == '*'){
                en = {i, j + 1};
            }
        }
        for(int j = 1; j <= m; j++){
            used[i][j] = a[i][j];
            pr[i][j] = pr[i - 1][j] + pr[i][j - 1] - pr[i - 1][j - 1] + a[i][j];
        }
    }
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= m; j++){
            if(used[i][j])
                continue;
            int lo = max(0LL, j - w), hi = j;
            while(lo + 1 < hi){
                int m = (lo + hi) / 2;
                if(gets(i, m, i, j))
                    lo = m;
                else
                    hi = m;
            }
            mxl[i][j] = hi;

            lo = j, hi = min(m + 1, j + w);
            while(lo + 1 < hi){
                int m = (lo + hi) / 2;
                if(gets(i, j, i, m))
                    hi = m;
                else
                    lo = m;
            }
            mxr[i][j] = lo;

            lo = max(0LL, i - h), hi = i;
            while(lo + 1 < hi){
                int m = (lo + hi) / 2;
                if(gets(m, j, i, j))
                    lo = m;
                else
                    hi = m;
            }
            mxu[i][j] = hi;

            lo = i, hi = min(n + 1, i + h);
            while(lo + 1 < hi){
                int m = (lo + hi) / 2;
                if(gets(i, j, m, j))
                    hi = m;
                else
                    lo = m;
            }
            mxb[i][j] = lo;
        }
    }
    dfs(st.F, st.S);
    cout << (used[en.F][en.S] ? "YES\n" : "NO\n");
}

signed main(){
    mispertion;
    int t = 1;
    //cin >> t;
    while (t--){
        solve();
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 14
Accepted

Test #1:

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

input:

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

output:

YES

result:

ok answer is YES

Test #2:

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

input:

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

output:

YES

result:

ok answer is YES

Test #3:

score: 14
Accepted
time: 2ms
memory: 12260kb

input:

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

output:

NO

result:

ok answer is NO

Test #4:

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

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: 2ms
memory: 12292kb

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: 18420kb

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: 16392kb

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: 16432kb

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: 3ms
memory: 16296kb

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: 2ms
memory: 15920kb

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: 18408kb

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: 16416kb

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: 2ms
memory: 12584kb

input:

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

output:

NO

result:

ok answer is NO

Test #14:

score: 14
Accepted
time: 2ms
memory: 14376kb

input:

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

output:

NO

result:

ok answer is NO

Test #15:

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

input:

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

output:

NO

result:

ok answer is NO

Test #16:

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

input:

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

output:

NO

result:

ok answer is NO

Test #17:

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

input:

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

output:

NO

result:

ok answer is NO

Test #18:

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

input:

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

output:

NO

result:

ok answer is NO

Test #19:

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

input:

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

output:

YES

result:

ok answer is YES

Test #20:

score: 14
Accepted
time: 2ms
memory: 14500kb

input:

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

output:

YES

result:

ok answer is YES

Test #21:

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

input:

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

output:

YES

result:

ok answer is YES

Test #22:

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

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: 3ms
memory: 16544kb

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: 0ms
memory: 16660kb

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: 2ms
memory: 18316kb

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: 18764kb

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: 2ms
memory: 16412kb

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: 2ms
memory: 14496kb

input:

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

output:

YES

result:

ok answer is YES

Test #29:

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

input:

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

output:

NO

result:

ok answer is NO

Test #30:

score: 14
Accepted
time: 2ms
memory: 12580kb

input:

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

output:

YES

result:

ok answer is YES

Test #31:

score: 14
Accepted
time: 2ms
memory: 14504kb

input:

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

output:

NO

result:

ok answer is NO

Test #32:

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

input:

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

output:

YES

result:

ok answer is YES

Test #33:

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

input:

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

output:

YES

result:

ok answer is YES

Test #34:

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

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: 3ms
memory: 16420kb

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: 0ms
memory: 18596kb

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: 3ms
memory: 18484kb

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: 0ms
memory: 16380kb

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: 3ms
memory: 16340kb

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: 0ms
memory: 16492kb

input:

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

output:

YES

result:

ok answer is YES

Test #41:

score: 14
Accepted
time: 2ms
memory: 16496kb

input:

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

output:

YES

result:

ok answer is YES

Test #42:

score: 14
Accepted
time: 2ms
memory: 14360kb

input:

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

output:

YES

result:

ok answer is YES

Test #43:

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

input:

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

output:

YES

result:

ok answer is YES

Test #44:

score: 14
Accepted
time: 2ms
memory: 18600kb

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: 0ms
memory: 14268kb

input:

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

output:

NO

result:

ok answer is NO

Test #46:

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

input:

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

output:

NO

result:

ok answer is NO

Test #47:

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

input:

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

output:

NO

result:

ok answer is NO

Test #48:

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

input:

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

output:

NO

result:

ok answer is NO

Test #49:

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

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: 18876kb

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: 18244kb

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: 18748kb

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: 20932kb

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: 20776kb

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: 22836kb

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: 20864kb

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: 0ms
memory: 21068kb

input:

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

output:

NO

result:

ok answer is NO

Test #58:

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

input:

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

output:

NO

result:

ok answer is NO

Test #59:

score: 21
Accepted
time: 3ms
memory: 15160kb

input:

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

output:

NO

result:

ok answer is NO

Test #60:

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

input:

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

output:

NO

result:

ok answer is NO

Test #61:

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

input:

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

output:

NO

result:

ok answer is NO

Test #62:

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

input:

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

output:

NO

result:

ok answer is NO

Test #63:

score: 21
Accepted
time: 3ms
memory: 17416kb

input:

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

output:

YES

result:

ok answer is YES

Test #64:

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

input:

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

output:

YES

result:

ok answer is YES

Test #65:

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

input:

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

output:

YES

result:

ok answer is YES

Test #66:

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

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: 0ms
memory: 21336kb

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: 2ms
memory: 20912kb

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: 4ms
memory: 20848kb

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: 0ms
memory: 19184kb

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: 0ms
memory: 21116kb

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: 0ms
memory: 17172kb

input:

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

output:

YES

result:

ok answer is YES

Test #73:

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

input:

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

output:

NO

result:

ok answer is NO

Test #74:

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

input:

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

output:

YES

result:

ok answer is YES

Test #75:

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

input:

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

output:

NO

result:

ok answer is NO

Test #76:

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

input:

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

output:

YES

result:

ok answer is YES

Test #77:

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

input:

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

output:

YES

result:

ok answer is YES

Test #78:

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

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: 2ms
memory: 20560kb

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: 4ms
memory: 21004kb

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: 3ms
memory: 19100kb

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: 0ms
memory: 18944kb

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: 0ms
memory: 18960kb

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: 0ms
memory: 19260kb

input:

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

output:

YES

result:

ok answer is YES

Test #85:

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

input:

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

output:

YES

result:

ok answer is YES

Test #86:

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

input:

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

output:

YES

result:

ok answer is YES

Test #87:

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

input:

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

output:

YES

result:

ok answer is YES

Test #88:

score: 21
Accepted
time: 3ms
memory: 19012kb

input:

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

output:

YES

result:

ok answer is YES

Subtask #3:

score: 9
Accepted

Test #89:

score: 9
Accepted
time: 2ms
memory: 12504kb

input:

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

output:

YES

result:

ok answer is YES

Test #90:

score: 9
Accepted
time: 4ms
memory: 36576kb

input:

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

output:

YES

result:

ok answer is YES

Test #91:

score: 9
Accepted
time: 3ms
memory: 36176kb

input:

300 300 10 10
151 143 155 137
.................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #92:

score: 9
Accepted
time: 3ms
memory: 20680kb

input:

159 68 6 2
95 54 98 54
.........................................................................X.....................................................................................
..........................X..................................................X..........................................

output:

YES

result:

ok answer is YES

Test #93:

score: 9
Accepted
time: 4ms
memory: 37772kb

input:

300 300 10 10
11 147 12 143
.....................................................................X.................X.......................................*X..............................................X...................................................................................................

output:

YES

result:

ok answer is YES

Test #94:

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

input:

300 300 10 10
289 237 298 236
.........................................................................................X.......................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #95:

score: 9
Accepted
time: 6ms
memory: 25108kb

input:

277 111 6 9
109 9 112 5
...................X..XX...........X.......X..................X...X.......X........X......X...........X....................X.......................X..X..X.........XX...................X..............X..........X..................X................X...................X............

output:

NO

result:

ok answer is NO

Test #96:

score: 9
Accepted
time: 3ms
memory: 36396kb

input:

300 300 6 6
126 5 131 1
.......X............XX..............X...X....XX..........X..X........X.X...X...........X.................X...............X..............X.....XX.............X....................................XX....X................X........X...................X.....X..........................

output:

NO

result:

ok answer is NO

Test #97:

score: 9
Accepted
time: 12ms
memory: 36180kb

input:

300 300 10 10
30 92 34 92
...X..........X.........................X....................XX........XX......X..X.......X..................X..X...X..X.........X..................X.........X...........................XX................X....XX.......................X...........X..............................

output:

NO

result:

ok answer is NO

Test #98:

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

input:

121 248 8 4
20 157 23 156
...XXX.....XX..XXXX...XX.XXX....X..XXX....XX.XX..X..XX.X...X...X.X............X....X...XXX..XX..X..X....X.X..X..X.....XXX
...XX..XX.XX..XX..XX..X...X..X..X.......X.X..X.XX......X....XX.X..X..X.X.X...X..XXX.XXXX...XXXX..X..X...X.XX........X.X.X
XXXXX....X.X.X..XXXX.XX..XX.XX...

output:

NO

result:

ok answer is NO

Test #99:

score: 9
Accepted
time: 3ms
memory: 36936kb

input:

300 300 9 5
55 124 55 121
XX.X...X..X.X..X.....X..X..X.X.X...XX.XXX...XXX........XXX.........X..XX..X.X......X....XXXXX.X.X.X.X......X..X.X...XXXX..X....X.XXXX....XX..XX.X......XX.XX..X.....X.X.X.XXXX.X.XX.XXX....XX.X..X.X.XX.X.X...XX.X.X.XX...X.....X..XXX..X.XX...XXX...X.XXX...XX..X....XX.XXX.X.XXX...

output:

NO

result:

ok answer is NO

Test #100:

score: 9
Accepted
time: 3ms
memory: 38564kb

input:

300 300 10 10
94 163 96 156
X..X.....X..XXX.X.XXXXX..XXX..X....X..XX..XXX...XXX....X.XXXXX...XX...XX.X...XX.X...XX..XX...X.X...X.X.XX...XX..X..X.....X.X........X.XXX...XXX.XX....X.X.X....X......XXX.XX.XX..XXXX...XX....X.X.X.X...XXX.......XX..X..XX.....X...XX..X...XX.....XXX.XXXXX..X.X...X...X.XX..X....

output:

NO

result:

ok answer is NO

Test #101:

score: 9
Accepted
time: 3ms
memory: 36784kb

input:

286 296 9 9
19 286 26 279
.....................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #102:

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

input:

284 284 9 9
36 50 40 42
.......................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #103:

score: 9
Accepted
time: 3ms
memory: 38640kb

input:

270 299 10 9
35 258 39 253
..............................................................................................................................................................................................................................................................................
.....

output:

NO

result:

ok answer is NO

Test #104:

score: 9
Accepted
time: 4ms
memory: 38980kb

input:

300 300 10 10
0 0 0 0
.........................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #105:

score: 9
Accepted
time: 3ms
memory: 37812kb

input:

300 300 9 9
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #106:

score: 9
Accepted
time: 9ms
memory: 40576kb

input:

300 300 8 8
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #107:

score: 9
Accepted
time: 6ms
memory: 38296kb

input:

300 300 10 10
0 0 0 0
.........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #108:

score: 9
Accepted
time: 4ms
memory: 38120kb

input:

300 300 9 9
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #109:

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

input:

300 300 8 8
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #110:

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

input:

300 300 10 10
0 0 0 0
......................................................................................................................................................X..................................................................................................................................

output:

YES

result:

ok answer is YES

Test #111:

score: 9
Accepted
time: 3ms
memory: 41864kb

input:

300 300 9 9
0 0 0 0
......................................................................................................................................................X....................................................................................................................................

output:

YES

result:

ok answer is YES

Test #112:

score: 9
Accepted
time: 4ms
memory: 40312kb

input:

300 300 10 10
0 0 0 0
......................................................................................................................................................X..................................................................................................................................

output:

YES

result:

ok answer is YES

Test #113:

score: 9
Accepted
time: 4ms
memory: 45108kb

input:

300 300 9 9
0 0 0 0
......................................................................................................................................................X....................................................................................................................................

output:

YES

result:

ok answer is YES

Test #114:

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

input:

300 300 8 8
0 0 0 0
......................................................................................................................................................X....................................................................................................................................

output:

YES

result:

ok answer is YES

Test #115:

score: 9
Accepted
time: 8ms
memory: 43084kb

input:

300 300 7 7
0 0 0 0
......................................................................................................................................................X....................................................................................................................................

output:

YES

result:

ok answer is YES

Test #116:

score: 9
Accepted
time: 8ms
memory: 38896kb

input:

300 289 8 8
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #117:

score: 9
Accepted
time: 3ms
memory: 38788kb

input:

285 293 5 5
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #118:

score: 9
Accepted
time: 6ms
memory: 37880kb

input:

294 300 9 9
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #119:

score: 9
Accepted
time: 8ms
memory: 39256kb

input:

288 284 9 9
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #120:

score: 9
Accepted
time: 3ms
memory: 36740kb

input:

292 277 5 5
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #121:

score: 9
Accepted
time: 6ms
memory: 35400kb

input:

291 282 9 9
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #122:

score: 9
Accepted
time: 4ms
memory: 37868kb

input:

282 289 10 9
0 144 0 144
.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 #123:

score: 9
Accepted
time: 7ms
memory: 38792kb

input:

300 290 9 9
0 0 0 0
......................................................................................................................................................X....................................................................................................................................

output:

NO

result:

ok answer is NO

Test #124:

score: 9
Accepted
time: 5ms
memory: 36980kb

input:

271 297 9 9
0 0 0 0
.......................................................................................................................................X.......................................................................................................................................
...........

output:

NO

result:

ok answer is NO

Test #125:

score: 9
Accepted
time: 6ms
memory: 38236kb

input:

286 290 10 10
0 0 0 0
...............................................................................................................................................X.........................................................................................................................................

output:

NO

result:

ok answer is NO

Test #126:

score: 9
Accepted
time: 5ms
memory: 40364kb

input:

291 297 10 10
0 0 0 0
.................................................................................................................................................X.......................................................................................................................................

output:

NO

result:

ok answer is NO

Test #127:

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

input:

270 300 9 10
0 0 0 0
.......................................................................................................................................X......................................................................................................................................
...........

output:

NO

result:

ok answer is NO

Test #128:

score: 9
Accepted
time: 3ms
memory: 36768kb

input:

300 300 10 10
90 85 98 84
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #129:

score: 9
Accepted
time: 4ms
memory: 36880kb

input:

300 300 10 10
215 217 218 208
.................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #130:

score: 9
Accepted
time: 12ms
memory: 37904kb

input:

300 300 10 10
163 71 169 67
...................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #131:

score: 9
Accepted
time: 5ms
memory: 36356kb

input:

300 300 10 10
61 63 63 56
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #132:

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

input:

295 282 9 10
0 0 0 0
*.........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Subtask #4:

score: 29
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #133:

score: 29
Accepted
time: 3ms
memory: 28264kb

input:

168 225 126 110
8 111 45 66
........................................................................................................................................................................
..........................................................................................................

output:

NO

result:

ok answer is NO

Test #134:

score: 29
Accepted
time: 3ms
memory: 39640kb

input:

360 360 236 69
31 325 216 259
.................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #135:

score: 29
Accepted
time: 13ms
memory: 36308kb

input:

360 360 360 360
0 109 100 0
...................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #136:

score: 29
Accepted
time: 4ms
memory: 28080kb

input:

237 180 133 3
69 160 114 158
..................................................................................................................................................................................X..........................................................
....................................

output:

NO

result:

ok answer is NO

Test #137:

score: 29
Accepted
time: 18ms
memory: 41412kb

input:

360 360 84 170
132 161 171 46
.............................................................................X...................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #138:

score: 29
Accepted
time: 23ms
memory: 41132kb

input:

360 360 360 360
0 233 345 0
................X......................................................................................X...........................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #139:

score: 29
Accepted
time: 7ms
memory: 42824kb

input:

147 343 66 322
3 50 61 9
...X......X..............X..................X.X...X.....XX.......XX....XX.....X.....X.....X......................X.XX............................X.
..........X.......X.....................................X.........................X....X..X.......X..X........X.....X....X........

output:

NO

result:

ok answer is NO

Test #140:

score: 29
Accepted
time: 14ms
memory: 44632kb

input:

360 360 151 179
64 296 78 165
..............................X.....................X..................................X......X........X.........XX.......X....................X.X...X...XX..............X.....X........X.......................X........................................X.......................

output:

NO

result:

ok answer is NO

Test #141:

score: 29
Accepted
time: 16ms
memory: 44012kb

input:

360 360 360 360
0 160 309 0
...X...........................X...............X..X.X.....X..................X.........................X....................X..............X....X..X.X..X..X.X.X.....................X.X.XX.....X......X...X.....X..X..........X.....X.XX...X..........X.....X..X..X.X...X.....X...

output:

NO

result:

ok answer is NO

Test #142:

score: 29
Accepted
time: 0ms
memory: 16232kb

input:

161 29 56 21
83 8 112 3
.X.X..X..X...XX.......X.X..X.XX.X.XXX..XXXX.X...X.......X.XX....X.X..XXX.X...XX..XX........X..XX.....XX......X.X.X..XX...XX..X..X.X..X......XXX.XX....X..X..XX.X.
....XX.....X..X.X........X..XX..X...XX..X.......X.X.X..XXXX..XX...X.X.XXXX..X.XX..XX.X..X...X...X.X..XX.XXXX.....X...

output:

NO

result:

ok answer is NO

Test #143:

score: 29
Accepted
time: 4ms
memory: 43420kb

input:

360 360 266 273
34 164 35 26
....X..XXXX..X.X.....X...XX.X.X..X..X.X.X..X.X...X.X.......X.XX...XX.XX...X...XXXX....X.X.XXXX......X.XXX.X..XX....XXX.X.....XX.X.X.XX.X.X.X...XX...X.XX....X.X.............XXX..X..XXXX....XXX......X......XX.X.X....XXXXXX..X.....X.X.......XX.XXXXXX.XX.X.X..X..XXX...XX.X.....

output:

NO

result:

ok answer is NO

Test #144:

score: 29
Accepted
time: 6ms
memory: 44156kb

input:

360 360 360 360
0 82 282 0
.....XXXXX.X.XXX..XX.X.....X.X.X...X....XXX.XXXX.......X.XXX..X.XX.X..X..X..X..X..XX.XXXX......XX.XXX..X.X.X.....X...X......XXX.X....X........X..XX......X.XXXXXX...XXX.X.XXXX.XXXX.X.XX..XXXXX...XXXXX.X..X...XX....X.X.X.....XX.X..XX....X..XX.XXX.X.X..XX..XXX......X.X..X.X.....

output:

NO

result:

ok answer is NO

Test #145:

score: 29
Accepted
time: 10ms
memory: 44328kb

input:

326 355 158 158
67 161 190 70
.................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #146:

score: 29
Accepted
time: 8ms
memory: 43736kb

input:

359 336 161 171
28 203 91 115
.................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #147:

score: 29
Accepted
time: 13ms
memory: 43680kb

input:

343 329 155 163
47 229 64 118
.................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #148:

score: 29
Accepted
time: 11ms
memory: 48096kb

input:

360 360 180 180
0 0 0 0
.......................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #149:

score: 29
Accepted
time: 20ms
memory: 49400kb

input:

360 360 179 179
0 0 0 0
.......................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #150:

score: 29
Accepted
time: 19ms
memory: 47008kb

input:

360 360 178 178
0 0 0 0
.......................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #151:

score: 29
Accepted
time: 11ms
memory: 45592kb

input:

360 360 180 180
0 0 0 0
.......................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #152:

score: 29
Accepted
time: 11ms
memory: 46452kb

input:

360 360 179 179
0 0 0 0
.......................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #153:

score: 29
Accepted
time: 3ms
memory: 45236kb

input:

360 360 178 178
0 0 0 0
.......................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #154:

score: 29
Accepted
time: 0ms
memory: 52772kb

input:

360 360 90 90
0 0 0 0
....................................................................................................................................................................................X....................................................................................................

output:

YES

result:

ok answer is YES

Test #155:

score: 29
Accepted
time: 8ms
memory: 51056kb

input:

360 360 89 89
0 0 0 0
....................................................................................................................................................................................X....................................................................................................

output:

YES

result:

ok answer is YES

Test #156:

score: 29
Accepted
time: 7ms
memory: 48680kb

input:

360 360 90 90
0 0 0 0
....................................................................................................................................................................................X....................................................................................................

output:

YES

result:

ok answer is YES

Test #157:

score: 29
Accepted
time: 11ms
memory: 48112kb

input:

360 360 89 89
0 0 0 0
....................................................................................................................................................................................X....................................................................................................

output:

YES

result:

ok answer is YES

Test #158:

score: 29
Accepted
time: 14ms
memory: 49296kb

input:

360 360 88 88
0 0 0 0
....................................................................................................................................................................................X....................................................................................................

output:

YES

result:

ok answer is YES

Test #159:

score: 29
Accepted
time: 3ms
memory: 48416kb

input:

360 360 87 87
0 0 0 0
....................................................................................................................................................................................X....................................................................................................

output:

YES

result:

ok answer is YES

Test #160:

score: 29
Accepted
time: 7ms
memory: 45012kb

input:

350 340 5 5
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #161:

score: 29
Accepted
time: 0ms
memory: 42396kb

input:

342 339 6 6
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #162:

score: 29
Accepted
time: 8ms
memory: 46256kb

input:

356 351 9 9
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #163:

score: 29
Accepted
time: 11ms
memory: 41920kb

input:

349 327 9 9
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #164:

score: 29
Accepted
time: 12ms
memory: 43060kb

input:

359 343 10 10
0 0 0 0
.........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #165:

score: 29
Accepted
time: 7ms
memory: 41952kb

input:

358 327 8 8
0 0 0 0
...........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #166:

score: 29
Accepted
time: 0ms
memory: 41328kb

input:

349 343 80 76
0 171 0 171
.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 #167:

score: 29
Accepted
time: 7ms
memory: 43308kb

input:

344 347 85 80
0 0 0 0
............................................................................................................................................................................X............................................................................................................

output:

NO

result:

ok answer is NO

Test #168:

score: 29
Accepted
time: 3ms
memory: 43976kb

input:

343 354 76 83
0 0 0 0
...........................................................................................................................................................................X.............................................................................................................

output:

NO

result:

ok answer is NO

Test #169:

score: 29
Accepted
time: 7ms
memory: 42676kb

input:

350 335 78 81
0 0 0 0
...............................................................................................................................................................................X.........................................................................................................

output:

NO

result:

ok answer is NO

Test #170:

score: 29
Accepted
time: 4ms
memory: 42980kb

input:

328 336 76 79
0 0 0 0
....................................................................................................................................................................X....................................................................................................................

output:

NO

result:

ok answer is NO

Test #171:

score: 29
Accepted
time: 7ms
memory: 45168kb

input:

345 347 77 82
0 0 0 0
............................................................................................................................................................................X............................................................................................................

output:

NO

result:

ok answer is NO

Test #172:

score: 29
Accepted
time: 4ms
memory: 43340kb

input:

360 360 360 360
0 73 155 0
....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #173:

score: 29
Accepted
time: 8ms
memory: 44092kb

input:

360 360 360 360
0 12 301 0
....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #174:

score: 29
Accepted
time: 18ms
memory: 43004kb

input:

360 360 360 360
0 19 80 0
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #175:

score: 29
Accepted
time: 4ms
memory: 43780kb

input:

360 360 360 360
0 206 181 0
...................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #176:

score: 29
Accepted
time: 0ms
memory: 40212kb

input:

327 353 75 85
0 0 0 0
*........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Subtask #5:

score: 27
Accepted

Dependency #4:

100%
Accepted

Test #177:

score: 27
Accepted
time: 32ms
memory: 80228kb

input:

683 846 366 28
114 281 204 264
................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #178:

score: 27
Accepted
time: 358ms
memory: 120044kb

input:

1500 1500 944 522
401 649 1146 552
............................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #179:

score: 27
Accepted
time: 448ms
memory: 125472kb

input:

1500 1500 1500 1500
0 1251 1467 0
.............................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #180:

score: 27
Accepted
time: 121ms
memory: 94188kb

input:

594 985 430 923
14 412 224 24
....................................X...............................................................................................................................................................X............................................................................

output:

NO

result:

ok answer is NO

Test #181:

score: 27
Accepted
time: 552ms
memory: 128080kb

input:

1500 1500 170 658
415 625 542 17
........................................................................................X.....................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #182:

score: 27
Accepted
time: 585ms
memory: 128108kb

input:

1500 1500 1500 1500
0 653 798 0
...............................................................X...............................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #183:

score: 27
Accepted
time: 217ms
memory: 125576kb

input:

1250 1318 426 627
491 504 638 421
......X..........X........X.....X....X.......X........X.....X..X.........................X....X.X...........X......X...................X.............X...........X..........................................X.............X..X.............X............X....................

output:

NO

result:

ok answer is NO

Test #184:

score: 27
Accepted
time: 311ms
memory: 128136kb

input:

1500 1500 928 985
385 1093 830 353
...X....................X....................X................X.XX..X........................X....X.X........X......................................X............XX......X...........................X.............X........X.X..X.....X...............X..............X.....

output:

NO

result:

ok answer is NO

Test #185:

score: 27
Accepted
time: 324ms
memory: 128432kb

input:

1500 1500 1500 1500
0 87 350 0
....X.......XX.............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:

NO

result:

ok answer is NO

Test #186:

score: 27
Accepted
time: 72ms
memory: 112740kb

input:

1004 1165 660 135
251 404 762 315
.XXX.X.XXX.X.X..XXX.X.XX..X....XXX..X.XX.XXX....X....XXX.XX.X...XX..XX...X....X.X.....X.XX......XXXX.....X.X.XXX.X...XX.XX..X.X.XXX..X.X.X..X..X.X.X.XX..XX.X...XX.X.X.XX.XXX.X.XX...XXX...X.X....X.X.X....X..X...X.X...XXXXXXX..X..X..X..XX.......XXXXXXX..XXX...X.XXXX.....

output:

NO

result:

ok answer is NO

Test #187:

score: 27
Accepted
time: 115ms
memory: 128168kb

input:

1500 1500 97 133
87 957 138 840
XXX.XX..XX..X..X..X......X..X.XXX.XXX.X....X...X.......XXX..XX.X..X..X.......XXXX.XX.X.XX.X..X..XX.XX.X.XX...X.....X.XX..X.XXXXX.XXXXXXX.X.XXXX..XX..XXX.XX...X......XX.X...X.X.......X....XX.X..X.XX..X.X..X.XX...XX..X...XX.X..XX.X.XX.....XXXX..X.X....X....X.......XXX.....

output:

NO

result:

ok answer is NO

Test #188:

score: 27
Accepted
time: 156ms
memory: 128132kb

input:

1500 1500 1500 1500
0 335 362 0
XXXX......XXXXXXX...XX.X..X.XX....XX.XX.X...X....XXX..X..X.......XXXX..XXX.X..X.XX.XX....X.X.XXXX..X..X...XX..XX....X..X...X..X..X.XXX..XX...X..X..X.X.X.....X...X....X...XXX...X..X.....XX...XXX.X.XXX.X..X.XXX.XX.XXXXX..XXX.X.X...XX.....XXX...X...X.X..X..X.......X.X......

output:

NO

result:

ok answer is NO

Test #189:

score: 27
Accepted
time: 154ms
memory: 187940kb

input:

1411 1353 666 698
109 623 752 287
.............................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #190:

score: 27
Accepted
time: 187ms
memory: 191080kb

input:

1391 1473 652 653
210 338 665 266
.............................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #191:

score: 27
Accepted
time: 174ms
memory: 211732kb

input:

1463 1375 725 717
9 976 448 481
...............................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #192:

score: 27
Accepted
time: 192ms
memory: 286048kb

input:

1500 1500 750 750
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #193:

score: 27
Accepted
time: 184ms
memory: 286220kb

input:

1500 1500 749 749
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #194:

score: 27
Accepted
time: 190ms
memory: 285992kb

input:

1500 1500 748 748
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #195:

score: 27
Accepted
time: 181ms
memory: 285920kb

input:

1500 1500 750 750
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #196:

score: 27
Accepted
time: 176ms
memory: 285980kb

input:

1500 1500 749 749
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #197:

score: 27
Accepted
time: 212ms
memory: 285920kb

input:

1500 1500 748 748
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #198:

score: 27
Accepted
time: 205ms
memory: 291536kb

input:

1500 1500 375 375
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #199:

score: 27
Accepted
time: 193ms
memory: 291712kb

input:

1500 1500 374 374
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #200:

score: 27
Accepted
time: 201ms
memory: 230544kb

input:

1500 1500 375 375
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #201:

score: 27
Accepted
time: 203ms
memory: 228820kb

input:

1500 1500 374 374
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #202:

score: 27
Accepted
time: 204ms
memory: 229064kb

input:

1500 1500 373 373
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #203:

score: 27
Accepted
time: 190ms
memory: 230164kb

input:

1500 1500 372 372
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #204:

score: 27
Accepted
time: 111ms
memory: 262636kb

input:

1363 1443 9 9
0 0 0 0
.........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #205:

score: 27
Accepted
time: 108ms
memory: 262580kb

input:

1434 1383 8 8
0 0 0 0
.........................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #206:

score: 27
Accepted
time: 106ms
memory: 255812kb

input:

1355 1390 8 8
0 0 0 0
.........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #207:

score: 27
Accepted
time: 93ms
memory: 266232kb

input:

1382 1456 5 5
0 0 0 0
.........................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #208:

score: 27
Accepted
time: 84ms
memory: 266280kb

input:

1425 1409 7 7
0 0 0 0
.........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #209:

score: 27
Accepted
time: 135ms
memory: 275380kb

input:

1475 1442 9 9
0 0 0 0
.........................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #210:

score: 27
Accepted
time: 75ms
memory: 125780kb

input:

1427 1358 338 328
0 679 0 679
.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 #211:

score: 27
Accepted
time: 130ms
memory: 169428kb

input:

1487 1364 336 341
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #212:

score: 27
Accepted
time: 129ms
memory: 166904kb

input:

1415 1357 334 331
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #213:

score: 27
Accepted
time: 149ms
memory: 172780kb

input:

1481 1395 369 316
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #214:

score: 27
Accepted
time: 134ms
memory: 166924kb

input:

1396 1350 321 336
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #215:

score: 27
Accepted
time: 124ms
memory: 168304kb

input:

1378 1389 331 320
0 0 0 0
.....................................................................................................................................................................................................................................................................................

output:

NO

result:

ok answer is NO

Test #216:

score: 27
Accepted
time: 212ms
memory: 248832kb

input:

1500 1500 1500 1500
0 1342 1179 0
.............................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #217:

score: 27
Accepted
time: 201ms
memory: 244756kb

input:

1500 1500 1500 1500
0 632 352 0
...............................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #218:

score: 27
Accepted
time: 202ms
memory: 228548kb

input:

1500 1500 1500 1500
0 1333 1008 0
.............................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #219:

score: 27
Accepted
time: 212ms
memory: 246124kb

input:

1500 1500 1500 1500
0 244 340 0
...............................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Test #220:

score: 27
Accepted
time: 7ms
memory: 124660kb

input:

1351 1395 335 343
0 0 0 0
*....................................................................................................................................................................................................................................................................................

output:

YES

result:

ok answer is YES

Extra Test:

score: 0
Extra Test Passed