| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1327174 | hoangtien69 | Rabbit Carrot (LMIO19_triusis) | C++20 | 1 ms | 332 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, M;
cin >> n >> M;
int cur = 0;
int ans = 0;
for (int i = 1; i <= n; i++)
{
int x;
cin >> x;
if (x <= cur + M)
{
cur = x;
}
else
{
ans++;
cur = cur + M;
}
}
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... | ||||
