HDU 1003 - Max Sum
Problem : Maximum sum of consecutive subsequence.
Solution : f[i]=max(f[i-1], a[i]).
HDU 1011 - Starship Troopers
Problem : There is a tree with n vertices, and you have m sodiers. Each room has two value req[x] and val[x]. You should start at root, and each time enter a room with num sodiers (num>0), you consume req[x] sodiers, get value val[x], and make rest of the sodiers go to the child vertices of that room. (If req[x]=0 but you don't have any one sodier to that room, you cannot get the val[x]). The request is the maximum sum(val[x]) according to the condition.
Solution : g[x][i][j] means allocate j sodiers to first i children of vertice x, and the maximum value these sodiers can get. f[x][i] means allocate i sodiers to vertice x, and the maximum value these sodiers can get. Then we get following,
	1. g[x][0][j]=0.
	2. i>0, g[x][i][j]=max{ g[x][i-1][k]+f[i-th child of x][j-k] | 0<=k<=j }
	3. f[x][i] = (i>0 && i>=req[x]) ? g[x][num_of_children(x)][i-req[x]]+val[x] : 0
Proof : Reduction.