Time limit
2s
Memory limit
128 MB
Huyeon is competing in the Jump Jump Championship. There are N jump platforms arranged from left to right, and each platform has exactly one trophy.
A contestant may start on any one platform, then may move only to platforms on its right. Trophies can be collected under these rules.
For example, if the trophy sizes from left to right are 3 2 4 2 5, Huyeon can visit platforms 1, 3, and 5 to collect trophies of sizes 3 4 5. Visiting platforms 2, 3, and 5 to collect 2 4 5 is also possible.
Find the maximum number of trophies Huyeon can collect, and output one possible route of platform numbers that achieves it.
The first line contains the number of test cases T.
For each test case, the first line contains the number of platforms N. The next line contains N integers, the trophy sizes on the platforms from left to right.
1 ≤ N ≤ 10,000. Each trophy size is a natural number between 1 and 1,000,000, inclusive. Multiple trophies may have the same size.
For each test case, print two lines.
On the first line, print the maximum number of trophies that can be collected. On the second line, print the platform numbers of one route that achieves that count, in visiting order.
If several routes are possible, output any one of them.