Skip to content

speeding

bradendubois edited this page Sep 9, 2021 · 8 revisions

Speeding

ID: speeding

Difficulty: 1.4

CPU Time: 1 second

Memory: 1024 MB

Solution

For this, read in each (time, speed) pair. Check each adjacent pair, and take the distance travelled, d2 - d1, divided by the time, t2 - t1. The maximum of these ever found is the highest speed.

Clone this wiki locally