You are viewing a single comment's thread. Return to all comments →
int cnt = 0, n = c.size(), i = 0; while(i < n - 1){ if(c[i] == 0 && c[i+2] == 0) i += 2; else i++; cnt++; } return cnt;
Seems like cookies are disabled on this browser, please enable them to open this website
Jumping on the Clouds
You are viewing a single comment's thread. Return to all comments →
int cnt = 0, n = c.size(), i = 0; while(i < n - 1){ if(c[i] == 0 && c[i+2] == 0) i += 2; else i++; cnt++; } return cnt;