Submission details
Task:Toy
Sender:Verlet
Submission time:2025-03-03 16:19:17 +0200
Language:C++ (C++17)
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
#40
#50
Test results
testverdicttimegroup
#1ACCEPTED0.00 s1, 2, 4, 5details
#2ACCEPTED0.00 s1, 2, 4, 5details
#3ACCEPTED0.00 s1, 2, 4, 5details
#4ACCEPTED0.00 s1, 2, 4, 5details
#50.00 s1, 2, 4, 5details
#6ACCEPTED0.00 s1, 2, 4, 5details
#70.00 s1, 2, 4, 5details
#80.00 s1, 2, 4, 5details
#9ACCEPTED0.00 s1, 2, 4, 5details
#100.01 s1, 2, 3, 4, 5details
#110.00 s1, 2, 4, 5details
#12ACCEPTED0.00 s1, 2, 4, 5details
#130.01 s1, 2, 4, 5details
#140.00 s1, 2, 4, 5details
#150.00 s1, 2, 4, 5details
#160.00 s1, 2, 4, 5details
#170.00 s1, 2, 4, 5details
#180.00 s1, 2, 4, 5details
#19ACCEPTED0.00 s1, 2, 4, 5details
#20ACCEPTED0.00 s1, 2, 4, 5details
#21ACCEPTED0.00 s1, 2, 4, 5details
#22ACCEPTED0.00 s1, 2, 4, 5details
#23ACCEPTED0.00 s1, 2, 4, 5details
#24ACCEPTED0.00 s1, 2, 4, 5details
#25ACCEPTED0.00 s1, 2, 4, 5details
#26ACCEPTED0.00 s1, 2, 3, 4, 5details
#27ACCEPTED0.00 s1, 2, 3, 4, 5details
#28ACCEPTED0.00 s1, 2, 3, 4, 5details
#290.00 s1, 2, 3, 4, 5details
#30ACCEPTED0.00 s1, 2, 3, 4, 5details
#310.00 s1, 2, 3, 4, 5details
#32ACCEPTED0.00 s1, 2, 3, 4, 5details
#33ACCEPTED0.00 s1, 2, 3, 4, 5details
#34ACCEPTED0.00 s1, 2, 4, 5details
#350.00 s1, 2, 4, 5details
#360.00 s1, 2, 4, 5details
#370.00 s1, 2, 4, 5details
#380.00 s1, 2, 4, 5details
#390.00 s1, 2, 4, 5details
#400.00 s1, 2, 4, 5details
#410.00 s1, 2, 4, 5details
#420.00 s1, 2, 4, 5details
#430.00 s1, 2, 4, 5details
#44ACCEPTED0.00 s1, 2, 4, 5details
#450.00 s2, 4, 5details
#460.00 s2, 4, 5details
#47ACCEPTED0.00 s2, 4, 5details
#480.00 s2, 4, 5details
#490.00 s2, 4, 5details
#50ACCEPTED0.00 s2, 4, 5details
#510.00 s2, 4, 5details
#520.00 s2, 4, 5details
#53ACCEPTED0.00 s2, 4, 5details
#540.00 s2, 4, 5details
#55ACCEPTED0.00 s2, 4, 5details
#56ACCEPTED0.00 s2, 4, 5details
#570.00 s2, 4, 5details
#580.00 s2, 4, 5details
#590.00 s2, 4, 5details
#600.00 s2, 4, 5details
#610.00 s2, 4, 5details
#620.00 s2, 4, 5details
#63ACCEPTED0.00 s2, 4, 5details
#64ACCEPTED0.00 s2, 4, 5details
#65ACCEPTED0.00 s2, 4, 5details
#66ACCEPTED0.00 s2, 4, 5details
#67ACCEPTED0.00 s2, 4, 5details
#68ACCEPTED0.00 s2, 4, 5details
#69ACCEPTED0.00 s2, 4, 5details
#70ACCEPTED0.00 s2, 4, 5details
#71ACCEPTED0.00 s2, 4, 5details
#72ACCEPTED0.00 s2, 3, 4, 5details
#730.00 s2, 3, 4, 5details
#74ACCEPTED0.00 s2, 3, 4, 5details
#750.00 s2, 3, 4, 5details
#76ACCEPTED0.00 s2, 3, 4, 5details
#77ACCEPTED0.00 s2, 3, 4, 5details
#78ACCEPTED0.00 s2, 4, 5details
#790.00 s2, 4, 5details
#800.00 s2, 4, 5details
#810.00 s2, 4, 5details
#820.00 s2, 4, 5details
#830.00 s2, 4, 5details
#840.00 s2, 4, 5details
#850.00 s2, 4, 5details
#860.00 s2, 4, 5details
#870.00 s2, 4, 5details
#88ACCEPTED0.00 s2, 4, 5details
#89ACCEPTED0.00 s3, 4, 5details
#90ACCEPTED0.01 s3, 4, 5details
#91ACCEPTED0.01 s3, 4, 5details
#92ACCEPTED0.00 s3, 4, 5details
#93ACCEPTED0.01 s3, 4, 5details
#94ACCEPTED0.01 s3, 4, 5details
#950.00 s3, 4, 5details
#960.01 s3, 4, 5details
#970.01 s3, 4, 5details
#980.00 s3, 4, 5details
#990.01 s3, 4, 5details
#1000.01 s3, 4, 5details
#1010.01 s3, 4, 5details
#1020.01 s3, 4, 5details
#1030.01 s3, 4, 5details
#1040.01 s3, 4, 5details
#1050.01 s3, 4, 5details
#1060.01 s3, 4, 5details
#107ACCEPTED0.01 s3, 4, 5details
#108ACCEPTED0.01 s3, 4, 5details
#109ACCEPTED0.01 s3, 4, 5details
#110ACCEPTED0.01 s3, 4, 5details
#111ACCEPTED0.01 s3, 4, 5details
#112ACCEPTED0.01 s3, 4, 5details
#113ACCEPTED0.01 s3, 4, 5details
#114ACCEPTED0.01 s3, 4, 5details
#115ACCEPTED0.01 s3, 4, 5details
#116ACCEPTED0.01 s3, 4, 5details
#1170.01 s3, 4, 5details
#118ACCEPTED0.01 s3, 4, 5details
#1190.01 s3, 4, 5details
#120ACCEPTED0.01 s3, 4, 5details
#121ACCEPTED0.01 s3, 4, 5details
#122ACCEPTED0.01 s3, 4, 5details
#1230.01 s3, 4, 5details
#1240.01 s3, 4, 5details
#1250.01 s3, 4, 5details
#1260.01 s3, 4, 5details
#1270.01 s3, 4, 5details
#128ACCEPTED0.01 s3, 4, 5details
#129ACCEPTED0.01 s3, 4, 5details
#130ACCEPTED0.01 s3, 4, 5details
#131ACCEPTED0.01 s3, 4, 5details
#132ACCEPTED0.01 s3, 4, 5details
#1330.00 s4, 5details
#1340.01 s4, 5details
#135ACCEPTED0.01 s4, 5details
#1360.00 s4, 5details
#1370.01 s4, 5details
#138ACCEPTED0.01 s4, 5details
#1390.00 s4, 5details
#1400.01 s4, 5details
#141ACCEPTED0.01 s4, 5details
#1420.00 s4, 5details
#1430.01 s4, 5details
#144ACCEPTED0.01 s4, 5details
#1450.01 s4, 5details
#1460.01 s4, 5details
#1470.01 s4, 5details
#1480.01 s4, 5details
#1490.01 s4, 5details
#1500.01 s4, 5details
#151ACCEPTED0.01 s4, 5details
#152ACCEPTED0.01 s4, 5details
#153ACCEPTED0.01 s4, 5details
#154ACCEPTED0.01 s4, 5details
#155ACCEPTED0.01 s4, 5details
#156ACCEPTED0.01 s4, 5details
#157ACCEPTED0.01 s4, 5details
#158ACCEPTED0.01 s4, 5details
#159ACCEPTED0.01 s4, 5details
#160ACCEPTED0.01 s4, 5details
#1610.01 s4, 5details
#162ACCEPTED0.01 s4, 5details
#1630.01 s4, 5details
#164ACCEPTED0.01 s4, 5details
#165ACCEPTED0.01 s4, 5details
#166ACCEPTED0.01 s4, 5details
#1670.01 s4, 5details
#1680.01 s4, 5details
#1690.01 s4, 5details
#1700.01 s4, 5details
#1710.01 s4, 5details
#1720.01 s4, 5details
#1730.01 s4, 5details
#1740.01 s4, 5details
#1750.01 s4, 5details
#176ACCEPTED0.01 s4, 5details
#1770.01 s5details
#1780.04 s5details
#179ACCEPTED0.03 s5details
#1800.01 s5details
#1810.04 s5details
#182ACCEPTED0.04 s5details
#1830.03 s5details
#1840.04 s5details
#185ACCEPTED0.04 s5details
#1860.02 s5details
#1870.04 s5details
#188ACCEPTED0.03 s5details
#1890.03 s5details
#1900.03 s5details
#1910.04 s5details
#1920.04 s5details
#1930.04 s5details
#1940.04 s5details
#195ACCEPTED0.04 s5details
#196ACCEPTED0.04 s5details
#197ACCEPTED0.04 s5details
#198ACCEPTED0.04 s5details
#199ACCEPTED0.04 s5details
#200ACCEPTED0.04 s5details
#201ACCEPTED0.04 s5details
#202ACCEPTED0.04 s5details
#203ACCEPTED0.04 s5details
#204ACCEPTED0.03 s5details
#2050.03 s5details
#206ACCEPTED0.03 s5details
#2070.03 s5details
#208ACCEPTED0.03 s5details
#209ACCEPTED0.03 s5details
#210ACCEPTED0.03 s5details
#2110.03 s5details
#2120.03 s5details
#2130.03 s5details
#2140.03 s5details
#2150.03 s5details
#2160.04 s5details
#2170.04 s5details
#2180.04 s5details
#2190.04 s5details
#220ACCEPTED0.03 s5details

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:29:25: warning: variable 'tx' set but not used [-Wunused-but-set-variable]
   29 |     int xh, yh, xv, yv, tx, ty;
      |                         ^~
input/code.cpp:29:29: warning: variable 'ty' set but not used [-Wunused-but-set-variable]
   29 |     int xh, yh, xv, yv, tx, ty;
      |                             ^~
input/code.cpp: In function 'bool search_valid_moves(int, int, int, int)':
input/code.cpp:66:13: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   66 |             if (search(xh, yh + 1, xv, yv));
      |             ^~
input/code.cpp:67:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   67 |                 return true;
      |                 ^~~~~~
input/code.cpp:82:13: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   82 |             if (search(xh, yh - 1, xv, yv));
      |             ^~
input/code.cpp:83:17:...

Code

#pragma GCC optimize("O3")
#pragma GCC target("arch=skylake")

#include <array>
#include <iostream>
#include <queue>

#define newl "\n"

using namespace std;

using point = array<int, 2>;

bool vis[1500][1500];

char map[1500][1500];

int w, h, k, l;

bool search(int xh, int yh, int xv, int yv);
bool search_valid_moves(int xh, int yh, int xv, int yv);

int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL);

    cin >> w >> h >> k >> l;

    int xh, yh, xv, yv, tx, ty;

    cin >> xh >> yh >> xv >> yv;

    for (int y = 0; y < h; y++)
    for (int x = 0; x < w; x++)
    {
        cin >> map[x][y];
        if (map[x][y] == '*')
        {
            map[x][y] = '.';
            tx = x;
            ty = y;
        }
    }

    if (search(xh, yh, xv, yv))
        cout << "YES" << newl;
    else
        cout << "NO" << newl;
}


bool search_valid_moves(int xh, int yh, int xv, int yv)
{
    if (yh < h - 1)
    {
        bool b = true;
        for (int i = xh; i < xh + k; i++)
        {
            if (map[i][yh+1] == 'X')
            {
                b = false; break;
            }
        }
        
        if (b)
            if (search(xh, yh + 1, xv, yv));
                return true;
    }

    if (yh > 0)
    {
        bool b = true;
        for (int i = xh; i < xh + k; i++)
        {
            if (map[i][yh-1] == 'X')
            {
                b = false; break;
            }
        }
        
        if (b)
            if (search(xh, yh - 1, xv, yv));
                return true;
    }

    if (xv < w - 1)
    {
        bool b = true;
        for (int i = yv; i < yv + l; i++)
        {
            if (map[xv+1][i] == 'X')
            {
                b = false; break;
            }
        }
        
        if (b)
            if (search(xh, yh, xv + 1, yv))
                return true;
    }

    if (xv > 0)
    {
        bool b = true;
        for (int i = yv; i < yv + l; i++)
        {
            if (map[xv-1][i] == 'X')
            {
                b = false; break;
            }
        }

        if (b)
            if (search(xh, yh, xv - 1, yv));
                return true;
    }

    return false;
}

bool search(int xh, int yh, int xv, int yv)
{
    int cx = xv;
    int cy = yh;

    if (vis[cx][cy])
        return false;
    
    vis[cx][cy] = true;

    for (int x = xh - 1; x >= 0; x--)
    {
        if (map[x][yh] == 'X')
            break;
        
        if (search_valid_moves(x, yh, xv, yv))
            return true;
    }
    
    for (int x = xh + 1; x + k - 1 < w; x++)
    {
        if (map[x + k - 1][yh] == 'X')
            break;
        
        if (search_valid_moves(x, yh, xv, yv))
            return true;
    }

    for (int y = yv - 1; y >= 0; y--)
    {
        if (map[xv][y] == 'X')
            break;
        
        if (search_valid_moves(xh, yh, xv, y))
            return true;
    }

    for (int y = yv + 1; y + l - 1 < h; y++)
    {
        if (map[xv][y + l - 1] == 'X')
            break;
        
        if (search_valid_moves(xh, yh, xv, y))
            return true;
    }

    return false;
}

Test details

Test 1

Group: 1, 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 2

Group: 1, 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 3

Group: 1, 2, 4, 5

Verdict: ACCEPTED

input
50 50 50 50
0 18 2 0
.................................

correct output
NO

user output
NO

Test 4

Group: 1, 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 5

Group: 1, 2, 4, 5

Verdict:

input
50 50 29 46
11 5 29 3
.................................

correct output
NO

user output
YES

Test 6

Group: 1, 2, 4, 5

Verdict: ACCEPTED

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

correct output
NO

user output
NO

Test 7

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 8

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 9

Group: 1, 2, 4, 5

Verdict: ACCEPTED

input
50 50 50 50
0 20 3 0
.......X.........................

correct output
NO

user output
NO

Test 10

Group: 1, 2, 3, 4, 5

Verdict:

input
4 7 4 5
0 2 0 1
.X..
.X..
....
...

correct output
NO

user output
YES

Test 11

Group: 1, 2, 4, 5

Verdict:

input
50 50 13 13
2 46 11 36
.X.X.X.....XX.XX.X..XX..XXXXXX...

correct output
NO

user output
YES

Test 12

Group: 1, 2, 4, 5

Verdict: ACCEPTED

input
50 50 50 50
0 46 6 0
XX.....X....X...X.X.X..XX..XX....

correct output
NO

user output
NO

Test 13

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 14

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 15

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 16

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 17

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 18

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 19

Group: 1, 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 20

Group: 1, 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 21

Group: 1, 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 22

Group: 1, 2, 4, 5

Verdict: ACCEPTED

input
50 50 12 12
0 0 0 0
.........................X.......

correct output
YES

user output
YES

Test 23

Group: 1, 2, 4, 5

Verdict: ACCEPTED

input
50 50 11 11
0 0 0 0
.........................X.......

correct output
YES

user output
YES

Test 24

Group: 1, 2, 4, 5

Verdict: ACCEPTED

input
50 50 12 12
0 0 0 0
.........................X.......

correct output
YES

user output
YES

Test 25

Group: 1, 2, 4, 5

Verdict: ACCEPTED

input
50 50 11 11
0 0 0 0
.........................X.......

correct output
YES

user output
YES

Test 26

Group: 1, 2, 3, 4, 5

Verdict: ACCEPTED

input
50 50 10 10
0 0 0 0
.........................X.......

correct output
YES

user output
YES

Test 27

Group: 1, 2, 3, 4, 5

Verdict: ACCEPTED

input
50 50 9 9
0 0 0 0
.........................X.......

correct output
YES

user output
YES

Test 28

Group: 1, 2, 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 29

Group: 1, 2, 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 30

Group: 1, 2, 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 31

Group: 1, 2, 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 32

Group: 1, 2, 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 33

Group: 1, 2, 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 34

Group: 1, 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 35

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 36

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 37

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 38

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 39

Group: 1, 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 40

Group: 1, 2, 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 41

Group: 1, 2, 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 42

Group: 1, 2, 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 43

Group: 1, 2, 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 44

Group: 1, 2, 4, 5

Verdict: ACCEPTED

input
48 45 11 11
0 0 0 0
*................................

correct output
YES

user output
YES

Test 45

Group: 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 46

Group: 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 47

Group: 2, 4, 5

Verdict: ACCEPTED

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

correct output
NO

user output
NO

Test 48

Group: 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 49

Group: 2, 4, 5

Verdict:

input
90 90 34 30
27 48 57 48
.................................

correct output
NO

user output
YES

Test 50

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 90 90 90
0 73 81 0
.................................

correct output
NO

user output
NO

Test 51

Group: 2, 4, 5

Verdict:

input
85 55 14 43
15 39 20 10
.....X.................X.........

correct output
NO

user output
YES

Test 52

Group: 2, 4, 5

Verdict:

input
90 90 59 36
21 62 34 53
X............................X...

correct output
NO

user output
YES

Test 53

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 90 90 90
0 30 34 0
.X...............................

correct output
NO

user output
NO

Test 54

Group: 2, 4, 5

Verdict:

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
...

correct output
NO

user output
YES

Test 55

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 90 66 80
2 5 17 0
X...XXX.X...XX....XX..XX.XX..X...

correct output
NO

user output
NO

Test 56

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 90 90 90
0 9 65 0
..X..X.......XX.X.....X..XX.X....

correct output
NO

user output
NO

Test 57

Group: 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 58

Group: 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 59

Group: 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 60

Group: 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 61

Group: 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 62

Group: 2, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 63

Group: 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 64

Group: 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 65

Group: 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 66

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 90 22 22
0 0 0 0
.................................

correct output
YES

user output
YES

Test 67

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 90 21 21
0 0 0 0
.................................

correct output
YES

user output
YES

Test 68

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 90 22 22
0 0 0 0
.................................

correct output
YES

user output
YES

Test 69

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 90 21 21
0 0 0 0
.................................

correct output
YES

user output
YES

Test 70

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 90 20 20
0 0 0 0
.................................

correct output
YES

user output
YES

Test 71

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 90 19 19
0 0 0 0
.................................

correct output
YES

user output
YES

Test 72

Group: 2, 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 73

Group: 2, 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 74

Group: 2, 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 75

Group: 2, 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 76

Group: 2, 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 77

Group: 2, 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 78

Group: 2, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 79

Group: 2, 4, 5

Verdict:

input
84 82 19 18
0 0 0 0
.................................

correct output
NO

user output
YES

Test 80

Group: 2, 4, 5

Verdict:

input
86 86 19 20
0 0 0 0
.................................

correct output
NO

user output
YES

Test 81

Group: 2, 4, 5

Verdict:

input
81 85 19 19
0 0 0 0
.................................

correct output
NO

user output
YES

Test 82

Group: 2, 4, 5

Verdict:

input
90 84 19 21
0 0 0 0
.................................

correct output
NO

user output
YES

Test 83

Group: 2, 4, 5

Verdict:

input
82 87 19 20
0 0 0 0
.................................

correct output
NO

user output
YES

Test 84

Group: 2, 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 85

Group: 2, 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 86

Group: 2, 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 87

Group: 2, 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 88

Group: 2, 4, 5

Verdict: ACCEPTED

input
90 89 21 22
0 0 0 0
*................................

correct output
YES

user output
YES

Test 89

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 90

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 91

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 92

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 93

Group: 3, 4, 5

Verdict: ACCEPTED

input
300 300 10 10
11 147 12 143
.................................

correct output
YES

user output
YES

Test 94

Group: 3, 4, 5

Verdict: ACCEPTED

input
300 300 10 10
289 237 298 236
.................................

correct output
YES

user output
YES

Test 95

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 96

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 97

Group: 3, 4, 5

Verdict:

input
300 300 10 10
30 92 34 92
...X..........X..................

correct output
NO

user output
YES

Test 98

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 99

Group: 3, 4, 5

Verdict:

input
300 300 9 5
55 124 55 121
XX.X...X..X.X..X.....X..X..X.X...

correct output
NO

user output
YES

Test 100

Group: 3, 4, 5

Verdict:

input
300 300 10 10
94 163 96 156
X..X.....X..XXX.X.XXXXX..XXX.....

correct output
NO

user output
YES

Test 101

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 102

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 103

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 104

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 105

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 106

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 107

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 108

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 109

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 110

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 111

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 112

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 113

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 114

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 115

Group: 3, 4, 5

Verdict: ACCEPTED

input
300 300 7 7
0 0 0 0
.................................

correct output
YES

user output
YES

Test 116

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 117

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 118

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 119

Group: 3, 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 120

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 121

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 122

Group: 3, 4, 5

Verdict: ACCEPTED

input
282 289 10 9
0 144 0 144
.X...X...X...X...X...X...X...X...

correct output
YES

user output
YES

Test 123

Group: 3, 4, 5

Verdict:

input
300 290 9 9
0 0 0 0
.................................

correct output
NO

user output
YES

Test 124

Group: 3, 4, 5

Verdict:

input
271 297 9 9
0 0 0 0
.................................

correct output
NO

user output
YES

Test 125

Group: 3, 4, 5

Verdict:

input
286 290 10 10
0 0 0 0
.................................

correct output
NO

user output
YES

Test 126

Group: 3, 4, 5

Verdict:

input
291 297 10 10
0 0 0 0
.................................

correct output
NO

user output
YES

Test 127

Group: 3, 4, 5

Verdict:

input
270 300 9 10
0 0 0 0
.................................

correct output
NO

user output
YES

Test 128

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 129

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 130

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 131

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 132

Group: 3, 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 133

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 134

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 135

Group: 4, 5

Verdict: ACCEPTED

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

correct output
NO

user output
NO

Test 136

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 137

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 138

Group: 4, 5

Verdict: ACCEPTED

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

correct output
NO

user output
NO

Test 139

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 140

Group: 4, 5

Verdict:

input
360 360 151 179
64 296 78 165
.................................

correct output
NO

user output
YES

Test 141

Group: 4, 5

Verdict: ACCEPTED

input
360 360 360 360
0 160 309 0
...X.............................

correct output
NO

user output
NO

Test 142

Group: 4, 5

Verdict:

input
161 29 56 21
83 8 112 3
.X.X..X..X...XX.......X.X..X.X...

correct output
NO

user output
YES

Test 143

Group: 4, 5

Verdict:

input
360 360 266 273
34 164 35 26
....X..XXXX..X.X.....X...XX.X....

correct output
NO

user output
YES

Test 144

Group: 4, 5

Verdict: ACCEPTED

input
360 360 360 360
0 82 282 0
.....XXXXX.X.XXX..XX.X.....X.X...

correct output
NO

user output
NO

Test 145

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 146

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 147

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 148

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 149

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 150

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 151

Group: 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 152

Group: 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 153

Group: 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 154

Group: 4, 5

Verdict: ACCEPTED

input
360 360 90 90
0 0 0 0
.................................

correct output
YES

user output
YES

Test 155

Group: 4, 5

Verdict: ACCEPTED

input
360 360 89 89
0 0 0 0
.................................

correct output
YES

user output
YES

Test 156

Group: 4, 5

Verdict: ACCEPTED

input
360 360 90 90
0 0 0 0
.................................

correct output
YES

user output
YES

Test 157

Group: 4, 5

Verdict: ACCEPTED

input
360 360 89 89
0 0 0 0
.................................

correct output
YES

user output
YES

Test 158

Group: 4, 5

Verdict: ACCEPTED

input
360 360 88 88
0 0 0 0
.................................

correct output
YES

user output
YES

Test 159

Group: 4, 5

Verdict: ACCEPTED

input
360 360 87 87
0 0 0 0
.................................

correct output
YES

user output
YES

Test 160

Group: 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 161

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 162

Group: 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 163

Group: 4, 5

Verdict:

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

correct output
NO

user output
YES

Test 164

Group: 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 165

Group: 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 166

Group: 4, 5

Verdict: ACCEPTED

input
349 343 80 76
0 171 0 171
.X...X...X...X...X...X...X...X...

correct output
YES

user output
YES

Test 167

Group: 4, 5

Verdict:

input
344 347 85 80
0 0 0 0
.................................

correct output
NO

user output
YES

Test 168

Group: 4, 5

Verdict:

input
343 354 76 83
0 0 0 0
.................................

correct output
NO

user output
YES

Test 169

Group: 4, 5

Verdict:

input
350 335 78 81
0 0 0 0
.................................

correct output
NO

user output
YES

Test 170

Group: 4, 5

Verdict:

input
328 336 76 79
0 0 0 0
.................................

correct output
NO

user output
YES

Test 171

Group: 4, 5

Verdict:

input
345 347 77 82
0 0 0 0
.................................

correct output
NO

user output
YES

Test 172

Group: 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 173

Group: 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 174

Group: 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 175

Group: 4, 5

Verdict:

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

correct output
YES

user output
NO

Test 176

Group: 4, 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 177

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 178

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 179

Group: 5

Verdict: ACCEPTED

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

correct output
NO

user output
NO

Test 180

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 181

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 182

Group: 5

Verdict: ACCEPTED

input
1500 1500 1500 1500
0 653 798 0
.................................

correct output
NO

user output
NO

Test 183

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 184

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 185

Group: 5

Verdict: ACCEPTED

input
1500 1500 1500 1500
0 87 350 0
....X.......XX.............X.X...

correct output
NO

user output
NO

Test 186

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 187

Group: 5

Verdict:

input
1500 1500 97 133
87 957 138 840
XXX.XX..XX..X..X..X......X..X....

correct output
NO

user output
YES

Test 188

Group: 5

Verdict: ACCEPTED

input
1500 1500 1500 1500
0 335 362 0
XXXX......XXXXXXX...XX.X..X.XX...

correct output
NO

user output
NO

Test 189

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 190

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 191

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 192

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 193

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 194

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 195

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 196

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 197

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 198

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 199

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 200

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 201

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 202

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 203

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 204

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 205

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 206

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 207

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 208

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 209

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES

Test 210

Group: 5

Verdict: ACCEPTED

input
1427 1358 338 328
0 679 0 679
.X...X...X...X...X...X...X...X...

correct output
YES

user output
YES

Test 211

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 212

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 213

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 214

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 215

Group: 5

Verdict:

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

correct output
NO

user output
YES

Test 216

Group: 5

Verdict:

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

correct output
YES

user output
NO

Test 217

Group: 5

Verdict:

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

correct output
YES

user output
NO

Test 218

Group: 5

Verdict:

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

correct output
YES

user output
NO

Test 219

Group: 5

Verdict:

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

correct output
YES

user output
NO

Test 220

Group: 5

Verdict: ACCEPTED

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

correct output
YES

user output
YES