#include #include #include #include #include using namespace std; int fun(int *c,int s,int e,int k) { int m=(s+e)/2; if(m-k<=0&&m+k>=e) return c[m]; else if(m-k<=0&&m+k0&&m+k>=e) return (c[m]+fun(c,s,m-k,k)); else return (c[m]+fun(c,s,m-k,k)+fun(c,m+k,e,k)); } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n,k,ans; cin>>n>>k; int c[n]; for(int i=0;i>c[i]; cout<