Revenge of iSea

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 5089
64-bit integer IO format: %I64d      Java class name: Main

Description

iSea is not the fish.
---Anonymous

Today, iSea takes revenge on you. As a problem setter, it’s always tough to choose appropriate problem ideas from the varieties. The problems cannot be too hard, because it will dampen your enthusiasm, but too easy, it will bore you. So iSea want to choose K problems so that probability to solve K-1 problems to be the highest, given the probability to solve each problem for players.

Input

The first line contains a single integer T, indicating the number of test cases.

Each test case begins with two integers N and K, indicating the number of problems and the number of problems to be selected. Then N integer Pi follows, indicating the probability to solve i-th problem is Pi%. Now the problems have already been sorted by the difficulty, i.e. Pi is a non-increasing sequence.

[Technical Specification]
1. 1 <= T <= 74
2. 1 <= K <= N <= 47
3. 0 <= Pi <= 100 and Pi >= Pi+1 for 1 <= i <= N - 1

Output

For each test case, output the id (1-based) list of selected K problems to let the probability to solve K-1 problems to be the highest, separated by a single blank.
If more than one such sequence exists, output the one with the minimal lexicographical order. And for simplification, we consider two numbers with difference less than 1e-8 are the same.

Sample Input

2
2 1
20 10
3 2
1 1 1

Sample Output

2
1 2

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .