Advertisement

PAT 甲级 1016 Phone Bills/电话账单(大型模拟题+小型前缀和求解)

阅读量:

1016 Phone Bills/电话账单

A long-distance telephone company charges its customers by the following rules:

Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When a customer starts connecting a long-distance call, the time will be recorded, and so will be the time when the customer hangs up the phone. Every calendar month, a bill is sent to the customer for each minute called (at a rate determined by the time of day). Your job is to prepare the bills for each month, given a set of phone call records.

Input Specification:

全部评论 (0)

还没有任何评论哟~