Submission #870006

#TimeUsernameProblemLanguageResultExecution timeMemory
870006melody_rulesRabbit Carrot (LMIO19_triusis)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; int main() { long long int n=0; long long int m=0; long long int a=0; long long int i=0; long long int tot=0; cin>>n>>m; long long int arr[n]; for(i=0;i<n;i++) { cin>>a; arr[i]=a; } a=0; for(i=0;i<n;i++) { if((m+a) < arr[i]) { arr[i]=m+a; a+=m; tot++; } } cout<<tot<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...