{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n 给出N个矩形和他们的高和宽\n现在把他们宽放在x轴上对齐,请问现在最大矩形面积\n \u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n The input consists of several test cases. For each case, n is given in a single line, and then followed by n lines, each containing wi and hi separated by a single space. The last line of the input is an single integer -1, indicating the end of input. You may assume that 1 \u0026lt;\u003d n \u0026lt;\u003d 50000 and w\n \u003csub\u003e1\u003c/sub\u003eh\n \u003csub\u003e1\u003c/sub\u003e+w\n \u003csub\u003e2\u003c/sub\u003eh\n \u003csub\u003e2\u003c/sub\u003e+...+w\n \u003csub\u003en\u003c/sub\u003eh\n \u003csub\u003en\u003c/sub\u003e \u0026lt; 10\n \u003csup\u003e9\u003c/sup\u003e.\n \u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n Simply output Max(S) in a single line for each case.\n \u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e3\n1 2\n3 4\n1 2\n3\n3 4\n1 2\n3 4\n-1\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e12\n14\u003c/pre\u003e"}},{"title":"说明","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e\n第一个样例:\n0022200\n0022200\n1122233\n1122233\n答案是一个3*4的矩形\n第二个样例:\n1110333\n1110333\n1112333\n1112333\n答案是一个2*7的矩形\n\u003c/pre\u003e"}}]}