F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Weak Number Recognition

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 185    Accepted Submission(s): 9


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
 

Author
Wiskey
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-12 14:51:35, Gzip enabled