# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
158459 |
2019-10-17T07:48:56 Z |
dcj |
Rasvjeta (COCI17_rasvjeta) |
C++14 |
|
2 ms |
380 KB |
#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;
x=X;
}
cin >> X;
br+=(N-X-K-1)/y+bool(N-X>K);
cout << br;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Correct |
2 ms |
376 KB |
Output is correct |
4 |
Correct |
2 ms |
376 KB |
Output is correct |
5 |
Correct |
2 ms |
256 KB |
Output is correct |
6 |
Correct |
2 ms |
376 KB |
Output is correct |
7 |
Correct |
2 ms |
376 KB |
Output is correct |
8 |
Correct |
2 ms |
256 KB |
Output is correct |
9 |
Correct |
2 ms |
376 KB |
Output is correct |
10 |
Correct |
2 ms |
380 KB |
Output is correct |