#include #include #include using namespace std; typedef long long LL; const int N = 3e3+10,mod = 1e9+7; LL f[N][N]; struct Node{ LL a,b; bool operator<(const Node &A)const{ return a+b=f[i-1][j-1]){ f[i][j]=min(f[i][j],f[i-1][j-1]+a[i].a); ans=max(ans,j); } } } cout<