Game of Candies
CodeChefOpen on judge ↗
Chef and Ankit decide to play a game of numbered candies. Player1 has to give a number **R** such that **R < N** ($N$ is number of candies). After $cyclic$ $clockwise$ $rotation$ of $C$[candy sequence] by one $R$ times, Player2 gets to pick one candy from the start. Chef's favourite candy is numbered **8** .What number should Ankit give so that Chef gets to pick candy number **8** after minimum
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start