Back
Close

Duel : shoot first !

Statement

 Goal

You are one of the fastest sheriffs in the West. You've taken responsibility for a wagon loaded with gold bullion, now ruthless bands of desperados are vying to shoot you down and lighten the wagon of it's precious load. This is the ultimate chance to prove your skills and be the best - second place is underground!

You will face many opponents, some are slow, other are fast. You have to deal with the fastest ones first! You know their firing speed. Good luck sheriff, stop these desperados!
Input
First line: N, the number of desperados.
Next N lines: Name and firing speed in milliseconds.
Output
Names of desperados. Ordered by shooting speed. The fastest is the first.
If the speed is under zero, do not include this person in the final list. You cannot kill a legend.

NONE if there is nobody.
Constraints
0 ≤ N ≤ 10
All bandits have different fire speed.
Example
Input
3
Joe Dalton 50
Calamity Jane 30
Billy The Kid 60
Output
Calamity Jane
Joe Dalton
Billy The Kid

Game modes
Fastest, Shortest, Reverse

Test cases
First ambush Test
Input
3 Joe Dalton 50 Calamity Jane 30 Billy The Kid 60
Output
Calamity Jane Joe Dalton Billy The Kid

Validator 1 Validator
Input
3 Bob 5000 Bib 666 Bub 899
Output
Bib Bub Bob

Faster than his shadow Test
Input
4 Butch Cassidy 5 Emmett Dalton 50 Lucky Luke -10 Jesse James 200
Output
Butch Cassidy Emmett Dalton Jesse James

Validator 2 Validator
Input
3 Dan 1 Din 3 Don -2
Output
Dan Din

The good, the bad and you Test
Input
2 Blondie 20 Angel Eyes 25
Output
Blondie Angel Eyes

Validator 3 Validator
Input
2 B 50 A E 60
Output
B A E

Where are they ? Test
Input
0
Output
NONE

Validator 4 Validator
Input
0
Output
NONE

The Legend Test
Input
1 Jack Beauregard -1
Output
NONE

Validator 5 Validator
Input
1 A B -1
Output
NONE

Solution language

Solution

Stub generator input