Predict Shambhavi (200)
CodeChefOpen on judge ↗
It is the time of Cognition and Shambhavi has participated in N events numbered from 1 to N. Each of these events have a particular waiting time ( in minutes ), W(i) ( 1 0, She will leave instantly and move to the next ( (i+1)th ) event location. In case if i=N, she will move back to the 1st event location. In case if Shambhavi is at the ith event location and W(i) = 0 , she will take her turn i
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