#include using namespace std; using Int = long long; template vector make_v(size_t a){return vector(a);} template vector > make_v(size_t a,size_t b){ return vector >(a,make_v(b)); } template vector > > make_v(size_t a,size_t b,size_t c){ return vector > > (a,make_v(b,c)); } template typename enable_if::value==0>::type fill_v(T &t,const V &v){t=v;} template typename enable_if::value!=0>::type fill_v(T &t,const V &v){ for(auto &e:t) fill_v(e,v); } template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n>>m>>k; n++; vector a(n); for(Int i=0;i>a[i]; auto dp=make_v(n,m+1); fill_v(dp,-1); dp[0][0]=k; for(Int i=0;i=0;j--){ if(dp[i][j]<0) continue; for(Int k=i+1;k