Sponsored
Use these hints if you're stuck. Try solving on your own first.
Which bag should you fill completely first?
Can you think of a greedy solution?
Solve with full IDE support and test cases