Caramba!
CodeChefOpen on judge ↗
BKK was playing the ever popular game, Coconut Caramba. In this game, there are N cups numbered 0 to N-1 are kept upside down and one marble. Initially, the Player keeps the marble under the Xth cup. Now, S swaps are done between the cups by the Game organizer without the Player’s knowledge. In a swap, two cups are selected and swapped. The selection of two cups i and j have a probability of P[i,j
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