Description: cut the rectangle (rec.pas/c/cpp)
Title Description
Given a X* Y of the large rectangle, the rectangle you can take advantage of any number of cutting a small rectangle. Different small rectangle has a different value. Now you cut the rectangle, so that the sum of the maximum value of a small rectangle.
Input format
The first line contains N, X, Y 3 integers that total N is given a small rectangle and large rectangle the size of the X* Y
N 1 second line to line, each line contains xi, yi, vi three integers that xi* yi rectangle value vi
Output format
Output only line, that the greatest value.
Input Sample 1:
133
225
Output Sample 1:
5
Input Sample 2:
233
2210
112
Sample output: 2
20
Data range:
0 <= X, Y <= 1000
N <= 20
To Search:
File list (Check if you may need any files):
cft.pas