Fashion Trend Buttons
CodeChefOpen on judge ↗
Jaime the Tailor's new customer wants to add n distinct clusters of buttons to her dress, where each cluster is filled with a distinct number of buttons of a certain color. The customer also has specific ideas about how much she wants to pay for each cluster in that for some cluster i, she wants to pay at least ai dollars. In addition, she wants each cluster to contain a distinct number of button
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