-
Notifications
You must be signed in to change notification settings - Fork 2
parking2
bradendubois edited this page Jun 9, 2021
·
6 revisions
ID: parking2
Difficulty: 1.4
CPU Time: 1 second
Memory: 1024 MB
Consider any arbitrary point where the person could park: since they'd walk as far left as the left-est store (and back), and as far right as the right-est store (and back), the distance walked anywhere is double the distance of the furthest apart stores. One can read in all the store locations, sort them, and output the difference between the largest/smallest, doubled.