Given natural numbers, find how to separate them into two sets so that the absolute value of the difference between the sums of the elements of the two sets is minimized.
Input consists of several cases, each with followed by natural numbers between 1 and . Assume .
For every case, print the minimum possible difference.
Author: Unknown
Translator: Salvador Roura
Generation: 2026-01-25T11:20:43.263Z
© Jutge.org, 2006–2026.
https://jutge.org