{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eRobert is a famous engineer. One day he was given a task by his boss. The background \n of the task was the following:\u003cbr\u003e\n \u003cbr\u003e\n Given a map consisting of square blocks. There were three kinds of blocks: Wall, \n Grass, and Empty. His boss wanted to place as many robots as possible in the \n map. Each robot held a laser weapon which could shoot to four directions (north, \n east, south, west) simultaneously. A robot had to stay at the block where it \n was initially placed all the time and to keep firing all the time. The laser \n beams certainly could pass the grid of Grass, but could not pass the grid of \n Wall. A robot could only be placed in an Empty block. Surely the boss would \n not want to see one robot hurting another. In other words, two robots must not \n be placed in one line (horizontally or vertically) unless there is a Wall between \n them.\u003cbr\u003e\n \u003cbr\u003e\n Now that you are such a smart programmer and one of Robert\u0027s best friends, He \n is asking you to help him solving this problem. That is, given the description \n of a map, compute the maximum number of robots that can be placed in the map.\u003c/p\u003e\n\u003cp\u003e\u003cb\u003e\u003cbr\u003e\n Input\u003c/b\u003e\u003cbr\u003e\n \u003cbr\u003e\n The first line contains an integer T (\u0026lt;\u003d 11) which is the number of test \n cases. \u003cbr\u003e\n \u003cbr\u003e\n For each test case, the first line contains two integers m and n (1\u0026lt;\u003d m, \n n \u0026lt;\u003d50) which are the row and column sizes of the map. Then m lines follow, \n each contains n characters of \u0027#\u0027, \u0027*\u0027, or \u0027o\u0027 which represent Wall, Grass, \n and Empty, respectively. \u003c/p\u003e\n\u003cp\u003e\u003cbr\u003e\n \u003cb\u003eOutput\u003c/b\u003e\u003cbr\u003e\n \u003cbr\u003e\n For each test case, first output the case number in one line, in the format: \n \"Case :id\" where id is the test case number, counting from 1. In the \n second line just output the maximum number of robots that can be placed in that \n map.\u003c/p\u003e\n\u003cp\u003e\u003cbr\u003e\n \u003cb\u003eSample Input\u003c/b\u003e\u003c/p\u003e\n\u003cp\u003e2\u003cbr\u003e\n 4 4\u003cbr\u003e\n o***\u003cbr\u003e\n *###\u003cbr\u003e\n oo#o\u003cbr\u003e\n ***o\u003cbr\u003e\n 4 4\u003cbr\u003e\n #ooo\u003cbr\u003e\n o#oo\u003cbr\u003e\n oo#o\u003cbr\u003e\n ***#\u003c/p\u003e\n\u003cp\u003e\u003cbr\u003e\n \u003cb\u003eSample Output\u003c/b\u003e\u003c/p\u003e\n\u003cp\u003eCase :1\u003cbr\u003e\n 3\u003cbr\u003e\n Case :2\u003cbr\u003e\n 5\u003c/p\u003e\n\u003cp\u003e\u003cbr\u003e\n\u003c/p\u003e\n"}}]}