首先按限制高度排序,然后按多重背包做dp 这里的背包只用知道每种状态是否可行,所以 这里的多重背包可以变成O(nm) ; ..,..,..] of longint; a,b:..] of longint; i,j,k1,k2,n,k,m,w,ans,t:longint; function findmin(t:longint):longint; var p,k:longint; begin p:=max; do p:=min(p,f[k1,j-t…
Space Elevator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8569 Accepted: 4052 Description The cows are going to space! They plan to achieve orbit by building a sort of space elevator: a giant tower of blocks. They have K (1 <= K…