| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1349074 | novemnotes | Rabbit Carrot (LMIO19_triusis) | C++20 | 0 ms | 344 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N(2e5+9);
int n,k,ans=0;
int v[N];
int32_t main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);
cin >> n >> k;
for(int i=1;i<=n;i++)cin >> v[i];
for(int i=0;i<n;i++){
if(v[i]<v[i+1] && v[i+1]-v[i]>k){
ans++;
v[i+1]=v[i]+k;
}
}
cout << ans << "\n";
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... | ||||
