# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
251986 | _ypc | Rabbit Carrot (LMIO19_triusis) | C++98 | 132 ms | 3952 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
typedef long long LL;
using namespace std;
int n,k;
vector <LL> mou;
int main(){
cin>>n>>k;
mou.push_back(0);
for (int i=1;i<=n;i++){
int h;cin>>h;
LL v=k*i-h;
if (v<0)continue;
int fin=upper_bound(mou.begin(),mou.end(),v)-mou.begin();
if (fin==mou.size())mou.push_back(v); else mou[fin]=v;
}
cout<<n-mou.size()+1<<endl;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |