1242021-01-16 14:58:10mraronUtazásszervezés (75 pont)python3Accepted 75/7528ms15452 KiB
from sys import stdin, stdout

def main():
  [n, k, m, c] = list(map(int, stdin.readline().split()))
  igeny = list(map(int, stdin.readline().split()))
  db = 0
  foglalt = [0] * n
  for nap in igeny:
    for i in range(n):
      if foglalt[i] < nap:
        db += 1
        foglalt[i] = nap + m - 1
        break
  stdout.write(str(db) + '\n')

main()
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/017ms10976 KiB
2Accepted0/027ms13664 KiB
3Accepted3/317ms11716 KiB
4Accepted4/417ms11664 KiB
5Accepted4/417ms11880 KiB
6Accepted4/417ms11856 KiB
7Accepted4/417ms12140 KiB
8Accepted4/417ms12432 KiB
9Accepted5/517ms12924 KiB
10Accepted5/518ms13192 KiB
11Accepted6/619ms13460 KiB
12Accepted6/626ms14836 KiB
13Accepted6/625ms14756 KiB
14Accepted6/628ms15300 KiB
15Accepted6/627ms15152 KiB
16Accepted6/627ms15296 KiB
17Accepted6/627ms15452 KiB