{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\nMathJax.Hub.Config({\n tex2jax: {inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]], displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]}\n});\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async\n src\u003d\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\"\u003e\n\u003c/script\u003e\n\nThe kingdom can be thought as an **m x n** grid, where **m** is the number of rows and **n** is the number of columns. Each cell in the grid is a small rectangular land whose area is one. If a land contains rock it will be denoted by a **1**, otherwise it will be denoted by a **0**. The prince can walk in the sides of the cells and he can either take a cell (land) or ignore it, but he can\u0027t take a part of a cell. Now your task is to find the maximum rectangular area the prince could cover."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 2)**, denoting the number of test cases.\n\nEach case starts with a line containing two integers: **m** and **n (1 \u0026le; m, n \u0026le; 2000)**. Each of the next **m** lines contains **n** characters (either **0** or **1**) denoting the kingdom."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and the maximum rectangular area the prince could take."}},{"title":"Sample Input","value":{"format":"MD","content":"\u003cpre\u003e2\n5 7\n0110110\n0000010\n1000001\n0100001\n1100010\n3 3\n001\n100\n101\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"MD","content":"\u003cpre\u003eCase 1: 12\nCase 2: 3\n\u003c/pre\u003e"}},{"title":"Note","value":{"format":"MD","content":"Dataset is huge, use faster I/O methods."}}]}