前言
传送门 :
思路看上去是含捆绑关系的 L I S LIS LIS,但是其实只要对一个关键排序,
然后另一个跑一遍 L I S LIS LIS即可
至于这题比较难的是输出路径
我们可以使用 p r e pre pre数组进行转移,每当其转移的时候 我们更改即可
Mycodeconst int N = 5e3+10;
struct node{
int w,h,id;
};
vector a;
bool cmp(node t1,node t2){
return t1.w >H;
for(int i=1;i>w>>h;
if(w > W && h> H){
a.pb({w,h,i});
}
}
if(a.empty()){
cout
关注
打赏