제출 #158461

#제출 시각아이디문제언어결과실행 시간메모리
158461dcjRasvjeta (COCI17_rasvjeta)C++14
10 / 50
3 ms376 KiB
#include <iostream> using namespace std; int main() { int N, M, K, X; cin >> N; cin >> M; cin >> K; int br=0, x, y=2*K+1; cin >> X; br+=(X-K-1)/y+bool(X>K); x=X; while(--M>1) { cin >> X; br+=(X-x-1)/y+bool((X-x)%y==0); x=X; } cin >> X; br+=(N-X-K-1)/y+bool(N-X>K); cout << br; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...