# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
895061 | Litusiano | Rabbit Carrot (LMIO19_triusis) | C++17 | 0 ms | 0 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>
using namespace std;
#define int long long
signed main(){
int n,h; cin>>n>>h; n++
int ans = 0;
vector<int> v(n+1,0); //for(int& i : v) cin>>i
for(int i = 1; i<=n; i++){
cin>>v[i];
if(v[i] > i*h){
ans++;
v[i] = v[i-1] + h;
}
}
cout<<ans<<endl;
}