90572024-02-13 11:44:41DohajovDanielUtazásszervezés (75 pont)python3Accepted 75/7537ms15512 KiB
idb,szh,uh,csdb = [int(i) for i in input().split()]
unL = [int(i) for i in input().split()]
iL = idb * [0]; kdb= 0
for i in range(csdb):
    for j in range(idb):
        if unL[i] > iL[j]:
            iL[j] = unL[i]+uh-1
            kdb+=1
            break
print(kdb)
"""
2 10 4 6
1 2 2 5 6 7
"""
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/017ms10988 KiB
2Accepted0/035ms13704 KiB
3Accepted3/317ms11532 KiB
4Accepted4/417ms12116 KiB
5Accepted4/417ms11892 KiB
6Accepted4/417ms12212 KiB
7Accepted4/417ms11948 KiB
8Accepted4/417ms12516 KiB
9Accepted5/518ms12556 KiB
10Accepted5/519ms12948 KiB
11Accepted6/624ms13148 KiB
12Accepted6/629ms14448 KiB
13Accepted6/629ms14572 KiB
14Accepted6/637ms15364 KiB
15Accepted6/635ms15272 KiB
16Accepted6/634ms15336 KiB
17Accepted6/634ms15512 KiB