시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 869 347 271 39.620%

문제

양의 정수 N개로 이루어진 수열 A가 있다. 상근이는 수열 A의 모든 두 수의 합을 알고 있다. 이때, 수열 A를 구하는 프로그램을 작성하시오.

입력

첫째 줄에 수열의 크기 N이 주어진다. (2 ≤ N ≤ 1000)

다음 N개 줄에는 100,000보다 작거나 같은 양의 정수가 N개씩 주어진다. 이 숫자들은 S를 이루는 숫자이며, S(i,j) = A[i] + A[j] (i≠j), S(i,j) = 0 (i=j) 이다. S(i,j)는 i번째 줄, j번째 숫자를 의미하며, A[i]는 A의 i번째 수이다.

입력으로 주어지는 S에 해당하는 수열 A는 항상 유일하다.

출력

첫째 줄에 수열 A를 출력한다.

예제 입력 1

4
0 3 6 7
3 0 5 6
6 5 0 9
7 6 9 0

예제 출력 1

2 1 4 5
W3sicHJvYmxlbV9pZCI6IjU2MjMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMyMThcdWM1ZjRcdWM3NTggXHVkNTY5IiwiZGVzY3JpcHRpb24iOiI8cD5cclxuXHRcdWM1OTFcdWM3NTggXHVjODE1XHVjMjE4IE5cdWFjMWNcdWI4NWMgXHVjNzc0XHViOGU4XHVjNWI0XHVjOWM0IFx1YzIxOFx1YzVmNCBBXHVhYzAwIFx1Yzc4OFx1YjJlNC4gXHVjMGMxXHVhZGZjXHVjNzc0XHViMjk0IFx1YzIxOFx1YzVmNCBBXHVjNzU4IFx1YmFhOFx1YjRlMCBcdWI0NTAgXHVjMjE4XHVjNzU4IFx1ZDU2OVx1Yzc0NCBcdWM1NGNcdWFjZTAgXHVjNzg4XHViMmU0LiBcdWM3NzRcdWI1NGMsIFx1YzIxOFx1YzVmNCBBXHViOTdjIFx1YWQ2Y1x1ZDU1OFx1YjI5NCBcdWQ1MDRcdWI4NWNcdWFkZjhcdWI3YThcdWM3NDQgXHVjNzkxXHVjMTMxXHVkNTU4XHVjMmRjXHVjNjI0LjxcL3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