创建于 2026/07/16 · 更新于 2026/07/17
This is an interactive problem.
The interactor will first give you an integer . You need to output an positive integer and a strictly increasing positive integer array . You must ensure that there do NOT exist two distinct elements in whose sum is .
Then, the interactor will give you an index between and , and you need to change to another positive integer, such that after the modification, is still strictly increasing, but there exist two distinct elements whose sum is .
Both and all the elements in should not exceed .
The input contains several test cases.
The first line of the input contains a single integer , the number of test cases.
For each test case:
Remember to flush the output buffer after each print (e.g., fflush(stdout) in C/C++, sys.stdout.flush() in Python, cout.flush() in C++).
It's guaranteed that , and .
2
3
2
4
1
6
1 4 9
5
7
1 4 7 10
3