The input will contain the dimensions of the tract of land, a map of the land, and the location of one or more water lots. The first line will contain R and C, the number of rows and columns in the map, separated by a space. The minimum map size is 1x1, and the maximum map size is 100x100. The next R lines will each contain a string of C characters beginning in column 1. Each character will be either `*', indicating dry land, or 'W', indicating water. The remaining lines will each contain the row and column of a water lot; for each of these lines, output the area of the largest possible lake containing that lot as shown in the example.
Input must be read from the file "prob28.in", and output must be
written to the file "prob28.out". All output to the screen will be
ignored.
<BOF> 10 12 ****W***W*** **W*WW****W* **WWW***WW** ***W**W***W* ***WW*W***W* ****W*****W* ***WWW**W*** *****W*****W *WW**W****W* *WW***WWWW** 3 4 7 9 10 2 <EOF>
22 1 4
Dr. Eric Shade