QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#335807#4079. 칠하기daoquanglinh2007100 ✓1297ms463004kbC++203.2kb2024-02-23 23:46:262024-02-23 23:46:26

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 30
Accepted

Test #1:

score: 30
Accepted
time: 4ms
memory: 15928kb

input:

3 5
...##
....#
#.#..

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 13ms
memory: 13868kb

input:

4 4
..#.
#...
...#
.#..

output:

1

result:

ok single line: '1'

Test #3:

score: 0
Accepted
time: 6ms
memory: 14128kb

input:

15 15
#######..######
######....#####
#####......####
####........###
###..........##
##............#
#..............
...............
#.............#
##...........##
###.........###
####.......####
#####.....#####
######...######
#######.#######

output:

1

result:

ok single line: '1'

Test #4:

score: 0
Accepted
time: 10ms
memory: 15984kb

input:

16 16
########..######
#######....#####
######......####
#####........###
####..........##
###............#
##..............
................
##.............#
###...........##
####.........###
#####.......####
######.....#####
#######...######
########.#######
########.#######

output:

0

result:

ok single line: '0'

Test #5:

score: 0
Accepted
time: 10ms
memory: 15972kb

input:

15 16
########..######
#######....#####
######......####
#####........###
####..........##
###............#
##..............
................
##.............#
###...........##
####.........###
#####.......####
######.....#####
#######...######
########.#######

output:

1

result:

ok single line: '1'

Test #6:

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

input:

10 10
..#...#...
...#...#..
.#...#...#
#...#...#.
..#...#...
...#...#..
.#...#...#
#...#...#.
..#...#...
...#...#..

output:

1

result:

ok single line: '1'

Test #7:

score: 0
Accepted
time: 8ms
memory: 13900kb

input:

10 10
..#...#...
...#...#..
.#..#....#
#.......#.
.......#..
..#.......
.#.......#
#....#..#.
..#...#...
...#...#..

output:

1

result:

ok single line: '1'

Test #8:

score: 0
Accepted
time: 12ms
memory: 15964kb

input:

20 20
..#...#...#...#...#.
#..#...#...#...#....
....#...#...#...#..#
..#..#...#...#....#.
.#....#...#...#..#..
#...#..#...#....#...
...#....#...#..#...#
..#...#..#....#...#.
.#...#....#..#...#..
#...#...#...#...#...
...#...#...#...#...#
..#...#..#....#...#.
.#...#....#..#...#..
#...#..#...#....#...
...

output:

0

result:

ok single line: '0'

Test #9:

score: 0
Accepted
time: 12ms
memory: 13940kb

input:

10 16
..#..#..#..#..#.
#..#..#..#..#...
.#..#..#..#....#
..#..#..#....#..
#..#..#....#..#.
.#..#....#..#..#
..#....#..#..#..
#....#..#..#..#.
...#..#..#..#..#
.#..#..#..#..#..

output:

1

result:

ok single line: '1'

Test #10:

score: 0
Accepted
time: 8ms
memory: 16520kb

input:

50 45
..#...##..##...#...#.#.#.....#..#..##..##.#..
...#.#.#.#..##...###.#..##.##.#.....#......#.
#......#.##.##....#.....#......#.#.#.#...#...
.#.#####....##.#.#..###..#.##.###..#...#....#
.....#.#.##.#..#..#...#.##...##..#...#....##.
.#..#.....##..###...##....##..#...#.##.###...
..#.#.#.#..#.##.#....

output:

0

result:

ok single line: '0'

Test #11:

score: 0
Accepted
time: 10ms
memory: 16616kb

input:

50 45
.....#...#.#..#........#.........#..........#
...##.......#...##...#..#...###.....##...#..#
.#...#...#....#....#...#.......#...#..##...#.
......#.......#.#.#.......#..#.#.#....#......
#..#..#.....#.#.......#.#..#..#...#.#....#...
.#.#....#.#...#.#...#...#.#....#........#.#..
.....##..#...##.#....

output:

0

result:

ok single line: '0'

Test #12:

score: 0
Accepted
time: 13ms
memory: 16860kb

input:

50 50
.#.......###....#.#..#....#....#...#..##....#.#.#.
............#.................#......##...........
......................................#...........
.......................................##.........
...........#...#.................................#
#......#.....#..#.........#...............

output:

0

result:

ok single line: '0'

Test #13:

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

input:

50 50
###...###..#.##..###...#..#...###....#..#.#.##.###
#....#.#......#........##......#............##....
.....#..................#........................#
...#..............................................
#................................................#
#.........................................

output:

0

result:

ok single line: '0'

Test #14:

score: 0
Accepted
time: 8ms
memory: 16816kb

input:

50 50
###.####...#.#...###...##.#...###....#..#.#.##.###
#...##.#......#........##.....##............##...#
....##..................#...................#.....
...#................#.............................
#................................................#
#.........................................

output:

0

result:

ok single line: '0'

Test #15:

score: 0
Accepted
time: 13ms
memory: 16836kb

input:

50 50
###..###...#.##..###...####...###....#..#.#.##.###
#....#.#......#........##......#............##....
....##..................#...................#....#
...#................#.............................
#................................................#
#.........................................

output:

0

result:

ok single line: '0'

Test #16:

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

input:

50 50
#.#.#.....###..#...#..###.#.....#..###.##.#.#...#.
#........###......#....#.......##......##....#....
........##......#.....#........#.......#..........
.........#...........#................##..........
#..............#.................................#
.....#..................#.................

output:

0

result:

ok single line: '0'

Test #17:

score: 0
Accepted
time: 8ms
memory: 16876kb

input:

50 50
#.#.#....####..#...#.####.#.#...#.##.#.##.#.#...#.
#........###......#...##.......##......##....#....
........##......#.....#........#.......#..........
.........#...........#................##..........
#..............#.................................#
.....#..................#.................

output:

0

result:

ok single line: '0'

Test #18:

score: 0
Accepted
time: 10ms
memory: 16916kb

input:

50 50
#.#.#....####..#..##.####.#.#...#.##.#.##.#.#...#.
#........###......#..###.......##.......#....#....
........##......#.....#........#.......#..........
.........#...........#................##..........
#..............#.................................#
.....#..................#.................

output:

0

result:

ok single line: '0'

Test #19:

score: 0
Accepted
time: 8ms
memory: 16884kb

input:

50 50
.#.###..#...#..#...##.#..##..#....#..#..##..#..#..
.....#......#.....#.#...................#........#
#.........#.......#......................#........
##..............#.................................
.....#......................#....................#
#.....#...................................

output:

0

result:

ok single line: '0'

Test #20:

score: 0
Accepted
time: 13ms
memory: 17068kb

input:

50 50
##...#..#..###.#...##.#...#..#....#..#...#.##..#..
.....#....#.#.....#.#...................#........#
#.........#.......#......................#........
#...............#.................................
#................................................#
##........................................

output:

0

result:

ok single line: '0'

Test #21:

score: 0
Accepted
time: 13ms
memory: 16572kb

input:

50 50
.#.....#.#.#.#..##.#..#.###....##.###.##.###..#.##
..##..#........##....#..#..#...#......#..#.......#
#..##.........#..........#..#..###...###..#.....##
#.......#...##.#..###..#...#.#..###...#...##.#....
.......#.##....#.##...#...##...#.....#.....##.....
#.........##..#.##.#.....#.#....#.........

output:

0

result:

ok single line: '0'

Test #22:

score: 0
Accepted
time: 10ms
memory: 16880kb

input:

50 50
##.....##...###.##.....##..#..####.#.#..##..#..##.
...#...####..#..###...#.#..#..##...#..#..##...##..
##..#..#....##..##..#....#...###.....#..###.......
.#....#.#....##....##.......#.#.....#....#......##
.....#.......#....#........#.....#...#...#.......#
.........#..#.#.#..#....#.#..#........#...

output:

0

result:

ok single line: '0'

Test #23:

score: 0
Accepted
time: 8ms
memory: 16628kb

input:

50 50
##......#...###.##.....##.##...####..##.#...#..##.
...#...##.#..##..##...##........#..#..#..##...##..
##..##.#.#..###...###....#...###.........##......#
##....#..#....#....#.#..#...#..#..#.....##......#.
.....#.#......#...##...#...#..#..#..##...#........
............#..##..#..#.###..#....#...#...

output:

0

result:

ok single line: '0'

Test #24:

score: 0
Accepted
time: 8ms
memory: 17208kb

input:

50 50
..#...#...#...#...#...#...#...#...#...#...#...#...
...#...#...#...#...#...#...#...#...#...#...#...#..
.#...#...#...#...#...#...#...#...#...#...#...#...#
#...#...#...#...#...#...#...#...#...#...#...#...#.
..#...#...#...#...#...#...#...#...#...#...#...#...
...#...#...#...#...#...#...#...#...#......

output:

0

result:

ok single line: '0'

Test #25:

score: 0
Accepted
time: 13ms
memory: 14908kb

input:

50 50
..#...#...#...#...#...#...#...#...#...#...#...#...
...#...#...#...#...#...#...#...#...#...#...#...#..
.#...#...#...#...#...#...#...#...#...#...#...#...#
#...#...#...#...#...#...#...#...#...#...#...#...#.
..#...#...#...#...#...#...#...#...#...#...#...#...
...#...#...#...#...#...#...#...#...#......

output:

1

result:

ok single line: '1'

Test #26:

score: 0
Accepted
time: 8ms
memory: 16940kb

input:

50 50
..#...#...#...#...#...#...#...#...#...#...#...#...
...#...#...#...#...#...#...#...#.....#.#...#...#..
.#...#...#...#...#...#...#...#...#...#...#...#...#
#.#.....#...#.#.....#...#...#...##..#...#...#...#.
..#...#...#...#...#...#...#...#...#...#...#...#...
...#...#...#...#...#...#...#...#...#......

output:

1

result:

ok single line: '1'

Test #27:

score: 0
Accepted
time: 13ms
memory: 17016kb

input:

50 50
..#...#...#...#...#...#...#...#...#...#...#...#...
.......#...#...#...#...#...#...#...#...#...#...#..
.#...#...#...#...#...#...#...#...#...#...#...#...#
#...#...#...#...#...#...#...#...#...#...#...#...#.
..#...#...#...#...#...#...#...#...#...#...#...#...
...#...#...#...#...#...#...#...#...#......

output:

1

result:

ok single line: '1'

Test #28:

score: 0
Accepted
time: 13ms
memory: 17020kb

input:

50 50
..#...#...#...#...#...#...#...#...#...#...#...#...
...#...#...#...#...#...#...#...#...#...#...#...#..
.#...#...#...#...#...#...#...#...#...#...#...#...#
#...#...#...#...#...#...#...#...#...#...#...#...#.
..#...#...#...#...#...#...#...#...#...#...#...#...
...#...#...#...#...#...#...#...#...#......

output:

1

result:

ok single line: '1'

Test #29:

score: 0
Accepted
time: 13ms
memory: 16936kb

input:

50 50
..#...#...#...#...#...#...#...#...#...#...#...#...
...........#...........#...#...#...#...#...#...#..
.....#...............#...##..#...#...#...#...#...#
#...#...............#...#...#...#...#...#.......#.
.#..........#.........#.......#...#...#...#.#.....
...........#...#...#...#...#...#...#......

output:

1

result:

ok single line: '1'

Test #30:

score: 0
Accepted
time: 13ms
memory: 16760kb

input:

50 50
..#...#...#...#...#...#...#...#...#...#...#...#...
...#.....#....#......#.....#...#.....#...#...#....
.#..##.......#...........##..#.....#.#......##....
#.#..##...##.#......#..#.#..#...#...#......#.....#
..#....##...#..#......#.#.....#.#.#..#..#...#...#.
......#....#..#....#..#....#...#.#.#..#...

output:

1

result:

ok single line: '1'

Test #31:

score: 0
Accepted
time: 8ms
memory: 14512kb

input:

50 50
#########################.########################
########################...#######################
#######################.....######################
######################.......#####################
#####################.........####################
####################...........########...

output:

0

result:

ok single line: '0'

Test #32:

score: 0
Accepted
time: 12ms
memory: 14640kb

input:

50 50
#########################.########################
########################...#######################
#######################.....######################
######################.......#####################
#####################.........####################
####################...........########...

output:

1

result:

ok single line: '1'

Test #33:

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

input:

50 50
...........##############.############............
...........#############...###########............
...........############.....##########............
...........###########.......#########............
...........##########.........########............
...........#########...........#######....

output:

0

result:

ok single line: '0'

Test #34:

score: 0
Accepted
time: 12ms
memory: 14564kb

input:

50 50
#########################.########################
#######..###############...#######################
######....#############.....######################
#####......###########.......#####################
####........#########.........####################
###.........########...........########...

output:

0

result:

ok single line: '0'

Test #35:

score: 0
Accepted
time: 6ms
memory: 16768kb

input:

50 50
..#...#...#...#...#...#...#...#...#...#...#...#...
.......#..##.....#.......#....##...#......#......#
.#...#...#...#.....#....#....#...#.....#.....#....
#.......#...#......#...#..#..##.......#.....#.....
......##.###........#.#....##.##..#........##....#
....##...#........#.##...##....##....#....

output:

0

result:

ok single line: '0'

Test #36:

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

input:

50 50
..#...#...#...#...#...#...#...#...#...#...#...#...
...#..##...#.....#...#.#..#...#..............#...#
.#...#...###.#.....##....#...#...#...........#....
#.#.....#...#.......##.....#.#.#.........#.....#..
.......#...#.........#....#.#.#.............#...#.
....##...#........#.....#.#....##....#....

output:

1

result:

ok single line: '1'

Test #37:

score: 0
Accepted
time: 13ms
memory: 16752kb

input:

50 50
..#...#...#...#...#...#...#...#...#...#...#...#...
...#..##...#.....#...#.#..#...#..............#...#
.#...#.#....##.....##....#...#...#...........#....
#.#.....#...#........#.....#.#.#.........#........
.......#...#........##....#.#.#.............#.....
....##...#........##....#.#....##....#....

output:

1

result:

ok single line: '1'

Test #38:

score: 0
Accepted
time: 4ms
memory: 16148kb

input:

10 10
..#...#...
.......#..
.........#
#.......#.
...#......
..........
.......#..
#.........
..#...#...
...##..#.#

output:

1

result:

ok single line: '1'

Test #39:

score: 0
Accepted
time: 10ms
memory: 16392kb

input:

47 43
#########...#...#####...#...#####...#...###
##########.....#######.....#######.....####
#########.......#####.......#####.......###
#########.......#####.......#####.......###
##########...#..######...#..######...#..###
###..#..#..#..#..#..#..#..#..#..#..#..#...#
####...#..######...#..######.....

output:

1

result:

ok single line: '1'

Subtask #2:

score: 70
Accepted

Dependency #1:

100%
Accepted

Test #40:

score: 70
Accepted
time: 385ms
memory: 297472kb

input:

983 991
#########...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#...#####...#......

output:

1

result:

ok single line: '1'

Test #41:

score: 0
Accepted
time: 580ms
memory: 270388kb

input:

1000 1000
##################################################################################################################################################################################################################################################################################################...

output:

1

result:

ok single line: '1'

Test #42:

score: 0
Accepted
time: 703ms
memory: 227680kb

input:

1000 1000
##################################################################################################################################################################################################################################################################################################...

output:

0

result:

ok single line: '0'

Test #43:

score: 0
Accepted
time: 773ms
memory: 459564kb

input:

998 998
...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...

output:

1

result:

ok single line: '1'

Test #44:

score: 0
Accepted
time: 789ms
memory: 462116kb

input:

998 998
#..#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...

output:

0

result:

ok single line: '0'

Test #45:

score: 0
Accepted
time: 776ms
memory: 463004kb

input:

998 998
...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...

output:

1

result:

ok single line: '1'

Test #46:

score: 0
Accepted
time: 769ms
memory: 462000kb

input:

998 998
...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...#...

output:

1

result:

ok single line: '1'

Test #47:

score: 0
Accepted
time: 1257ms
memory: 313424kb

input:

1000 1000
.....................................................................................................................................................................................................................................................................................................

output:

0

result:

ok single line: '0'

Test #48:

score: 0
Accepted
time: 1297ms
memory: 373968kb

input:

1000 1000
.............................................................................................................................................................................#............................................................#..................#.......................................

output:

0

result:

ok single line: '0'

Test #49:

score: 0
Accepted
time: 1129ms
memory: 378788kb

input:

1000 1000
.....#....#............................#...................#.###.........#.......#.#..#.......#................#.#............................#...#..............#.#........#.....#..........#.##.....#....#.......#.#...................##.........##...#.##.................#......#........#......

output:

0

result:

ok single line: '0'

Test #50:

score: 0
Accepted
time: 598ms
memory: 285628kb

input:

1000 1000
#.########......#.#....#...#..#...#.#............#..#..#.##.#.##.##...#..#...#..###....##.##.####....#....#.#.###....##.###.###...#.....#..##..##..#.#..#.###.###.#.#.....#.##........#...#.#...#.#.######.#...#.#.#..##.##.##........#.##..##...##.#####...#.####.#..#.#.##.....#....##....#.##.#...

output:

0

result:

ok single line: '0'