Kohli and his Magic Ball
CodeChefOpen on judge ↗
Virat Kohli knows RCB's batting very well, he knows that team will not chase the target if the target is $K$ or more than $K$. Kohli has got a magic ball by which he can restrict the opposition team's total runs. But this magic ball has rules of its own. Kohli has to choose some elements from array to make it possible, more the number of elements chosen, more the probability of magic ball workin
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