← All problemsSign in

D - Bin Packing

Let's solve an NP Hard problem today. There are $N$ objects, the $i$-th of which has size $A_i$ ($1 \le A_i \le 12$). You have several bins of size $12$. Multiple objects can be fit into the same bin if and only if the sum of their sizes is at most $12$. Find the minimum number of bins needed to fit all $N$ objects. There is a **special constraint** on the input. 1. For all non-sample files, th

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