← All problemsSign in

Chocolate are Sweet and Rich

You are given n chocolates and each chocolate has two values sweetness and richness. You always wish to have maximum number of chocolates.So you are given a chance to pick maximum number of chocolates here!! You can pick any chocolates with the condition that: If someone picks any two chocolates that you have picked,then the sweetness of first chocolate should be smaller than or equal to the secon

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