{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"Once upon a time there lived an old wise king. He had only one son. The prince had the idea that he (the prince) was about to be the future king; that\u0027s why he became too lazy day by day. This made the wise king a bit worried because his lazy son couldn\u0027t be the correct man for the throne. He couldn\u0027t sleep; his kingdom was in need of a perfect king, not the lazy king.\n\nOne day, while doing his regular works, he found an excellent idea. Next day he called his son. He said that he wanted the prince to have his own kingdom. The prince became very excited. The king continued that the prince can have a land from the king\u0027s kingdom, but he should start walking after sunrise and cover a rectangular area before sunset. Then the land would be given to the prince. The lazy prince thought, \"It would be an easy task!\" That\u0027s why he wanted to find the maximum rectangular area in king\u0027s land. But there were some rocks in the kingdom, and the prince didn\u0027t want any rocks in his new land. He would rather take nothing, but no rocks.\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","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 7\n0110110\n0000010\n1000001\n0100001\n1100010\n3 3\n001\n100\n101\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 12\nCase 2: 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"MD","content":"Dataset is huge, use faster I/O methods."}}]}