{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"You are given a 2D board where in some cells there are gold. You want to fill the board with **2 x 1** dominoes such that all gold are covered. You may use the dominoes vertically or horizontally and the dominoes may overlap. All you have to do is to cover the gold with least number of dominoes.\n\n![Gold Grid](CDN_BASE_URL/89e4824aff599d73f3dc66bb4e6823c7?v\u003d1715581417)\n\t\nIn the picture, the golden cells denote that the cells contain gold, and the blue ones denote the **2 x 1** dominoes. The dominoes may overlap, as we already said, as shown in the picture. In reality the dominoes will cover the full **2 x 1** cells; we showed small dominoes just to show how to cover the gold with 11 dominoes."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 50)**, denoting the number of test cases.\n\nEach case starts with a row containing two integers **m (1 \u0026le; m \u0026le; 20)** and **n (1 \u0026le; n \u0026le; 20)** and **m \\* n \u0026gt; 1**. Here **m** represents the number of rows, and **n** represents the number of columns. Then there will be **m** lines, each containing **n** characters from the set `[*, o]`. A `*` character symbolizes the cells which contains a gold, whereas an `o` character represents empty cells."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and the minimum number of dominoes necessary to cover all gold (`*` entries) in the given board."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n5 8\noo**oooo\n*oo*ooo*\n******oo\n*o*oo*oo\n******oo\n3 4\n**oo\n**oo\n*oo*\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 11\nCase 2: 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}