You are viewing a single comment's thread. Return to all comments →
int n=0; for(int i=0;i<s.size();i++) { int sum=0; for (int j=i;(j<=i+m-1)&(i+m-1<s.size());j++) { sum=sum+s[j]; } if(sum==d) n++; } return n;
Seems like cookies are disabled on this browser, please enable them to open this website
Subarray Division
You are viewing a single comment's thread. Return to all comments →