UVa 10664 - Luggage

10664 - Luggage

 * http://acm.uva.es/p/v106/10664.html

Summary
This is a sorting problem.

Explanation
This is a problem you would solve just the same way in real life :-). Just put the heaviest remaining suitcase in the less loaded boot. If they are loaded at the same weight then the difference between the boots is 0 at the end.

Input
3 1 2 1 2 1 2 3 4 1 2 5 10 50 3 50 3 5 2 7 1 7 5 2 8 9 1 25 15 8 3 1 38 45 8 1

Output
NO YES YES