F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Revenge of iSea

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 242    Accepted Submission(s): 79


Problem 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
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-20 22:15:55, Gzip enabled