시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 1 | 1 | 1 | 100.000% |
Nili bank provides banking services to its customers throughout the country. In each of their branches they have multiple tellers (cashier) that provide deposit or withdraw services to customers. Each teller has a queue of customers that are waiting for depositing or withdrawing money from their account through the teller. The bank records customer, the time they stand in queue (or processed), and teller information.
With the information in their hand, bank want to know which tellers were the busiest and what is their peak time frame during the day.
Write a program that receive the records for a single day as input and print the top three busiest tellers and their peak time frame.
First N lines (N < 10000) contains the records for a single day.
Print top 3 busiest tellers, total number of customer they have processed in a day and his/her peak time frames (in hours); each teller in one line.
T01 CUST01 08:18:55AM T01 CUST03 08:20:00AM T01 CUST01 08:22:00AM T01 CUST02 08:20:23AM T01 CUST02 08:25:17AM T01 CUST03 08:27:50AM T01 CUST04 10:07:46AM T01 CUST04 10:19:21AM T02 CUST05 10:40:11AM T02 CUST06 10:40:18AM T02 CUST05 10:44:30AM T02 CUST06 10:46:44AM T03 CUST07 02:18:55PM T03 CUST08 02:19:00PM T03 CUST07 03:19:10PM T03 CUST08 03:21:27PM T03 CUST09 03:26:19PM T03 CUST09 03:29:59PM T04 CUST10 11:13:34AM T04 CUST10 ENDOFINPUT
T01 4 08AM T03 3 03PM T02 2 10AM
There are four tellers, and ten customers in this case.
So, the teller with most processed customer is T01 with four customers, T03 is the second most busiest teller with three customers, and then T02 that processed two.
Customer 01 (CUST01) stands in the teller 01 (T01) queue at [T01 CUST01 08:18:55AM], and was processed at [T01 CUST01 08:22:00AM]