You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bradendubois edited this page Oct 7, 2021
·
7 revisions
Grandpa Bernie
ID: grandpabernie
Difficulty: 2.8
CPU Time: 1 second
Memory: 1024 MB
Solution
For this, take in all the n trips, where a country is mapped to a list of years; push the given year onto the list for the given country. After this, simply sort all the years. Then, when given a year and trip number, the country's list of years should have index i-1 correspond to the trip i.