#P1330. Braille Recognition
Braille Recognition
Braille Recognition
题目描述
Given a piece of paper, you need to identify the Braille numbers (盲文数字) on it.
Braille is generally represented by a matrix of three rows and two columns of raised or unraised dots. We use to represent a raised dot and to represent an unraised dot. Braille numbers typically come in two forms, one of which is as follows:

Here's the textual representation:
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |
|---|---|---|---|---|---|---|---|---|---|
| *. | |||||||||
| .. | |||||||||
| *. | |||||||||
| *. | |||||||||
| .. | ** | ||||||||
| ** | |||||||||
| .* | |||||||||
| .. | *. | ||||||||
| .* | |||||||||
| .. | ** | ||||||||
| *. | |||||||||
| .. | ** | ||||||||
| ** | |||||||||
| .. | *. | ||||||||
| ** | |||||||||
| .. | .* | ||||||||
| *. | |||||||||
| .. | .* | ||||||||
| ** | |||||||||
| .. | |||||||||
| The paper is given in a grid of cells. Please count the number of occurrences for each Braille number on the paper. | |||||||||
输入格式
The first line of input consists of two positive integers, and .
The next lines each contain characters, which are either or , representing the symbols on the paper.
There may be cases where the numbers overlap, causing duplicated counting, as follows:
****
....
....
For such a case, you should count it as occurrences for the number "".
输出格式
Output in a single line containing numbers, representing the counts of Braille numbers respectively. The numbers must be separated by space, and there must be no extra space at the beginning or the end of the line.
样例 #1
样例输入 #1
7 10
..........
.*..**....
..........
..........
.***......
..*.......
..........
样例输出 #1
3 0 1 1 0 1 0 0 0 0