Problem A

Statement
Copy Copied
A. Breach of Faithtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBreach of Faith - Supire feat.eili You and your team have worked tirelessly until you have a sequence $$$a_1, a_2, \ldots, a_{2n+1}$$$ of positive integers satisfying these properties.  $$$1 \le a_i \le 10^{18}$$$ for all $$$1 \le i \le 2n + 1$$$.  $$$a_1, a_2, \ldots, a_{2n+1}$$$ are pairwise distinct.  $$$a_1 = a_2 - a_3 + a_4 - a_5 + \ldots + a_{2n} - a_{2n+1}$$$. However, the people you worked with sabotaged you because they wanted to publish this sequence first. They deleted one number from this sequence and shuffled the rest, leaving you with a sequence $$$b_1, b_2, \ldots, b_{2n}$$$. You have forgotten the sequence $$$a$$$ and want to find a way to recover it.If there are many possible sequences, you can output any of them. It can be proven under the constraints of the problem that at least one sequence $$$a$$$ exists.InputEach test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^4$$$). The description of the test cases follows. The first line of each test case contains one integer $$$n$$$ ($$$1 \leq n \leq 2 \cdot 10^5$$$).The second line of each test case contains $$$2n$$$ distinct integers $$$b_1, b_2, \ldots, b_{2n}$$$ ($$$1 \leq b_i \leq 10^9$$$), denoting the sequence $$$b$$$.It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.OutputFor each test case, output $$$2n+1$$$ distinct integers, denoting the sequence $$$a$$$ ($$$1 \leq a_i \leq 10^{18}$$$). If there are multiple possible sequences, you can output any of them. The sequence $$$a$$$ should satisfy the given conditions, and it should be possible to obtain $$$b$$$ after deleting one element from $$$a$$$ and shuffling the remaining elements.ExampleInput419 228 6 1 4399 2 86 33 14 7721 6 3 2Output7 9 2
1 8 4 6 9
86 99 2 77 69 14 33
4 6 1 2 3