11082 | 2024-07-06 16:54:22 | proba | Karácsonyi égők | python3 | Wrong answer 0/100 | 18ms | 3172 KiB |
#egok
sor1 = "11 3"
sor2 = "1 1 0 0 2 2 1 1 1 2 2"
N = int(sor1.split(' ')[0])
C = int(sor1.split(' ')[1])
lista = [int(i) for i in sor2.split(' ')]
def vizsgal(resz):
ok = [0]*C
for i in range(C):
if i in resz:
ok[i] = 1
return ok.count(1) != C
i, h = 0, C
while vizsgal(lista[i:i+h+1]) and h < N:
if i<(N-h):
i += 1
else:
i = 0
h += 1
print(h+1)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 17ms | 2980 KiB | ||||
2 | Accepted | 17ms | 2980 KiB | ||||
subtask2 | 0/15 | ||||||
3 | Wrong answer | 18ms | 3048 KiB | ||||
4 | Wrong answer | 17ms | 2980 KiB | ||||
5 | Wrong answer | 17ms | 2952 KiB | ||||
6 | Wrong answer | 17ms | 3044 KiB | ||||
7 | Wrong answer | 17ms | 2844 KiB | ||||
subtask3 | 0/10 | ||||||
8 | Wrong answer | 18ms | 3044 KiB | ||||
9 | Wrong answer | 17ms | 2956 KiB | ||||
10 | Wrong answer | 17ms | 2980 KiB | ||||
11 | Wrong answer | 17ms | 3044 KiB | ||||
12 | Wrong answer | 17ms | 2912 KiB | ||||
subtask4 | 0/20 | ||||||
13 | Wrong answer | 17ms | 3068 KiB | ||||
14 | Wrong answer | 17ms | 3044 KiB | ||||
15 | Wrong answer | 17ms | 3064 KiB | ||||
16 | Wrong answer | 17ms | 3056 KiB | ||||
17 | Wrong answer | 17ms | 3044 KiB | ||||
subtask5 | 0/25 | ||||||
18 | Wrong answer | 18ms | 2972 KiB | ||||
19 | Wrong answer | 18ms | 2920 KiB | ||||
20 | Wrong answer | 17ms | 3172 KiB | ||||
21 | Wrong answer | 17ms | 2880 KiB | ||||
22 | Wrong answer | 17ms | 2916 KiB | ||||
subtask6 | 0/30 | ||||||
23 | Wrong answer | 18ms | 3044 KiB | ||||
24 | Wrong answer | 17ms | 2940 KiB | ||||
25 | Wrong answer | 18ms | 3044 KiB | ||||
26 | Wrong answer | 17ms | 3092 KiB | ||||
27 | Wrong answer | 17ms | 3044 KiB | ||||
28 | Wrong answer | 17ms | 3044 KiB | ||||
29 | Wrong answer | 17ms | 3064 KiB | ||||
30 | Wrong answer | 17ms | 3044 KiB |