Balanced Load Split
Split loads (in watts) between two circuits so the difference between the circuits' totals is as small as possible. Print that minimum difference.
Input
, then positive integers.
Output
The minimum difference.
Constraints
,
Sample 1
Input
4 1 6 11 5
Output
1
Sample 2
Input
5 3 1 4 2 2
Output
0