ll@N,@M,@A[N],@B[N],a,t;rep(i,N)A[i]=max(0,A[i]-B[i]);a=t=sum(A(M));rep(i,M,N)t+=A[i]-A[i-M],a>?=t;wt(a);