#include using namespace std; using lint=long long; #define rep(i,n) for(int i=0;i>n>>k; vectora(n); rep(i,n)cin>>a[i]; vectordp(n+1); vectorb(n+1); rep(i,n)b[i+1]=b[i]+a[i]; multisets; s.emplace(0); for(int i=0;i=k-1){ s.erase(s.find(dp[i-k+1]-b[i-k+2])); } } cout<