45262023-03-29 12:34:10DohajovDanielUtazásszervezés (75 pont)python3Runtime error 11/7521ms15548 KiB
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) or min(vL)<igL[i]-hossz:
        lehet+=1
        vL[vL.index(igL[i]-hossz)]=igL[i]
    if (igL[i]-hossz in vL)==False and (0 in vL)==True:
        lehet+=1
        vL[vL.index(0)]=igL[i]
print(lehet)
        
SubtaskSumTestVerdictTimeMemory
base11/75
1Accepted0/017ms11120 KiB
2Runtime error0/021ms13724 KiB
3Accepted3/317ms11472 KiB
4Accepted4/417ms11680 KiB
5Accepted4/417ms11976 KiB
6Runtime error0/417ms11980 KiB
7Runtime error0/417ms12264 KiB
8Runtime error0/417ms12184 KiB
9Runtime error0/517ms12400 KiB
10Runtime error0/517ms12900 KiB
11Runtime error0/618ms13876 KiB
12Runtime error0/620ms14780 KiB
13Runtime error0/620ms14480 KiB
14Runtime error0/620ms15080 KiB
15Runtime error0/620ms15344 KiB
16Runtime error0/621ms15360 KiB
17Runtime error0/620ms15548 KiB