45272023-03-29 12:39:27DohajovDanielUtazásszervezés (75 pont)python3Wrong answer 4/7546ms15220 KiB
def vankisebb(lista1, val):
    return(all(x < val for x in lista1))
vdb,nap,hossz,idb,=[int(i) for i in input().split()]
igL=[int(i) for i in input().split()]
vL=vdb*[0]
lehet=0
for i in range(idb):
    if (igL[i]-hossz in vL):
        lehet+=1
        vL[vL.index(igL[i]-hossz)]=igL[i]
    if vankisebb(vL,igL[i]): vL[vL.index(min(vL))]=igL[i]
    if (igL[i]-hossz in vL)==False and (0 in vL)==True:
        lehet+=1
        vL[vL.index(0)]=igL[i]
print(lehet+1)
SubtaskSumTestVerdictTimeMemory
base4/75
1Accepted0/017ms11168 KiB
2Wrong answer0/046ms13724 KiB
3Wrong answer0/317ms11648 KiB
4Wrong answer0/417ms11960 KiB
5Accepted4/417ms11940 KiB
6Wrong answer0/417ms12324 KiB
7Wrong answer0/417ms12540 KiB
8Wrong answer0/418ms12672 KiB
9Wrong answer0/519ms13056 KiB
10Wrong answer0/523ms13500 KiB
11Wrong answer0/627ms14076 KiB
12Wrong answer0/639ms14932 KiB
13Wrong answer0/635ms14892 KiB
14Wrong answer0/643ms14948 KiB
15Wrong answer0/645ms15220 KiB
16Wrong answer0/643ms15076 KiB
17Wrong answer0/646ms15100 KiB