SP10145 BCAKE - Birthday Cake
Description
Today is the birthday of Seraph. Seraph love to eat chocolate cake, unfortunately Seraph should not be too much to eat chocochip, the maximum he can only take K chocochip in the cake.
Input Format
first line is test case, then each test case will contain H (1
on the next line you'll give the configuration of the cake where 'C' means chocochip area and '.' is normal cake area. You can assume that width and height of cake between 1 and 30 inclusive.
Output Format
Print one line A that means the minimum area that seraph can eat. If Seraph can't eat that cake then print '-1'