#P1286. 两数之和
两数之和
Description
We know that taking any two from non-negative integers and adding them yields sums. Now, given these sums, determine the non-negative integers.
Input Format
The input contains multiple lines. Each line is one dataset, consisting of non-negative integers separated by spaces. The first number denotes (). The remaining numbers are the pairwise sums. Each number does not exceed . The file ends with EOF.
Output Format
Output multiple lines. For each input line, output one line that contains a set of non-negative integers in ascending order, separated by single spaces. If there is no solution, output Impossible.
3 1269 1160 1663
383 777 886
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号