#K60627. Minimum Number of Platforms
Minimum Number of Platforms
Minimum Number of Platforms
You are given two lists of time stamps representing the arrivals and departures of trains at a station. Each time stamp is in the format HH:MM
(24-hour clock). Your task is to calculate the minimum number of platforms required so that no train has to wait.
The conversion from a time string to minutes past midnight can be expressed as:
Note: You must read input from stdin
and write the result to stdout
.
inputFormat
The input consists of three lines:
- An integer
n
representing the number of trains. n
space-separated strings representing the arrival times.n
space-separated strings representing the departure times.
outputFormat
Output a single integer which is the minimum number of platforms required so that no train waits.
## sample5
09:00 09:20 09:25 09:40 10:00
09:10 09:30 09:35 09:50 10:10
2