cf/mirror

Battleship

CF
965B1300· pupil1.5s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
4 3
#..#
#.#.
....
.###
Output
3 2
Sample 2of 3
Input
10 4
#....##...
.#...#....
..#..#..#.
...#.#....
.#..##.#..
.....#...#
...#.##...
.#...#.#..
.....#..#.
...#.#...#
Output
6 1
Sample 3of 3
Input
19 6
##..............###
#......#####.....##
.....#########.....
....###########....
...#############...
..###############..
.#################.
.#################.
.#################.
.#################.
#####....##....####
####............###
####............###
#####...####...####
.#####..####..#####
...###........###..
....###########....
.........##........
#.................#
Output
1 8
965B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)