1. 程式人生 > >"尚學堂杯"哈爾濱理工大學第七屆程式設計競賽 B.Blind Father(貪心)

"尚學堂杯"哈爾濱理工大學第七屆程式設計競賽 B.Blind Father(貪心)

Mr. Leng, who is the predominately inheritor of buried-love family  (One of the most vogue families during your primary school maybe, anyway, this is unimportant), has such cool, cooler and coolest temperament. But, only a good ACMer can be the real leader, in other words, be admitted as a successor.

One day, a problem come to Mr. Leng 's father about carpentry. There are N pieces of planks upright the ground in one line. Each one width 1 and height uncertain.  His father wants to cut some of them and then get a rectangle. How the biggest rectangle does him can make? It too difficult to his father to solve the problem, but it is really easy for Mr. Leng. So do you. Please surmount the problem as soon as you can.

Ps: You can't move or change the posture or position of any planks.