You are viewing a single comment's thread. Return to all comments →
c++20
int birthday(vector<int> s, int d, int m) { int nCombos = 0; for(int i = 0; i < s.size() ; i++){ if(std::accumulate(s.begin() + i, s.begin() + i + m, 0) == d){ nCombos +=1; } } return nCombos; }
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 →
c++20