# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
471722 | 2021-09-10T14:24:40 Z | rainboy | Rasvjeta (COCI17_rasvjeta) | C | 1 ms | 280 KB |
#include <stdio.h> int main() { int n, m, k, x, x_, ans; scanf("%d%d%d", &n, &m, &k); x = -k, ans = 0; while (m--) { scanf("%d", &x_); ans += (x_ - x - 1) / (k * 2 + 1), x = x_; } x_ = n + 1 + k; ans += (x_ - x - 1) / (k * 2 + 1), x = x_; printf("%d\n", ans); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 276 KB | Output is correct |
4 | Correct | 1 ms | 256 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 0 ms | 280 KB | Output is correct |
10 | Correct | 1 ms | 204 KB | Output is correct |