Online Programming Server

Login

Login with facebook [?]

Facebook

Problem 1103: Find the square

Problem ID 1103
Title Find the square
pdf  
Description
You are given a bitmap consist of '*' and '.'. There is a square formed by '*' hiding in the map, can you find it out?
Input
The first line contains two integers H and W, the height and width of the bitmap. (1 ≤ H, W ≤ 100)
The next H lines each contains W characters describing the map.
It is guarantee that there is exactly one square hiding in it and other characters are '.'.
Output
Output 3 integers on a line, the coordinates of the upper-left point of the square and the length of the square. The coordinate is represented as (row, col).
Sample Input
6 7
.......
.......
...***.
...*.*.
...***.
.......
Sample Output
3 4 3
Hint
 
Last Modified 2012-05-31 17:37:36
Time Limit 1 seconds
Memory Limit 32 MB
Accepted Solutions 1
Submitted Solutions 1
Difficulty Factor 109