Because Tianyi thought that bury the evidence one by one is too slow, she came up another idea.
The area is N * N, but because Tianyi has already buried some area, it's not a square now.
Think of that the left hole is N units width. For each unit of the N width, it stretch to two sides vertically.
For example, the hole stretches from -1 to 2 at the first unit and the hole stretches from -2 to 3 at the second unit, and it's like the picture below:
But Tianyi is too lazy to bury all of it, so she find a rectangle to cover it. To cover evidence as more as Tianyi can, she must make the rectangle largest.
Can you help Tianyi to find a largest rectangle in the hole area? (The rectangle must be put vertically or horizontally and you can't rotate it).
2 -1 2 -2 3
6
无
XadillaX