Submission #161890

# Submission time Handle Problem Language Result Execution time Memory
161890 2019-11-05T08:08:40 Z boolodifjenula Rasvjeta (COCI17_rasvjeta) Python 3
Compilation error
0 ms 0 KB
N=int(input())
M=int(input())
K=int(input())
O=[i+1 for i in range (N)]
for i in range(M):
    P=int(input())
    for i in range(P-K-1,P+K):
        if -1<i<len(O):
            O[i]=0
k=0
p=0
s=0
for i in range(N):
    if O[i]:
        k+=1
    elif k:
        p+=1
    if k and k+p==K+1:
        s+=1
        k=-K
        p=-K
    if i==N-1 and s and k:
        s+=1
print(s)

Compilation message

Sorry: IndentationError: unindent does not match any outer indentation level (rasjveta.py, line 22)