2755 | 2023-01-21 01:02:41 | renn | Karácsonyi égők | python3 | Time limit exceeded 10/100 | 1.6s | 57648 KiB |
sor = input().split()
N = int(sor[0])
C = int(sor[1])
sor = input().split()
egok = []
for E in sor:
egok.append(int(E))
def megold():
for X in range(C, N):
for Y in range(0, N-X):
tomb = [False for i in range(0, C)]
for Z in range(Y, Y+X):
K = egok[Z]
tomb[K] = True
if False not in tomb:
print(X)
return True
return False
if not megold():
print(N)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 11016 KiB | ||||
2 | Accepted | 17ms | 11388 KiB | ||||
subtask2 | 0/15 | ||||||
3 | Time limit exceeded | 1.6s | 7544 KiB | ||||
4 | Time limit exceeded | 1.578s | 7524 KiB | ||||
5 | Time limit exceeded | 1.559s | 7604 KiB | ||||
6 | Time limit exceeded | 1.578s | 4572 KiB | ||||
7 | Time limit exceeded | 1.57s | 4880 KiB | ||||
subtask3 | 10/10 | ||||||
8 | Accepted | 17ms | 12576 KiB | ||||
9 | Accepted | 17ms | 12768 KiB | ||||
10 | Accepted | 18ms | 12940 KiB | ||||
11 | Accepted | 18ms | 12608 KiB | ||||
12 | Accepted | 17ms | 13016 KiB | ||||
subtask4 | 0/20 | ||||||
13 | Time limit exceeded | 1.524s | 13240 KiB | ||||
14 | Accepted | 448ms | 13160 KiB | ||||
15 | Accepted | 108ms | 13448 KiB | ||||
16 | Accepted | 1.22s | 13552 KiB | ||||
17 | Accepted | 816ms | 13412 KiB | ||||
subtask5 | 0/25 | ||||||
18 | Accepted | 18ms | 14816 KiB | ||||
19 | Time limit exceeded | 1.6s | 6616 KiB | ||||
20 | Time limit exceeded | 1.567s | 6644 KiB | ||||
21 | Time limit exceeded | 1.567s | 6644 KiB | ||||
22 | Time limit exceeded | 1.575s | 6392 KiB | ||||
subtask6 | 0/30 | ||||||
23 | Accepted | 118ms | 57648 KiB | ||||
24 | Time limit exceeded | 1.557s | 25536 KiB | ||||
25 | Time limit exceeded | 1.565s | 28204 KiB | ||||
26 | Time limit exceeded | 1.569s | 29356 KiB | ||||
27 | Time limit exceeded | 1.585s | 29808 KiB | ||||
28 | Time limit exceeded | 1.583s | 28268 KiB | ||||
29 | Time limit exceeded | 1.572s | 25624 KiB | ||||
30 | Time limit exceeded | 1.575s | 9628 KiB |