Skip to content
bradendubois edited this page Nov 24, 2021 · 9 revisions

Server

ID: server

Difficulty: 1.8

CPU Time: 1 second

Memory: 1024 MB

Solution

For this, just keep a tally of completed tasks (starting at 0) and read in each task, one by one; if there is time in T left to do the task, increment the number completed and lower T by the size of the task. Otherwise, break.

Clone this wiki locally