SNACKS LOVER
CodeChefOpen on judge ↗
Rajkumari Indumati loves to eat snacks. Today, she went to the market where there are N different types of snacks. She wants to buy exactly K snack of them at the minimum cost. Help her to find the minimum cost to buy exactly K snacks if she has already decided to buy snack J. Note - Indumati doesn't buy the same snack twice, and she will definitely buy snack J, where J is the index. ### Input T
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