International Collegiate Programming Contest, Egyptian Collegiate Programming Contest (ECPC 2018) |
---|
Finished |
You are given a line with equation x = y. you need to perform the following operation Q times.
Note that each operation depends on all operations before it.
The first line of the input is the number of test cases T, each test case starts with a line containing a single integer Q the number of operations, where 1 ≤ Q ≤ 105.
Each of the following Q lines represents a query with a single integer x, where 0 ≤ xi ≤ 105.
For each test case output Q lines. Each of them contains the corresponding y value.
1
5
1
2
1
3
4
1
0
1
1
2
Here are some figures that illustrate the first 2 operations:
Name |
---|