#include using namespace std; using ll = long long; using vll = vector; #define all(A) A.begin(),A.end() #define rep(i, n) for (ll i = 0; i < (ll) (n); i++) int main() { ll N,K,Q; cin>>N>>K; vll A(N+1,0),P(N-K+1); rep(i,N)cin>>A[i+1],A[i+1]+=A[i]; rep(i,N-K+1)P[i]=A[i+K]-A[i]; sort(all(P)); cin>>Q; while(cin>>Q)cout<