92742024-02-19 17:40:4242thebestestUtazásszervezés (75 pont)python3Time limit exceeded 4/75300ms12800 KiB
from sys import stdin
N, K, M, C = [int(x) for x in stdin.readline().split()]
igenyek = [int(x) for x in stdin.readline().split()]
idegenvezetok = [0] * N
utazasok = 0

for i in range(K-M+1):
    marad = igenyek.count(i+1)
    for x in range(N):
        if idegenvezetok[x] > 0:
            idegenvezetok[x] -= 1
        else:
            if marad > 0:
                idegenvezetok[x] = M
                utazasok += 1
    
print(utazasok)
SubtaskSumTestVerdictTimeMemory
base4/75
1Accepted0/018ms11244 KiB
2Time limit exceeded0/0300ms4980 KiB
3Wrong answer0/317ms11604 KiB
4Wrong answer0/417ms11828 KiB
5Accepted4/417ms12128 KiB
6Wrong answer0/417ms12176 KiB
7Wrong answer0/417ms12404 KiB
8Wrong answer0/479ms12640 KiB
9Time limit exceeded0/5277ms12800 KiB
10Time limit exceeded0/5272ms5460 KiB
11Time limit exceeded0/6256ms5644 KiB
12Time limit exceeded0/6259ms6300 KiB
13Time limit exceeded0/6272ms6420 KiB
14Time limit exceeded0/6272ms6640 KiB
15Time limit exceeded0/6272ms6644 KiB
16Time limit exceeded0/6259ms6680 KiB
17Time limit exceeded0/6280ms6764 KiB