← All problemsSign in

Akash and Dinner

CodeChefRating 1438Open on judge ↗

Akash got his money from CodeChef today, so he decided to have dinner outside. He went to a restaurant having $N$ items on the menu. The $i^{th}$ item on the menu belongs to the *category* $A_i$ and requires $B_i$ time to be cooked. Akash wants to have a *complete meal*. Thus, his meal should have **at least** $K$ **distinct** *categories* of food. The total time required to get all the food

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start