44592023-03-28 11:27:37PallanekPéterUtazásszervezés (75 pont)python3Accepted 75/7535ms15664 KiB
N,K,M,C=[int(i) for i in input().split()]
igenyek=[int(i) for i in input().split()]
szezon=[0]*K; db=0; vissza=[0]*N
for i in range(C):
    for j in range(N):
        if igenyek[i]>vissza[j]:
            db+=1;
            vissza[j]=igenyek[i]+M-1
            break
          
print(db)
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/017ms11024 KiB
2Accepted0/035ms13968 KiB
3Accepted3/317ms11552 KiB
4Accepted4/417ms11808 KiB
5Accepted4/417ms11836 KiB
6Accepted4/417ms12260 KiB
7Accepted4/417ms11928 KiB
8Accepted4/417ms12472 KiB
9Accepted5/518ms12960 KiB
10Accepted5/520ms13428 KiB
11Accepted6/624ms13788 KiB
12Accepted6/629ms15144 KiB
13Accepted6/630ms15332 KiB
14Accepted6/635ms15544 KiB
15Accepted6/634ms15400 KiB
16Accepted6/635ms15664 KiB
17Accepted6/634ms15528 KiB