#P11647. Reconstruct the Hidden Array
Reconstruct the Hidden Array
Reconstruct the Hidden Array
Little Qianzang has (n) random non-negative integers (a_0,a_1,\dots,a_{n-1}) generated uniformly in the range ([0,10^{18}]). In the interactive version of this problem, you are allowed to make at most (n) queries. In each query you can submit at most (2n) unordered pairs ((x,y)) (with the restriction that (x) and (y) must be distinct and each unordered pair must appear at most once overall), and for each pair, Little Qianzang will compute the sum (a_x+a_y). He will then return the list of sums sorted in increasing order. Finally, after all your queries, you must output the hidden array (a_0,a_1,\dots,a_{n-1}) in order.
Note: In this offline version, the hidden array is provided directly in the input. Your task is to simply output the same array. Be careful not to print any extra output to standard output.
inputFormat
The first line contains a single integer (n) (the size of the array).\nThe second line contains (n) space-separated non-negative integers (a_0,a_1,\dots,a_{n-1}). All integers satisfy (0 \le a_i \le 10^{18}).
outputFormat
Output a single line with (n) space-separated integers: (a_0,a_1,\dots,a_{n-1}), which should be exactly the same as the input array.
sample
3
1 2 3
1 2 3
</p>