E - Diwali Mela
CodeChefOpen on judge ↗
The Diwali Festival is round the corner, you want to attend the Diwali Mela which will last for $D$ days i.e. from $1$ to $D$. There will be $N$ cracker shops at the Festival Mela. The $i-th$ shop will be available from day $S_i$ until day $E_i$, inclusive, with crackers worth Rupees $P_i$. You can choose one of the days to attend the Diwali Mela. On that day, you will choose $K$ shops to buy cra
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