1. 题目
输入一个r行c列的网格,,黑格用‘*’表示,每个白格都填有一个字母。如果一个白格的左边相邻位置或者上边相邻位置没有白格(可能是黑格,也可能出了网格边界),则称这个白格是一个起始格。首先把所有的起始格从上到下,从左到右的顺序编号为1,2,3...,
输入:
Each puzzle solution in the input starts with a line containing two integers r and c ( xand x ), where r (the first number) is the number of rows in the puzzle and c (the second number) is the number of columns.
The r rows of input which follow each contain c characters (excluding the end-of-line) which describe the solution. Each of those ccharacters is an alphabetic character which is part of a word or the character ``*", which indicates a black square.
The end of input is indicated by a line consisting of the single number 0.