Logo
(追記) (追記ここまで)

22246번 - Chairs 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB54332663.415%

문제

In an attempt to predict required number of chairs in the library of the Aglargond School of Magic, Ataranon, school’s principal, ordered writing down the exact times of each person's entry and exit from the library. Write a program that counts the greatest number of people inside the library at one moment of time, if it is known that the total number of people that entered the library is N. Every person entered and exited the library during one day. The second one person enters or leaves the library is also counted as the second that person spent inside.

입력

The first line of input contains number N (0 ≤ N ≤ 1000). Next N lines contain hour, minute and second of entry and hour, minute and second of person’s exit, separated by one space. Times are represented in the format HH:MM:SS where HH represents hours (00 ≤ HH ≤ 23), MM (00 ≤ MM ≤ 59) represents minutes and SS (00 ≤ SS ≤ 59) represents seconds.

출력

The output has exactly one line that contains only the greatest number of people inside the library at one moment.

제한

예제 입력 1

4
08:00:00 10:00:11
09:00:23 14:00:06
11:00:52 13:00:24
11:15:17 13:15:08

예제 출력 1

3

힌트

During the interval between 11:15:17 and 13:00:24 there were three persons inside the library.

출처

Olympiad > Balkan Olympiad in Informatics > Junior Balkan Olympiad in Informatics > JBOI 2007 5번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /