Pro.ID22341 TitlePairsumonious Numbers Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22341 AC0 Submit7 Ratio0.00% 时间&空间限制描述validator没写好,到POJ提交吧 For 10 > N > 2 numbers we form N×(N-1)/2 sums by adding every pair of the numbers. Your task is to find the N numbers given the sums. 输入Each line of input contains N followed by N×(N-1)/2 integer numbers separated by a space. 输出Description validator没写好,到POJ提交吧 For 10 > N > 2 numbers we form N×(N-1)/2 sums by adding every pair of the numbers. Your task is to find the N numbers given the sums. Input Each line of input contains N followed by N×(N-1)/2 integer numbers separated by a space. Output For each line of input, output one line containing N integers in non-descending order such that the input numbers are pairwise sums of the N numbers. If there is more than one solution, any one will do; if there is no solution, print "Impossible". Sample Input 3 1269 1160 1663 Sample Output 383 777 886 Source 样例输入3 1269 1160 1663 样例输出383 777 886 作者 |