You are viewing a single comment's thread. Return to all comments →
int count = 0; if(B.size() <= 1) return "NO"; else { for(int i = 0; i< B.size(); i++){ if(B[i]%2 == 0) continue; if (i + 1 < B.size()) { B[i]++; B[i + 1]++; count += 2; } } } return B[B.size()-1]%2 == 0? to_string(count) : "NO";
Seems like cookies are disabled on this browser, please enable them to open this website
Fair Rations
You are viewing a single comment's thread. Return to all comments →