제출 #549465

#제출 시각아이디문제언어결과실행 시간메모리
549465Vladth11Rabbit Carrot (LMIO19_triusis)C++14
0 / 100
1 ms336 KiB
#include <bits/stdc++.h> #define debug(x) cerr << #x << " " << x << "\n" #define debugs(x) cerr << #x << " " << x << " " using namespace std; typedef long long ll; typedef pair <ll, ll> pii; const ll NMAX = 1000001; const ll VMAX = 26; const ll INF = (1LL << 55); const ll MOD = 90000000000000001; const ll BLOCK = 1000000; const ll base = 1000000001; const ll nr_of_bits = 18; int v[NMAX]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, i, m; cin >> n >> m; for(i = 2; i <= n + 1; i++){ cin >> v[i]; } int cnt = 0; for(i = 1; i <= n; i++){ if(v[i] + m < v[i + 1]){ v[i + 1] = v[i] + m; cnt++; } } cout << cnt; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...