#ifndef ONLINE_JUDGE #define _GLIBCXX_DEBUG #endif #include #include using namespace std; using ll=long long; using ld=long double; using st=string; using P=pair; typedef atcoder::modint mint; ll inf=9e18; template auto vec(const ll (&sizes)[s], const T& init = T()){ if constexpr(i < s) return vector(sizes[i], vec(sizes, init)); else return init; } int main(){ ll n,k; cin>>n>>k; if((n+1)/2({n},0); for(ll i=0;i>v[i]; } auto dp=vec({2,n+1,k+1},-inf); dp[0][0][0]=0; for(ll j=1;j<=n;j++){ for(ll l=0;l<=k;l++){ dp[0][j][l]=max({dp[0][j][l],dp[1][j-1][l],dp[0][j-1][l]}); if(l