시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 818 324 253 39.531%

문제

양의 정수 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
W3sicHJvYmxlbV9pZCI6IjU2MjMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMyMThcdWM1ZjRcdWM3NTggXHVkNTY5IiwiZGVzY3JpcHRpb24iOiI8cD5cclxuXHRcdWM1OTFcdWM3NTggXHVjODE1XHVjMjE4IE5cdWFjMWNcdWI4NWMgXHVjNzc0XHViOGU4XHVjNWI0XHVjOWM0IFx1YzIxOFx1YzVmNCBBXHVhYzAwIFx1Yzc4OFx1YjJlNC4gXHVjMGMxXHVhZGZjXHVjNzc0XHViMjk0IFx1YzIxOFx1YzVmNCBBXHVjNzU4IFx1YmFhOFx1YjRlMCBcdWI0NTAgXHVjMjE4XHVjNzU4IFx1ZDU2OVx1Yzc0NCBcdWM1NGNcdWFjZTAgXHVjNzg4XHViMmU0LiBcdWM3NzQgXHViNTRjLCBcdWMyMThcdWM1ZjQgQVx1Yjk3YyBcdWFkNmNcdWQ1NThcdWIyOTQgXHVkNTA0XHViODVjXHVhZGY4XHViN2E4XHVjNzQ0IFx1Yzc5MVx1YzEzMVx1ZDU1OFx1YzJkY1x1YzYyNC48XC9w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