301644: CF314A. Sereja and Contest
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Sereja and Contest
题意翻译
## 题目描述 在最后一轮 Sereja 的 Codesecrof 中,服务器崩溃了很多次,因此决定对一些参与者取消评分。 假设有 $n$ 个人参加了比赛,第一名的评分为 $a_1$,第二名的评分为 $a_2$,$...$ ,第 $n$ 名的评分为 $a_n$ 。然后,更改 Codesecrof 上的评分是通过以下公式计算的: $d_i=\sum\limits_{j=1}^{i-1}(a_j \cdot (j-1)-(n-i) \cdot a_i)$ 考试结束后,Codesecrof 公布了参与者的排行榜。他们决定一个参与者 $d_i$ 的等级为 $k$ ,那么这次他就算没评分了。但试着想象一下,当管理员发现参与者的排行榜是动态的时,他们会感到不可思议。简单地说,当某个参与者的评分中删除时,他将从排行榜中删除,并根据新表重新计算评分。当然,所有被排除在评分之外的申请都是根据当前排行榜考虑的。 我们知道,在所有申请排除在评分之外的申请中,首先要考虑的是排名最好(人数最少)的参与者,或者谁是 $d_i$ ,评分为 $k$。我们还知道,所有参与者都提交了被排除在评分之外的申请。 现在 Sereja 想知道,被排除在比赛评分之外的参赛者人数是多少,原始排行榜中的参赛者人数按其被排除在评分之外的顺序排列。注意分析第一个样例,以便更好地理解语句。题目描述
During the last Sereja's Codesecrof round the server crashed many times, so the round was decided to be made unrated for some participants. Let's assume that $ n $ people took part in the contest. Let's assume that the participant who got the first place has rating $ a_{1} $ , the second place participant has rating $ a_{2} $ , $ ... $ , the $ n $ -th place participant has rating $ a_{n} $ . Then changing the rating on the Codesecrof site is calculated by the formula ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF314A/c51703a6e7729252fb6f20e8a44b483ddf07fc8e.png). After the round was over, the Codesecrof management published the participants' results table. They decided that if for a participant $ d_{i}<k $ , then the round can be considered unrated for him. But imagine the management's surprise when they found out that the participants' rating table is dynamic. In other words, when some participant is removed from the rating, he is removed from the results' table and the rating is recalculated according to the new table. And of course, all applications for exclusion from the rating are considered in view of the current table. We know that among all the applications for exclusion from the rating the first application to consider is from the participant with the best rank (the rank with the minimum number), for who $ d_{i}<k $ . We also know that the applications for exclusion from rating were submitted by all participants. Now Sereja wonders, what is the number of participants to be excluded from the contest rating, and the numbers of the participants in the original table in the order of their exclusion from the rating. Pay attention to the analysis of the first test case for a better understanding of the statement.输入输出格式
输入格式
The first line contains two integers $ n $ , $ k $ $ (1<=n<=2·10^{5},-10^{9}<=k<=0) $ . The second line contains $ n $ space-separated integers $ a_{1},a_{2},...,a_{n} $ $ (1<=a_{i}<=10^{9}) $ — ratings of the participants in the initial table.
输出格式
Print the numbers of participants in the order in which they were removed from the table. Print the initial numbers of the participants, that is, the numbers that the participants had in the initial table.
输入输出样例
输入样例 #1
5 0
5 3 4 1 2
输出样例 #1
2
3
4
输入样例 #2
10 -10
5 5 1 7 5 1 2 4 9 2
输出样例 #2
2
4
5
7
8
9