{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"今天波姆波小姐收到了一个矩形蛋糕,表示为r×c网格。每个网格都可能有一个邪恶的草莓(波姆波小姐最讨厌草莓了)或者没有。例如,3×4蛋糕可能如下所示:\n\n\u003cbr\u003e\u003cimg src \u003d \u0027https://s3.bmp.ovh/imgs/2021/08/20d7d2d942f3a484.png\u0027 /\u003e\u003cbr\u003e\n\n波姆波小姐要吃蛋糕啦!每次她吃东西,都会选择一个不含任何邪恶草莓的行或列,并且至少包含一个以前没有吃过的蛋糕,并吃掉那一行或列的所有蛋糕。她可能会吃多次。\n\n请输出波姆波小姐可以吃的最大蛋糕数。"}},{"title":"Input","value":{"format":"HTML","content":"第一行包含两个整数r和c(2 \u003c\u003d r,c \u003c\u003d 10),表示行数和列数蛋糕。下一行r每行包含c个字符 - 第i行的第j个字符表示第i行和第j行的单元格内容,并且是以下之一:\u003cbr\u003e\u0027.\u0027字符表示没有邪恶草莓的蛋糕;\u003cbr\u003e\u0027S\u0027字符表示带有邪恶草莓的蛋糕。"}},{"title":"Output","value":{"format":"HTML","content":"输出波姆波小姐可以吃的最大蛋糕数。"}},{"title":"Examples","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e3 4\u003cbr\u003eS...\u003cbr\u003e....\u003cbr\u003e..S.\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e8\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003e对于第一个样例,一种可行的方案如下,需要吃三次蛋糕:\u003c/p\u003e\n\u003ccenter\u003e \n \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/037fbf5e91970bb338b9c0a831c2d0a2?v\u003d1629261724\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \n\u003c/center\u003e\n\u003ccenter\u003e \n \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/2f610f05df218726cbea60a03394638c?v\u003d1629261724\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \n\u003c/center\u003e\n\u003ccenter\u003e \n \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/8e479bdc1334206b4cb7a7711e17b446?v\u003d1629261724\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \n\u003c/center\u003e"}}]}