# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
158379 | dcj | Rasvjeta (COCI17_rasvjeta) | C++14 | 2 ms | 384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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)/y+1-bool(X<=K);
x=X;
while(--M>1) {
cin >> X;
br+=(X-x)/y;
x=X;
}
cin >> X;
br+=(N-X-K)/y+1-(N-X<=K);
cout << br;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |