Packing suitcases
CodeChefOpen on judge ↗
Oh no! Covid has struck again in the form of omicron. As a result, the Dean has sent a circular saying that everyone needs to vacate the hostels by Pongal. My friend Anuj is frantically trying to pack his items, and looking at his hostel cupboard, he has $N$ items, each with a specific weight $w_i$ kg $(1 ≤ i ≤ N)$. Anuj has $2$ suitcases, and the Air India flight he's taking to Delhi only allows
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