#include using namespace std; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a void drop(const T &x){cout<>n>>k; vector as(n+2),bs(n+2); for(Int i=0;i>as[i]; for(Int i=0;i>bs[i]; if(n==1) drop(0); const Int INF = 1e18; vector dp(n+2,INF); dp[0]=0; for(Int i=0;i