Gahui and the 4-Hour Wall 1
InterviewTime limit1sMemory limit512 MB
Given the rail time S and flight time F from station a to station b, decide which mode people take, where flights are chosen only when strictly faster.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
The 4-hour wall is the tendency for high speed rail to win on routes where it takes 4 hours or less, and for flights to win otherwise. When people travel from station to station , they take a flight if it takes less time than high speed rail. Otherwise, they take high speed rail.
Taking high speed rail from station to station takes minutes. Taking a flight from station to station takes the sum of the following:
- The time to travel from station to airport
- The time to travel from airport to airport , which is minutes
- The time to travel from airport to station
Tell which transportation mode people use more when they travel from station to station . Travel time between airports and stations is ignored.
Input
The first line contains , as described in the problem.
The second line contains , as described in the problem.
Output
If people use high speed rail more when traveling from station to station , print high speed rail. Otherwise, print flight.
Constraints
All travel times are at least minute and at most minutes.