| Time Limit: 1000MS | Memory Limit: 30000K | |
| Total Submissions: 2159 | Accepted: 514 |
Description
Recently farmer Bill has found such circles on his nice rectangular wheat field. Bill likes all mysterious things very much, so he has decided to keep these circles on the field. However, although being an ufolog, first of all Bill is the farmer, so he needs to harvest his wheat. Therefore he has decided to keep some regions containing circles intact, and harvest the rest of the field.
All regions that Bill keeps unharvested must be rectangles that neither touch nor overlap each other. The sides of the rectangles must be parallel to the sides of the field. All circles left by UFOs must be inside these regions. The total area of the regions must be minimal possible, so that Bill could harvest the maximal possible part of his field.
Now Bill wants to know the total area of the field that he will be able to harvest. Help him!
Input
Output
Sample Input
10 8 2 3 3 1 1 1 1
Sample Output
64
Source
1868



被折叠的 条评论
为什么被折叠?



