Bursting Out All The Crackers
CodeChefOpen on judge ↗
On the occasion of diwali, chef bought some array of $N$ crackers($a_1, a_2, a_3, ….a_n$) consisting of non-negative integers. But they can be fired only by a special fuljhari ($sparkler$: a kind of firework) with a magic number $K$ on it. We define operation of “burst” with integer parameter $K (1 \leq K \leq N)$ as follows: * Choose $K$ distinct array indices $1 \leq i1 \lt i2 \lt …. \lt ik \l
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