一、算法分析
代码里面讲的已经比较详细了,这道题涉及LIS类的问题,而且涉及到dilworth定理。
二、代码及注释
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int n;
struct stk{
int l;
int w;
stk(int lp,int wp):l(lp),w(wp){
}
};
bool cmp(stk x,stk y){