当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5089:Revenge of iSea

题目描述
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.
输入解释
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
输出解释
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.
输入样例
2
2 1
20 10
3 2
1 1 1
输出样例
2
1 2
来自杭电HDUOJ的附加信息
Recommend heyang

该题目是Virtual Judge题目,来自 杭电HDUOJ

题目来源 BestCoder Round #16

源链接: HDU-5089

最后修改于 2020-10-25T23:19:42+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)