-
Notifications
You must be signed in to change notification settings - Fork 2
freefood
bradendubois edited this page Jun 9, 2021
·
6 revisions
ID: freefood
Difficulty: 1.5
CPU Time: 1 second
Memory: 1024 MB
One can create a map of a day x, and for every event from s to t, mark all days between (and including) these in the map as having free food. After doing this for every event, simply iterate through the map from the earliest-starting event to the last-ending event, and if there is at least one event that has marked this day, increment a running total.