27542023-01-21 01:00:20rennKarácsonyi égőkpython3Time limit exceeded 0/1001.588s57592 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

megold()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11224 KiB
2Accepted17ms11536 KiB
subtask20/15
3Time limit exceeded1.57s8336 KiB
4Time limit exceeded1.588s8536 KiB
5Time limit exceeded1.564s8904 KiB
6Time limit exceeded1.575s4824 KiB
7Time limit exceeded1.55s4552 KiB
subtask30/10
8Wrong answer17ms12228 KiB
9Accepted17ms12324 KiB
10Accepted17ms12320 KiB
11Accepted18ms12312 KiB
12Accepted18ms12504 KiB
subtask40/20
13Time limit exceeded1.554s12796 KiB
14Accepted456ms13164 KiB
15Accepted108ms13064 KiB
16Accepted1.269s13264 KiB
17Accepted818ms13312 KiB
subtask50/25
18Wrong answer18ms14512 KiB
19Time limit exceeded1.57s6508 KiB
20Time limit exceeded1.57s6616 KiB
21Time limit exceeded1.567s6508 KiB
22Time limit exceeded1.567s6536 KiB
subtask60/30
23Wrong answer115ms57592 KiB
24Time limit exceeded1.577s25532 KiB
25Time limit exceeded1.569s28404 KiB
26Time limit exceeded1.565s29808 KiB
27Time limit exceeded1.588s30416 KiB
28Time limit exceeded1.58s28636 KiB
29Time limit exceeded1.567s25976 KiB
30Time limit exceeded1.562s10996 KiB