OpenJudge

10002:AK吧!少年

总时间限制:
1000ms
内存限制:
65535kB
描述

  AK is an ACM competition finished all of the problems. AC This problem is one of the steps,so fight to AK。There are a number of graphics"_" and "#",In the graph,"#"make up "A" or "K" these two letters。Makea program to identify these letters, we want to kown the number of these twoletters.

输入
Input contains multiple test cases.
Each test case contains two integer N (10<=N<=100) and M (10<=M<=100) is the graphics of the number of rows and columns。
Next graphics, letter fonts and titles to describe these two letters the same standard fonts, letter size is not necessarily the same, and does not skew, each letter occupies a separate rectangular area itself is connected, do not cross, and other letters or connected.
输出
Each test case output the number of "A" and "K".
样例输入
10 47
_______________________________________________
_____________####________#####______###________
____________#######_______####_____###_________
___________###__###________###___#####_________
________#####____###_______###_###_____________
_________###______###______######______________
________##############_____###_###_____________
_______###__________###____###___###___________
______#####________####___###_____###__________
_____###______________###__###_______###_______
样例输出
1 1
全局题号
5154
添加于
2012-10-16
提交次数
1
尝试人数
1
通过人数
0