Ranking Race Times
The Fenwick College cross-country meet puts a results board up at the end of every race. The timing van hands over the finish times in the order the chips happened to be read, which is not the order the runners crossed the line — a chip read late can drop a fast runner to the bottom of the file. The board carries times only, with the quickest run of the day at the left-hand end.
Task: Print the race times in order, quickest first.
Input
The first line holds a single integer n, the number of finishers. Each of the next n lines holds one finish time in seconds, which may carry decimals.
Output
One line holding all n times, separated by single spaces, quickest first, each with two digits after the decimal point.
Example:
Input:
3
15.2
12.8
14.0
Output:
12.80 14.00 15.20
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in