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 <iostream>
using namespace std;
int main() {
int n, t;
cin >> n >> t;
int p = 0, c = 0;
for (int x = 0; x < n; x ++){
int a;
cin >> a;
if (p+t < a){
p = p+t;
c ++;
}else {
p = a;
}
}
cout << c << endl;
return 0;
}
# | 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... |