1530 车牌识别


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

给定一个车牌图片,输出识别结果。细节参见sample。

Input

多组数据。每组数据第一行为两个数字n,m(1<n,m<100)。接下来n行每行m个字符。 '.'表示背景色,'*'有效字符。

Output

以最小尺寸输出识别结果。 行尾以空格填充。 (注意sample output是个矩形.没有有效字符则什么都不输出)

Sample

Input

14 49
.................................................
.................................................
..*********........**................***.........
..*....*...........**..............*.....*.......
..*...*...........*..*............*.......*......
..*..*...........*.....*..........*.......*......
..**............*.......*.........*.......*......
..*.*...........*.......*.........*.......*......
..*..*..........*.*****.*.........*.......*......
..*...*.........*.......*.........*.......*......
..*.....*.......*.......*..........*.....*.......
..*********....***********...........***.........
.................................................
.................................................

Output

*********        **                ***   
*    *           **              *     * 
*   *           *  *            *       *
*  *           *     *          *       *
**            *       *         *       *
* *           *       *         *       *
*  *          * ***** *         *       *
*   *         *       *         *       *
*     *       *       *          *     * 
*********    ***********           ***

Hint

字符矩阵如果网页上显示不清楚,请复制到文本文档里。


Source: daimin


Comments

There are no comments at the moment.