完全看不懂题.
以为要动态维护,不断循环,直到无法Unrated
事实上,本题的意思是
从头到尾进行删除,删除可能改变表中数据,问最后谁会Unrated
注意只要扫1遍……赤裸裸的模拟……
E文太差伤不起
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<functional>
#include<iostream>
#include<cmath>
#include<cctype>
#include<ctime>
using namespace std;
#define For(i,n) for(int i=1;i<=n;i++)
#define Fork(i,k,n) for(int i=k;i<=n;i++)
#define Rep(i,n) for(int i=0;i<n;i++)
#define ForD(i,n) for(int i=n;i;i--)
#define RepD(i,n) for(int i=n;i>=0;i--)
#define Forp(x) for(int p=pre[x];p;p=next[p])
#define MAXN (200000+10)
long long n,k,a[MAXN];
int main()
{
cin>>n>>k;
long long tmp=0;
int j=1;
For(i,n)
{
long long a;
cin>>a;
if (tmp-(i-1)*(n-i)*a<k)
{
cout<<j<<endl;
n--;i--;
}
else tmp+=a*(i-1);
j++;
}
return 0;
}