#include using namespace std; typedef int LL; typedef vector V; typedef vector VV; typedef vector VVV; #define USED 1 #define UNUSED 0 const LL INF=((LL)1e8); int dp[3000][3001][2]; inline void init(){ for(int i=0;i<3000;i++) for(int j=0;j<=3000;j++) for(int k=0;k<2;k++)dp[i][j][k]=-INF; } int main() { int n,m;cin>>n>>m; V w(n);for(auto& it : w)cin>>it; LL res=-INF; init();dp[0][0][UNUSED]=0; for(int i = 1; i < n; i++){ for(int j=0;j<=m;j++){ if(j