There is the wrong answer in the editorial of GOODSET.

Is there any problem in here. Because according to the editorial I am having this is answer
500
500 499
500 499 498 …
When I input 5 1 2 3 4 5
But the answer must be
7
1 2
1 2 4
1 2 4 16
3 2 15 6 10

Output

For each test case, output a single line containing n integers denoting the elements of the good set, in any order. There can be more than one possible good set, and you can output any one of them.