제출 #1148527

#제출 시각아이디문제언어결과실행 시간메모리
1148527amin_2008Rabbit Carrot (LMIO19_triusis)C++20
0 / 100
0 ms328 KiB
#include "bits/stdc++.h" using namespace std; #define int long long const int sz = 2e5 + 5; const int inf = 1e18; int a[sz]; signed main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n, k; cin >> n >> k; a[0] = 0; int cnt = 0; for (int i = 1; i <= n; i++) { cin >> a[i]; if (a[i - 1] + k < a[i]) ++cnt; } cout << cnt << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...