| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1166695 | tamyte | Rabbit Carrot (LMIO19_triusis) | C++20 | 1 ms | 328 KiB |
#include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int prev_height = 0;
int count = 0;
for (int i = 0; i < N; ++i) {
int a;
cin >> a;
int allowed_max = prev_height + M;
if (a > allowed_max) {
count++;
prev_height = allowed_max;
} else if (a < 0) {
count++;
prev_height = 0;
} else {
prev_height = a;
}
}
cout << count << endl;
return 0;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
