atcoder#ABC274B. [ABC274B] Line Sensor
[ABC274B] Line Sensor
Score : points
Problem Statement
There is a grid with rows from top to bottom and columns from left to right. Let denote the square at the -th row from the top and -th column from the left.
The squares are described by characters . If is .
, is empty; if it is #
, contains a box.
For integers satisfying , let the integer defined as follows.
- is the number of boxes in the -th column. In other words, is the number of integers such that is
#
.
Find all of .
Constraints
- and are integers.
- is
.
or#
.
Input
The input is given from Standard Input in the following format:
Output
Print in the following format:
3 4
#..#
.#.#
.#.#
1 2 0 3
In the -st column, one square, , contains a box. Thus, . In the -nd column, two squares, and , contain a box. Thus, . In the -rd column, no squares contain a box. Thus, . In the -th column, three squares, , , and , contain a box. Thus, . Therefore, the answer is .
3 7
.......
.......
.......
0 0 0 0 0 0 0
There may be no square that contains a box.
8 3
.#.
###
.#.
.#.
.##
..#
##.
.##
2 7 4
5 47
.#..#..#####..#...#..#####..#...#...###...#####
.#.#...#.......#.#...#......##..#..#...#..#....
.##....#####....#....#####..#.#.#..#......#####
.#.#...#........#....#......#..##..#...#..#....
.#..#..#####....#....#####..#...#...###...#####
0 5 1 2 2 0 0 5 3 3 3 3 0 0 1 1 3 1 1 0 0 5 3 3 3 3 0 0 5 1 1 1 5 0 0 3 2 2 2 2 0 0 5 3 3 3 3