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