{"trustable":false,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\n给定一个区域,在该区域建造城市,我们把一个区域划分成若干个N*M的一个网格图。每个网格代表一块土地,一些已经被占据了,另一些是空着的。\n \u003cbr\u003e \n空地的标记为 F\n \u003cbr\u003e \n已经被占据的土地被标记为 R\n \u003cbr\u003e \n现在要求你在空旷的土地 建造一个最大的建筑物,要求建筑物必须是一个大的矩形,并且占据一个小网格需要 3$的花费\n问你建造一个这样的建筑物的花费是多少\n \u003cbr\u003e \n \u003cbr\u003e \n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cbr\u003e\n第一行输入一个整数K ,代表K组数据\n\u003cbr\u003e\n接下来 表示一个区域的描述\n\u003cbr\u003e\n输入两个整数 M,N M\u0026lt;\u003d1000 and N\u0026lt;\u003d1000 中间用空格隔开\n\u003cbr\u003e\n然后接下来 的 M 行表示 该区域内每一块小方格的状态\n\u003cbr\u003e\n\u003cbr\u003eF 代表空地 \n\u003cbr\u003eR 代表被占据的土地\n\u003cbr\u003e每一个区域描述完的最后有一个空行\n\u003cbr\u003e\n\u003cbr\u003e\nThe first line of the input contains an integer K – determining the number of datasets. Next lines contain the area descriptions. One description is defined in the following way: The first line contains two integers-area length M\u0026lt;\u003d1000 and width N\u0026lt;\u003d1000, separated by a blank space. The next M lines contain N symbols that mark the reserved or free grid units,separated by a blank space. The symbols used are: \n\u003cbr\u003e \n\u003cbr\u003eR – reserved unit \n\u003cbr\u003e \n\u003cbr\u003eF – free unit \n\u003cbr\u003e \n\u003cbr\u003eIn the end of each area description there is a separating line. \n\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"对于每一个数据,单独输出一行,表示建造一个最大的矩形建筑物所需的花费\n \u003cbr\u003e \n\nFor each data set in the input print on a separate line, on the standard output, the integer that represents the profit obtained by erecting the largest building in the area encoded by the data set."}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e2\n5 6\nR F F F F F\nF F F F F F\nR R R F F F\nF F F F F F\nF F F F F F\n\n5 5\nR R R R R\nR R R R R\nR R R R R\nR R R R R\nR R R R R\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e45\n0\u003c/pre\u003e"}}]}