| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1191958 | callmehuseyn | Rabbit Carrot (LMIO19_triusis) | C++20 | 2 ms | 328 KiB |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> heights(n);
for (int i = 0; i < n; ++i)
cin >> heights[i];
int count = 0;
int prev = 0; // Tavşan başlangıçta yerde (yükseklik 0)
for (int i = 0; i < n; ++i) {
if (heights[i] - prev > m) {
// Tavşan bu direğe zıplayamaz
count++;
} else {
// Tavşan bu direğe zıplayabilir, buradan devam eder
prev = heights[i];
}
}
cout << count << endl;
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... | ||||
