|

General

# Author Problem Lang Verdict Time Memory Sent Judged
53560074 Practice:
mnbvmar
1150B - 29 Python 3 Accepted 109 ms 36 KB 2019-04-30 11:57:14 2019-04-30 11:57:14

→ Source
vectors = [(0, 0), (1, -1), (1, 0), (1, 1), (2, 0)]

N = int(input())
board = [list(input()) for row_id in range(N)]

for row in range(N - 2):
for col in range(1, N - 1):
can_place = all(board[row + dr][col + dc] == '.' for (dr, dc) in vectors)
if can_place:
for (dr, dc) in vectors:
board[row + dr][col + dc] = '#'

has_dots = any(row.count('.') for row in board)
print('NO' if has_dots else 'YES')


1
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
3
#.#
...
#.#

Participant's output
YES

YES

Checker comment
ok answer is YES


2
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
4
##.#
#...
####
##.#

Participant's output
NO

NO

Checker comment
ok answer is NO


3
Time: 77 ms, memory: 32 KB
Verdict: OK
Input
5
#.###
....#
#....
###.#
#####

Participant's output
YES

YES

Checker comment
ok answer is YES


4
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
5
#.###
....#
#....
....#
#..##

Participant's output
NO

NO

Checker comment
ok answer is NO


5
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
6
#.##.#
......
#.##.#
......
##.###
#...##

Participant's output
NO

NO

Checker comment
ok answer is NO


6
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
3
###
#.#
###

Participant's output
NO

NO

Checker comment
ok answer is NO


7
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
21
#########.###.#####.#
#.####.#........##...
....#............#..#
#....#....#..##.#...#
#.#..##..#....####..#
.............###.#...
#.##.##..#.###......#
###.##.....##.......#
##...........#..##.##
#...##.###.#......###
#....###.##..##.....#
##....#.......##.....
#.##.##..##.........#
....##....###.#.....#
#....##....##......##
##..#.###.#........##
#......#.#.....##..##
##..#.....#.#...#...#
#........#.##..##..##
....##.##......#...##
#.########.##.###.###

Participant's output
NO

NO

Checker comment
ok answer is NO


8
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
21
##.######.###.#####.#
#...##.#.......#.#...
##..#...#.....#.....#
#....#..###.###.....#
....#....####....#.##
#..#....##.#....#.###
#...#.###...#.##....#
#..#.##.##.##.##.....
..........##......#.#
#.##.#......#.#..##.#
#.##.............#...
..........#.....##..#
#.#..###..###.##....#
#....##....##.#.....#
....#......#...#.#...
#.#.........#..##.#.#
#..........##.......#
....#....#.##..##....
#.#.##.#.......##.#.#
##...##....##.##...##
###.####.########.###

Participant's output
YES

YES

Checker comment
ok answer is YES


9
Time: 109 ms, memory: 0 KB
Verdict: OK
Input
50
#.##.##.###.###.##.###.########.######.##.####.###
.........#..........#...##.###...#.##......#.....#
#.#..#..#.#.....#..#.#.##....##......#.##.........
##.........##..#......#.##....#.......##.....##..#
#.#.##..#.##......##.#...#.#.###.###.#.....###...#
....##...##.......#.##..#....###.###.....###.##..#
#....#..##.#.###........##........#....#.##.......
#.#.....#...#.##....##..##.#......##.##....#.....#
........##.....#..##.#......##.#...####......#..##
#.#..#...#....#...#.....##.##.##..##.#....
Participant's output
YES

YES

Checker comment
ok answer is YES


10
Time: 93 ms, memory: 4 KB
Verdict: OK
Input
49
###.###.#####.##.##########.###.#####.##.##.##.##
##...#....##......#.###.##...#....##............#
###.#.#....#..##.#........#.#.#.....#.#..##....##
###....##.#....####........#....#....#...#.#...##
#.....#.####....#.##..#.#.#.#.....#.#.#.#...#..##
....##...#.##..#.............#.....#...###.#....#
#.#.###.#.......#.#..##.........#..##.##.##.....#
##....##.#..#....#...##.#......##...###...##.#...
###..........#..##..#........##.##.#.###.#.##.#.#
#.###..#..#.....#........#.#.#...##....##......#...
Participant's output
NO

NO

Checker comment
ok answer is NO


11
Time: 93 ms, memory: 4 KB
Verdict: OK
Input
50
#####.####.####.####.####.####.####.####.####.####
##.#....#....#....#....#....#....#....#....#....##
#................................................#
#...............................................##
.................................................#
#.................................................
##...............................................#
#................................................#
#...............................................##
..........................................
Participant's output
YES

YES

Checker comment
ok answer is YES


12
Time: 93 ms, memory: 4 KB
Verdict: OK
Input
16
#####.####.#####
##.##...##...###
##....#....#...#
#..#....#....#..
#....#....#....#
#.#....#....#..#
##..#....#....##
##....#....#...#
#..#....#....#..
#....#....#....#
#.#....#....#..#
##..#....#....##
##....#....#..##
##.#..#.#..#.###
####.####.######
################

Participant's output
NO

NO

Checker comment
ok answer is NO


13
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
23
#####.####.####.####.##
##.#.#..#.#..#.#..#.#.#
#.#....#....#....#...##
#...#....#....#....#..#
.#....#....#....#....#.
#..#....#....#....#...#
##...#....#....#....#.#
#.#....#....#....#...##
#...#....#....#....#..#
.#....#....#....#....#.
#..#....#....#....#...#
##...#....#....#....#.#
#.#....#....#....#...##
#...#....#....#....#..#
.#....#....#....#....#.
#..#....#....#....#...#
##...#....#....#....#.#
#.#....#....#....#...##
#...#....#....#....#..#
.#....#....#....#....#.
#..#......
Participant's output
NO

NO

Checker comment
ok answer is NO


14
Time: 93 ms, memory: 8 KB
Verdict: OK
Input
25
#####.####.####.####.####
##.#..#.#..#.#..#.#..#.##
#..#....#....#....#....##
#....#....#....#....#..##
..#....#....#....#....#.#
#...#....#....#....#....#
##....#....#....#....#..#
#..#....#....#....#....##
#....#....#....#....#..##
..#....#....#....#....#.#
#...#....#....#....#....#
##....#....#....#....#..#
#..#....#....#....#....##
#....#....#....#....#..##
..#....#....#....#....#.#
#...#....#....#....#....#
##....#....#....#....#..#
#..#....#....#....#....##
#....#....#....#....#...
Participant's output
NO

NO

Checker comment
ok answer is NO


15
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
20
#####.####.####.####
##.#....#....#....##
#....#....#....#...#
#.#....#....#....###
....#....#....#....#
##....#....#....#...
##.#....#....#....##
#....#....#....#...#
#.#....#....#....###
....#....#....#....#
##....#....#....#...
##.#....#....#....##
#....#....#....#...#
#.#....#....#....###
....#....#....#....#
##....#....#....#...
##.#....#....#...###
#...##...##...######
####################
####################

Participant's output
NO

NO

Checker comment
ok answer is NO


16
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
49
##.###.####.##.#####.####.##.####.####.###.###.##
#...#....#......##....##......##...#............#
##..##....#..#.#.....#.##.#..#.##.#............##
##....##..#.........#....#......#.##.###.##..####
###....#.........#...#....#..#.....##.##.#...##.#
##.##.##.....#..##..##.#.#........#.......#.##...
#...##....#.#.......#...#....##.#......#..###.#.#
#..#.###........#..##..##..#.###....#..........##
.......###..#.#....#...#.......##.##.#.#......###
#..#....##...#....##..#.#..#....#.#.......#.###....
Participant's output
NO

NO

Checker comment
ok answer is NO


17
Time: 108 ms, memory: 0 KB
Verdict: OK
Input
49
####.###.####.###.###.##.##.###.###.####.####.###
###...#....#...#.................#...#....#....##
#.##..##....#.##......##.#......##..#....#....###
...#...##..###......###.#.....###...#..#.##..##.#
#..##.#....#........##........##.#.#.............
#....#....#....#.#.#.##......##...#.#.##......#.#
#.......###..##...#...##.....##..#...###.#.....##
.........#...##..###.##...#..#...#..##........#.#
#....#....#.##...#.##.##..#.....#...#....##.#....
#.#..##..###.##.#..........#....#..##..##.##.......
Participant's output
NO

NO

Checker comment
ok answer is NO


18
Time: 92 ms, memory: 0 KB
Verdict: OK
Input
3
...
...
...

Participant's output
NO

NO

Checker comment
ok answer is NO


19
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
7
#.....#
.......
.......
.......
.......
.......
#.....#

Participant's output
NO

NO

Checker comment
ok answer is NO


20
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
49
##.##.###.##.###.###.##.############.##.####.####
#......#......#...#......#.###.###.......##...###
##..#.##..##.###.##..#..#...#.........#..##..##.#
##...##....###.##........#.#.#...............#...
###..###....#.......#..........#.#....##.#..###.#
#.#...##.#.##..#..#....#.........##.###.#....##.#
...#.##...##..........#.##.##......##....#.......
#.#.##.#..###..#.##..#....##............####.#..#
##.........##...##....#....#.....#..#..##.###...#
##..##..#..##..##....#.##.#.....#..........#.#.#...
Participant's output
YES

YES

Checker comment
ok answer is YES


21
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
20
#.##.##.##.##.##.###
...................#
#..#..#..#..#..#....
#................#.#
#..#..#..#..#......#
....................
#..#..#..#..#......#
#.............#....#
#..#..#..#......#..#
....................
#..#..#..#......#..#
#..........#.......#
#..#..#......#..#..#
....................
#..#..#......#..#..#
#.......#..........#
#..#......#..#..#..#
....................
#.##....#.##.##.##.#
######.#############

Participant's output
YES

YES

Checker comment
ok answer is YES


22
Time: 78 ms, memory: 4 KB
Verdict: OK
Input
50
#.###.##.##.##.##.##.##.###.##.##.##.##.###.##.###
.................................................#
#......#..#..#..#..#..#......#..#..#.#.......#....
#.#.....................#.#...............#...#..#
........#..#..#.#..#......##.#..##.........#.#...#
#..#........................#....##..#.#.....##..#
#........#..#......#.....................#........
#..#..#.......#......#...........#..#......#.....#
.......#..#............#.....................#..##
#.##........#..#..##....#.......#..#......
Participant's output
YES

YES

Checker comment
ok answer is YES


23
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
49
#.##.##.##.###.##.####.##.##.##.##.##.##.##.##.##
....................#...........................#
#..#..#..#......#......#..#..#..#..#..#..#..#..##
#..........#......#.............................#
#..#..#.............#..#..#..#..#..#..#..#..#....
...........#..#.#.............................#.#
#..#.#............#..#..#..#..#..#..#..#..#.....#
#.........#..#..............................#....
#.................#..#..#..#..#..#..#..#......#.#
.....#.#..#..#.....................................
Participant's output
NO

NO

Checker comment
ok answer is NO


24
Time: 93 ms, memory: 36 KB
Verdict: OK
Input
50
#####.####.####.####.####.####.####.####.#########
##.#....#....#....#....#....#....#....#....####.##
#............................................#...#
#...............................................##
.............#...................................#
#...........###...................................
##...........#...................................#
#................................................#
#...............................................##
...............................#..........
Participant's output
NO

NO

Checker comment
ok answer is NO


25
Time: 108 ms, memory: 0 KB
Verdict: OK
Input
49
#####.####.####.####.####.####.####.####.####.###
##.#....#....#....#....#....#....#....#...##....#
#........................................###.....
#...................................#.....#.....#
...................................###..........#
#...................#...............#..........##
###................###..........................#
####................#..................#.........
#.#...................................###.......#
.......................................#...........
Participant's output
YES

YES

Checker comment
ok answer is YES


26
Time: 108 ms, memory: 0 KB
Verdict: OK
Input
49
#####.####.####.####.####.####.####.####.####.###
##.##...##...##...##...##...##...##...##...##...#
##....#....#....#....#....#....#....#....#..#.#..
#..#....#....#....#....#....#....#....#....###..#
#....#....#..#.#....#....#....#....#....#...##..#
#.#....#....###..#....#....#..#.#..#.#....#....##
##..#....#...##....#....#....###..###..#....#...#
##....#....#....#..#.#....#...##...##....#....#..
#..#....#....#....###..#....#....#....#....#....#
#....#....#....#...##....#....#....#....#....#.....
Participant's output
NO

NO

Checker comment
ok answer is NO


27
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
50
#####.####.####.####.####.####.####.####.####.####
##.#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..##
#.#....#....#....#....#....#....#....#....#....#.#
#...#....#....#....#....#....#....#....#....#...##
.#....#....#....#....#....#....#....#....#....#..#
#..#....#....#....#....#....#....#....#....#....#.
##...#....#....#....#....#....#....#....#....#...#
#.#....#....#....#....#....#....#....#....#.#..#.#
#...#....#....#....#....#....#....#....#...###..##
.#....#....#....#....#....#....#....#.....
Participant's output
NO

NO

Checker comment
ok answer is NO


28
Time: 109 ms, memory: 0 KB
Verdict: OK
Input
48
#####.####.####.####.#########.####.####.####.##
##.#..#.#..#.#..#.#..#.####.#..#.#..#.#..#.#..##
#..#....#....##...#....#.#..#....#....#....#..##
#....#....#..###....#....#....#....#....#....#.#
..#....#....#.#..#....#....#....#....#....#....#
#...#....#....##...#....#....#....#....#....#..#
##....#....#..###....#....#....#....#....#....##
#..#....#....#.#..#....#....##...#....#....#..##
#....#....#....#....#....#..###....#....#....#.#
..#....#....#....#....#....##...#....#....#....#
#...#.....
Participant's output
NO

NO

Checker comment
ok answer is NO


29
Time: 93 ms, memory: 4 KB
Verdict: OK
Input
49
#####.####.####.####.####.####.####.####.####.###
##.#....#....#....#....#....#....#....#....#....#
#....#....#....#....#....#....#....#....#....#...
#.#....#....#....#....#....#....#....#....#....##
....#....#....#....#....#....#....#....#....#...#
##....#....#....#....#....#....#....#....#....###
##.#....#....#....#....#....#....#....#....#....#
#....#....#....#....#....#....#....#....#....#...
#.#....#....#....#....#....#....#....#....#....##
....#....#....#....#....#...##...##...##....#......
Participant's output
NO

NO

Checker comment
ok answer is NO


30
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
50
######################.#########.#################
#######.##########.##...#######...####.#######.###
######...##.#####...##.#########.####...#####...##
#######.##...#####..##########.#######.#######.###
###########.######...########...#########.########
###################.##########.######.##...#######
##.##########################.######...##.#####.##
#...#######.################...###.##.#######....#
##.#######...########.###.###.###...########.....#
###########.########...#...#######.####...
Participant's output
YES

YES

Checker comment
ok answer is YES


31
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
50
########################################.#########
#####################.######.##########...########
####################...####...##########..########
###################.#.######.###########...#######
####.#############...####################.########
###...#############.#########.####################
####.##############.########...##.####.###########
##################...###.####.##...##...#######.##
########.#########..###...#.#####.####.#######...#
######....###.###...####.#...#.########...
Participant's output
NO

NO

Checker comment
ok answer is NO


32
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
50
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
#######################################...
Participant's output
YES

YES

Checker comment
ok answer is YES


33
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
50
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
#######################################...
Participant's output
NO

NO

Checker comment
ok answer is NO


34
Time: 109 ms, memory: 0 KB
Verdict: OK
Input
50
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..........................................
Participant's output
NO

NO

Checker comment
ok answer is NO


35
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
50
#................................................#
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..........................................
Participant's output
NO

NO

Checker comment
ok answer is NO


36
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
50
##.#####.####.###.#####.####.###.##.####.#######.#
#...##....#.........##....#..........#....###.#...
##..#................##....#.....#..#....##....#.#
#......#.....##.#.#.##.##..###.#....#..##.....##.#
.......#..#...##...##...#...#.#.............##....
#.###.#....#.##.#.##.#.#.#.#.....#........#.#....#
####.##.....#....#........##......#.##..##...#..##
##.......#................#.........#....##.##...#
#.....#.#.....#.....##.#...#.........#....##.##..#
##.#...#....###..#....##..#.##....###.#...
Participant's output
NO

NO

Checker comment
ok answer is NO


37
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
5
#####
.####
..###
.####
#####

Participant's output
NO

NO

Checker comment
ok answer is NO


38
Time: 93 ms, memory: 36 KB
Verdict: OK
Input
5
#####
#####
#####
####.
###..

Participant's output
NO

NO

Checker comment
ok answer is NO


39
Time: 93 ms, memory: 8 KB
Verdict: OK
Input
3
###
#.#
...

Participant's output
NO

NO

Checker comment
ok answer is NO


40
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
4
####
###.
##..
.##.

Participant's output
NO

NO

Checker comment
ok answer is NO


41
Time: 109 ms, memory: 0 KB
Verdict: OK
Input
3
##.
###
###

Participant's output
NO

NO

Checker comment
ok answer is NO


42
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
3
.##
..#
.##

Participant's output
NO

NO

Checker comment
ok answer is NO


43
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
3
..#
.##
###

Participant's output
NO

NO

Checker comment
ok answer is NO


44
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
3
###
##.
#..

Participant's output
NO

NO

Checker comment
ok answer is NO


45
Time: 61 ms, memory: 4 KB
Verdict: OK
Input
3
##.
#..
##.

Participant's output
NO

NO

Checker comment
ok answer is NO


46
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
3
.##
###
###

Participant's output
NO

NO

Checker comment
ok answer is NO


47
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
3
.#.
..#
.##

Participant's output
NO

NO

Checker comment
ok answer is NO


48
Time: 78 ms, memory: 0 KB
Verdict: OK
Input
3
..#
...
#.#

Participant's output
NO

NO

Checker comment
ok answer is NO


49
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
4
#..#
....
#..#
####

Participant's output
NO

NO

Checker comment
ok answer is NO


50
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
3
###
###
##.

Participant's output
NO

NO

Checker comment
ok answer is NO


51
Time: 93 ms, memory: 0 KB
Verdict: OK
Input
3
...
#.#
###

Participant's output
NO

NO

Checker comment
ok answer is NO


52
Time: 109 ms, memory: 0 KB
Verdict: OK
Input
17
#################
#################
#################
#################
#################
#################
#################
#################
#################
#################
#################
#################
#################
#################
#################
#################
##.##.##.##.##.##

Participant's output
NO

NO

Checker comment
ok answer is NO


53
Time: 92 ms, memory: 0 KB
Verdict: OK
Input
5
.....
.....
.....
.....
.....

Participant's output
NO

NO

Checker comment
ok answer is NO


54
Time: 78 ms, memory: 0 KB
Verdict: OK
Input
3
##.
#..
.#.

Participant's output
NO

NO

Checker comment
ok answer is NO


55
Time: 77 ms, memory: 0 KB
Verdict: OK
Input
5
#.#.#
##...
###.#
#####
#####

Participant's output
NO

NO

Checker comment
ok answer is NO


56
Time: 92 ms, memory: 0 KB
Verdict: OK
Input
4
####
####
####
##.#

Participant's output
NO

NO

Checker comment
ok answer is NO


57
Time: 109 ms, memory: 0 KB
Verdict: OK
Input
4
####
####
##.#
#...

Participant's output
NO

NO

Checker comment
ok answer is NO


58
Time: 77 ms, memory: 4 KB
Verdict: OK
Input
3
###
###
#.#

Participant's output
NO

NO

Checker comment
ok answer is NO


59
Time: 93 ms, memory: 24 KB
Verdict: OK
Input
5
#####
#####
#####
#####
.....

Participant's output
NO

NO

ok answer is NO