QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#669167#9478. Shift Puzzleucup-team5330TL 35ms8204kbC++144.9kb2024-10-23 17:30:272024-10-23 17:30:27

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3940kb

input:

3
.#.
#.#
.#.
#.#
...
#.#

output:

Yes
23
2 3
1 1
1 2
1 2
2 1
1 2
2 1
2 1
1 2
1 2
1 2
2 2
1 1
1 1
2 1
1 1
1 1
2 1
2 1
1 1
1 1
2 2
2 2

result:

ok AC

Test #2:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

3
.#.
#.#
.#.
.#.
#.#
.#.

output:

Yes
13
1 1
2 3
1 2
1 2
2 2
1 2
1 2
2 2
2 2
1 2
1 2
2 3
2 3

result:

ok AC

Test #3:

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

input:

13
.............
....#####....
......#......
......#......
......#......
......#......
.............
....#...#....
....#...#....
....#...#....
....#...#....
.....###.....
.............
....####.....
....#...#....
....####.....
....#........
....#........
.............
.....###.....
....#...#....
......

output:

No

result:

ok AC

Test #4:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

3
#.#
#.#
###
#.#
.#.
###

output:

No

result:

ok AC

Test #5:

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

input:

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

output:

No

result:

ok AC

Test #6:

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

input:

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

output:

No

result:

ok AC

Test #7:

score: 0
Accepted
time: 0ms
memory: 3940kb

input:

2
..
..
..
..

output:

Yes
1
1 2

result:

ok AC

Test #8:

score: 0
Accepted
time: 0ms
memory: 3744kb

input:

3
.##
##.
.#.
##.
..#
.##

output:

Yes
23
1 1
2 2
2 3
1 1
1 1
2 3
2 3
1 1
1 1
1 1
1 1
2 1
1 3
1 3
2 3
1 3
1 3
2 3
2 3
1 3
1 3
2 1
2 1

result:

ok AC

Test #9:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

3
...
#..
..#
...
#..
#..

output:

Yes
13
1 1
2 3
1 1
1 1
1 1
2 1
1 1
2 1
2 1
1 1
1 1
2 3
2 3

result:

ok AC

Test #10:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

3
..#
.##
###
#.#
.##
#.#

output:

Yes
10
1 1
1 1
1 1
1 1
1 1
2 2
1 1
2 2
2 2
1 1

result:

ok AC

Test #11:

score: 0
Accepted
time: 0ms
memory: 3736kb

input:

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

output:

Yes
37
1 2
1 2
1 2
1 2
1 2
1 2
1 2
2 1
1 2
2 1
2 1
2 1
1 2
1 4
1 4
1 4
1 4
1 4
2 4
1 4
2 4
2 4
2 4
1 4
1 4
1 4
2 2
1 4
1 4
1 4
2 2
2 2
2 2
1 4
1 4
1 4
1 4

result:

ok AC

Test #12:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

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

output:

Yes
49
1 2
1 1
1 1
1 1
2 3
1 1
2 3
2 3
2 3
1 1
1 1
1 1
1 1
1 2
2 1
1 2
1 2
1 2
2 1
2 1
2 1
1 2
1 2
1 2
1 2
1 3
1 3
1 3
2 3
1 3
1 3
1 3
2 3
2 3
2 3
1 3
1 3
2 2
1 3
1 3
1 3
2 2
2 2
2 2
1 3
1 3
1 3
1 3
1 3

result:

ok AC

Test #13:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

2
.#
.#
#.
#.

output:

Yes
8
1 2
2 2
1 2
2 1
1 2
2 1
1 2
1 2

result:

ok AC

Test #14:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

3
##.
.##
...
...
#..
###

output:

Yes
25
1 1
2 2
2 2
2 3
1 1
1 1
1 1
1 1
2 1
1 1
2 1
2 1
1 1
2 3
1 3
2 1
1 3
1 3
2 1
2 1
1 3
1 3
1 3
2 3
2 3

result:

ok AC

Test #15:

score: 0
Accepted
time: 0ms
memory: 3696kb

input:

3
.#.
##.
.#.
#.#
..#
#..

output:

Yes
21
2 3
1 1
2 1
1 2
1 2
1 2
1 2
2 1
1 2
2 1
2 1
1 2
1 3
1 3
1 3
2 3
1 3
2 3
2 3
1 3
1 3

result:

ok AC

Test #16:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

3
#.#
#..
#..
.#.
.##
.#.

output:

Yes
26
1 1
2 2
2 2
2 3
1 3
1 3
2 2
1 2
2 3
2 3
2 3
1 2
1 2
1 3
1 1
2 3
1 2
1 3
1 3
2 3
1 3
1 3
2 3
2 3
1 3
1 3

result:

ok AC

Test #17:

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

input:

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

output:

Yes
64
1 2
2 2
2 2
2 3
2 4
1 1
1 1
1 1
2 4
2 4
2 4
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 3
1 1
2 3
2 3
2 3
1 1
1 1
1 3
1 3
1 3
1 3
1 3
2 1
1 3
2 1
2 1
2 1
1 3
1 3
1 4
1 4
1 4
1 4
1 4
1 4
2 4
1 4
2 4
2 4
2 4
1 4
1 4
1 4
1 4
2 1
1 4
1 4
1 4
2 1
2 1
2 1
1 4
1 4

result:

ok AC

Test #18:

score: 0
Accepted
time: 0ms
memory: 3920kb

input:

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

output:

Yes
59
1 2
2 2
2 2
2 3
1 1
1 4
2 2
1 3
2 1
2 3
2 3
1 1
1 1
1 1
2 4
1 1
2 4
2 4
2 4
1 1
1 1
1 1
1 1
1 2
1 2
1 2
2 1
1 2
2 1
2 1
2 1
1 2
1 2
1 2
1 2
1 3
1 3
1 3
2 4
1 3
2 4
2 4
2 4
1 3
1 3
1 3
1 3
1 4
1 4
1 4
1 4
1 4
1 4
2 1
1 4
2 1
2 1
2 1
1 4

result:

ok AC

Test #19:

score: 0
Accepted
time: 0ms
memory: 3920kb

input:

19
.######.######..###
...###.##.###.#####
.#.####..#.##...###
.#####.##.######.##
.##.#############..
.#.....##..#.##.#.#
#####.###..#.###.##
#.####.#...##..#.##
.######.##.##..####
.#.###.###.###..###
#######.###.#..###.
#####.###.####.##.#
..#.######..###..#.
#.#.#..####..###.#.
########.####..##...

output:

No

result:

ok AC

Test #20:

score: 0
Accepted
time: 0ms
memory: 3936kb

input:

21
#####################
#####################
#####################
#####################
#####################
#####################
#####################
#########.###########
#####################
#####################
#####################
#####################
#####################
###########...

output:

No

result:

ok AC

Test #21:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

26
##.###....#######.....#...
.#.##.#####..#..#..###.###
.#.#####.##.##.#.#.##.#..#
###.###...##...#.#....#.#.
.##..###..#.##.#.##..#.#.#
#..##...##.#...####...####
##.#..###.#.####...###....
.##..#..##.##..#.##...#.##
####.###..#.#####..#####..
.#.#.##..###.###..###.####
##.##.#..#..#....###..###.
...

output:

No

result:

ok AC

Test #22:

score: 0
Accepted
time: 3ms
memory: 3852kb

input:

35
####.##.###.####..##.##############
####.####.##############.######.###
###########..######.###.######.###.
#.#.####.##.#####...###############
################.#####.############
#######...#.####.###..######.######
#.##.#############.####.######.#.##
##..####.####.#####################
#####.##....

output:

Yes
24326
1 27
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 25
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 25
2 25
2 25
2 25
2 25
2 25
2 ...

result:

ok AC

Test #23:

score: 0
Accepted
time: 1ms
memory: 3812kb

input:

34
.........#.................#......
...#.#............................
..........#.............#.........
.................................#
.......#..........................
..................................
.......................#..........
.................#................
....................

output:

Yes
4557
1 10
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 26
1 1
2 26
2 26
2 26
2 26
2 26
2 26
2 26
2 26
2 26
2 26
2 26
2 26
2 26
2 26
2 26
2 26
2...

result:

ok AC

Test #24:

score: 0
Accepted
time: 1ms
memory: 4080kb

input:

23
####.####.#.#.#########
..####.##.##.###.######
#.###...#.#.###.###.###
###.#####.####..#######
#.#...##.######..#.#.##
.####.##.###########..#
##.#....##..###.#.#..##
##.#.####...##.###..#.#
##.###..###########.###
###.###..###.#.#.#.##.#
#.####.###..##.#####..#
###.######.##.####..#.#
.###.####...

output:

Yes
8304
1 3
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 12
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok AC

Test #25:

score: 0
Accepted
time: 1ms
memory: 3820kb

input:

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

output:

Yes
4921
1 2
2 20
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
2 20
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 2
1 2
1 2
1 2
1 2
1 2
1 2...

result:

ok AC

Test #26:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

12
##..#.......
.#.##.###.#.
##.#..#.####
##.###..###.
.#.#.##.#.##
##.###.#...#
#..###..####
..####.#####
#.#.##.##.#.
.#.##.####..
.#.....#####
###.#..##.#.
.##.#######.
..###.#.####
#.###...##..
.#...##.#.##
.#.#########
#...##.#.##.
.##.##...##.
..####.#.###
...#.#######
..#.......#.
..#.#..##.#...

output:

Yes
1201
1 10
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 12
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
2 12
1 1
1 1
1 2
1 2
1 2
2 11
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
2 11
2 11
2 11
2 11
2 11
2 11
2 11
2 11
2 11
2 11
2 11
1 2
1 2
1 2
1 ...

result:

ok AC

Test #27:

score: 0
Accepted
time: 20ms
memory: 4240kb

input:

44
###...##.#....##.#####.##.##...####.##....##
#.#...##..#.#.##..#.###.......####..#..#..#.
..#.########..##.#.....##.....#..##...#.#.#.
#.#.##.#.#.#.#....#.#.######.#....#......###
#.#.#.##...##.#..#.#..#######.#.###..###.###
###..#...#...#........##..#...#.##..#..#..##
..##.#..#..#####......#..##...

output:

Yes
85154
1 26
2 10
2 2
2 31
1 29
1 16
2 22
1 19
2 13
2 39
2 7
1 20
1 3
1 24
1 6
2 44
1 40
2 33
2 10
1 23
2 31
1 18
2 8
1 22
1 10
2 31
2 1
2 25
2 34
1 27
2 11
1 6
1 13
1 41
1 1
2 37
2 1
2 11
1 2
2 13
2 31
1 32
2 39
2 5
1 26
2 15
2 31
2 43
2 11
2 24
2 4
1 26
1 13
1 3
1 22
2 10
1 25
1 31
1 1
1 1
1 1
1...

result:

ok AC

Test #28:

score: 0
Accepted
time: 1ms
memory: 3972kb

input:

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

output:

Yes
991
1 2
2 4
2 8
2 3
1 5
1 2
2 2
1 7
2 7
2 5
2 5
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 9
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 9
2 9
2 9
2 9
2 9
2 9
2 9
2 9
2 9
1 1
1 1
1 2
2 8
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
2 8
2 8
2 8
2 8
2 8
2 8
2 8
2 8
2 8
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
...

result:

ok AC

Test #29:

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

input:

44
..#.#.###.#.....#...#.#####.....#....#.#....
####.....#..##...##..#.####.#.#..#..#..#####
#.###.##########.##.#####..#####.#.##....#.#
#..#.##.##..###..#...#.....###.##..##.#.##..
.####.#..##.###.#.###....#..#..######...#.#.
##...#.#.##.##..#.##.####.###.#..#####.#.###
.#..####...##.####.....##.....

output:

Yes
84982
1 26
2 10
2 2
2 31
1 29
1 16
2 22
1 19
2 13
2 39
2 7
1 20
1 3
1 24
1 6
2 44
1 40
2 33
2 10
1 23
2 31
1 18
2 8
1 22
1 10
2 31
2 1
2 25
2 34
1 27
2 11
1 6
1 13
1 41
1 1
2 37
2 1
2 11
1 2
2 13
2 31
1 32
2 39
2 5
1 26
2 15
2 31
2 43
2 11
2 24
2 4
1 26
1 13
1 3
1 22
2 10
1 25
1 31
1 27
1 8
2 23...

result:

ok AC

Test #30:

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

input:

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

output:

Yes
960
1 2
2 4
2 8
2 3
1 5
1 2
2 2
1 7
2 7
2 5
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 9
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 9
2 9
2 9
2 9
2 9
2 9
2 9
2 9
2 9
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
2 7
1 1
2 7
2 7
2 7
2 7
2 7
2 7
2 7
2 7
2 7
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok AC

Test #31:

score: 0
Accepted
time: 2ms
memory: 3956kb

input:

30
..#.#..#....##.#..###...##.#..
..###...#####.#..##.##......##
..###.#.####.....#...##..##.#.
#.#....####.#..##...##..###..#
#.##.#.........#.##.#.##......
#.##......##..#.######..##..##
###..#.##..##...#####.##..##.#
#####.#..#...###.....##..#.#.#
##..#.####.####....####......#
##.#..####.#..##.....

output:

Yes
26706
1 22
2 14
2 8
2 3
1 15
1 12
2 2
1 17
2 27
2 15
2 15
1 20
1 11
1 24
1 28
2 18
1 26
2 15
2 18
1 27
2 13
1 2
2 28
1 6
1 4
2 17
2 29
2 27
2 24
1 7
2 13
1 24
1 11
1 25
1 23
2 21
1 1
1 1
1 1
1 1
2 30
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok AC

Test #32:

score: 0
Accepted
time: 17ms
memory: 5300kb

input:

79
###########.#####.#.###################################################.######.
#####.#########.##.###.##.#.######.############.####.##.###########.##..#######
#########.##..########.###.###.##########..################.#########.####.###.
#####.####..##.#####.#.###.######.######################....

output:

Yes
179726
1 79
1 1
1 1
1 1
1 1
1 1
2 78
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1...

result:

ok AC

Test #33:

score: 0
Accepted
time: 20ms
memory: 5320kb

input:

79
..........##...............#..#.#...#...#.....##...............................
..#...#......#.........#..##...#.#....##.##.........##.#...#...#......#..##....
.##....#.........#........#...............#....#......#.......#....#..#....#...
...#...##...##...#...#.#.....................#.#............

output:

Yes
208561
1 79
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok AC

Test #34:

score: 0
Accepted
time: 18ms
memory: 5448kb

input:

79
.......#..##.#.........#....#....#..#..#.........#.#...........#...............
..#.................#............#...........................#........#.#....#.
#........................#........#........#..................#..##...........#
....#...##.................#......##........................

output:

Yes
153419
1 79
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok AC

Test #35:

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

input:

79
....................#..........................................................
.............#..#..#.........#............#...............................#....
.......................................................#.......................
.........................#....#......................#.#....

output:

Yes
70469
2 16
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1...

result:

ok AC

Test #36:

score: 0
Accepted
time: 35ms
memory: 8204kb

input:

79
...#####...######.#####.###...####.#.##.#.#....#..##..########.##.##.#.####..##
.##..##.####.#####.##.#######.####..#####..#..#.#####.#...####.#######.#..###.#
#..####.#.#####.###.####..##..##.#.#####..#.###..#..#....#.####..###.##.###.#.#
.##.####.####..######.###..##.#########.#.##.##.#####.......

output:

Yes
338279
2 16
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok AC

Test #37:

score: -100
Time Limit Exceeded

input:

79
######.#####.##.....#..##.##.##.##.###.#####..#####.#.#######.##.#.###.#.###.#.
...#.....##.....#...#...#.####....#.#.#.######..#..####.#.#######.###..###.###.
.#.#....##.....##.###.#####...#......#.#..#.#..###.#######.#.##...##..###.#..#.
.##.#.#..##.#...###.##....##......#..#....##.##.#.#.#...#...

output:


result: