标签:mes one code tps turn namespace pac clu amp
#include <iostream>
#include <cstdio>
using namespace std;
int a[100005], n, l, ans=0x3f3f3f3f;
int main(){
cin>>n>>l;
for(int i=1; i<n; i++){
scanf("%d", &a[i]);
a[i] += a[i-1];
}
for(int i=l; i<n; i++)
ans = min(ans, a[i]-a[i-l]);
cout<<ans<<endl;
return 0;
}
标签:mes one code tps turn namespace pac clu amp
原文地址:https://www.cnblogs.com/poorpool/p/8977182.html