Submission #922510

#TimeUsernameProblemLanguageResultExecution timeMemory
922510absolutePiRabbit Carrot (LMIO19_triusis)C++17
0 / 100
1 ms768 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long int main(){ //ios::sync_with_stdio(false); //cin.tie(0); ll n,m; cin >> n >> m; vector<ll> v(n); for(auto &i : v){cin >> i;} ll curr=0,next; ll ans=0; for(ll i=0;i<n;i++){ next=v[i]; if(next-curr>m){ ans++; curr+=m; } else{ curr=next; } } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...