| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1228979 | shiovn | Rabbit Carrot (LMIO19_triusis) | C++20 | 1 ms | 328 KiB |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
#define pi pair
const long long N=2e5+10;
long long a[N];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
long long n,m;
cin>>n>>m;
for(int i=1;i<=n;i++)
{
cin>>a[i];
}
a[0]=0;
long long ans=0;
for(int i=1;i<=n;i++)
{
if(a[i-1]+m<a[i])
{
a[i]=a[i-1]+m;
ans++;
}
}
cout<<ans;
}
| # | 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... | ||||
