您当前的位置: 首页 > 

[luogu]CF4D Mysterious Present

*DDL_GzmBlog 发布时间:2022-03-13 16:41:50 ,浏览量:4

前言

传送门 :

思路

看上去是含捆绑关系的 L I S LIS LIS,但是其实只要对一个关键排序,

然后另一个跑一遍 L I S LIS LIS即可

至于这题比较难的是输出路径

我们可以使用 p r e pre pre数组进行转移,每当其转移的时候 我们更改即可

Mycode
const 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            
关注
打赏
1688896170
查看更多评论
0.4586s