You are viewing a single comment's thread. Return to all comments →
int jumpingOnClouds(vector c, int k) { int e = 100; int position = 0; int n = c.size();
while (true) { position = (position + k) % n; e -= 1; if (c[position] == 1) e -= 2; // thundercloud cout << e << " " << position << " " << c[position] << endl; if (position == 0) break; } return e;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Jumping on the Clouds: Revisited
You are viewing a single comment's thread. Return to all comments →
int jumpingOnClouds(vector c, int k) { int e = 100; int position = 0; int n = c.size();
}