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

16735번 - Congestion Charging Zone 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB193887843.575%

문제

Tehran municipality has set up a new charging method for the Congestion Charging Zone (CCZ) which controls the passage of vehicles in Tehran’s high-congestion areas in the congestion period (CP) from 6:30 to 19:00. There are plate detection cameras inside or at the entrances of the CCZ recording vehicles seen at the CCZ. The table below summarizes the new charging method.

The first time seen in the CP The last time seen in the CP Charge
6:30 to 10:00 6:30 to 16:00 24000
6:30 to 10:00 16:01 to 19:00 36000
10:01 to 16:00 10:01 to 16:00 16800
10:01 to 19:00 16:01 to 19:00 24000

Note that the first time and the last time that a vehicle is seen in the CP may be the same. Write a program to compute the amount of charge of a given vehicle in a specific day.

입력

The first line of the input contains a positive integer n (1 ≤ n ≤ 100) where n is the number of records for a vehicle. Each of the next n lines contains a time at which the vehicle is seen. Each time is of form <hour>:<minute>, where <hour> is an integer number between 0 and 23 (inclusive) and <minute> is formatted as an exactly two-digit number between 00 and 59 (inclusive).

출력

Print the charge to be paid by the owner of the vehicle in the output.

제한

예제 입력 1

4
7:30
2:20
7:30
17:30

예제 출력 1

36000

예제 입력 2

1
12:13

예제 출력 2

16800

예제 입력 3

2
0:30
23:30

예제 출력 3

0

힌트

출처

ICPC > Regionals > Asia West Continent > Iran > Tehran Site 2018 I번

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

출처

대학교 대회

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

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