文理学院程序设计在线练习


cream?chocolate?

Time Limit: 2 Second(s)    Memory Limit: 128 MB

Total Submission(s): 6   Accepted Submission(s): 1
Problem Description

As we all known, Tianyi_CHN is a big foodie. Now there is a rectangle cake, the size of cake is n*m(made by 0 and 1, 0 represents cream, 1 represents chocolate). Tianyi_CHN can choose a rectangle only contains 1 or 0 and eat it. now Tianyi_CHN wants to know the biggest cake she can eat.

Input
The first line contains one integer T(T<=15),represents the number of testcases;
For each test case:
The first line contains two integer n,m(1<=n,m<=1000)
then have n row m column represents the cake(only contains 0 and 1).

Output

Each line output one number represents the biggest cake that Tianyi_CHN can eat.

Sample Input
1
5 6
011111
111111
000111
111111
111111
Sample Output
15
Source

2017绍兴市技能竞赛