Problem Description
Wiskey wants to develop an image retrieval system, but he can’t deal with the number recognition.
The number is neat which no any aliasing, no any redundant point, and made by ‘#’.
You can use the software “ASCII Art Studio”, the data come from there.
The font is Arial, and the font size between “五号” and “一号", the style is bold.
The data is weak, not all of the numbers which various sizes are need to be recognized.
Come on baby; please improve your program as much as possible.
Input
First line will contain one integer mean how many cases will follow by.
In each case will contain two integers N, M mean the N*M matrix will follow. (10 <= N, M <= 26)
Output
Print which number did you recognized.
Sample Input
2
10 7
###
#####
#####
###
14 9
#####
#######
### ###
#####
#####
### ###
#######
#####
Sample Output
0
8
http://www.acmerblog.com/hdu-2221-weak-number-recognition-3451.html