#K60627. Minimum Number of Platforms

    ID: 31129 Type: Default 1000ms 256MiB

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:

minutes=hours×60+minutesminutes = hours \times 60 + minutes

Note: You must read input from stdin and write the result to stdout.

inputFormat

The input consists of three lines:

  1. An integer n representing the number of trains.
  2. n space-separated strings representing the arrival times.
  3. 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.

## sample
5
09:00 09:20 09:25 09:40 10:00
09:10 09:30 09:35 09:50 10:10
2