1232021-01-16 14:57:20mraronUtazásszervezés (75 pont)python3Accepted 75/7527ms15812 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/017ms11192 KiB
2Accepted0/027ms13608 KiB
3Accepted3/317ms11528 KiB
4Accepted4/417ms11680 KiB
5Accepted4/417ms11768 KiB
6Accepted4/417ms12260 KiB
7Accepted4/417ms12380 KiB
8Accepted4/417ms12296 KiB
9Accepted5/517ms12792 KiB
10Accepted5/519ms12932 KiB
11Accepted6/620ms13436 KiB
12Accepted6/625ms14884 KiB
13Accepted6/625ms15024 KiB
14Accepted6/627ms15476 KiB
15Accepted6/626ms15500 KiB
16Accepted6/626ms15660 KiB
17Accepted6/626ms15812 KiB