| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1343856 | minhtien | Rabbit Carrot (LMIO19_triusis) | C++20 | 2 ms | 344 KiB |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N=1e6+7;
ll a[N];
ll n,k;
int main()
{
cin >>n >>k;
ll tong=k;
int dem=0;
for(int i=1;i<=n;i++){
cin >> a[i];
}
if(a[1]>k){
dem++;
a[1]=k;
}
for(int j=2;j<=n;j++){
if(a[j-1]+k<a[j]){
dem++;
a[j]=a[j-1]+k;
}
}
cout << dem;
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... | ||||
