首页 > 技术文章 > PAT 1016 Phone Bills 的坑点

FengZeng666 2020-04-04 17:33 原文

For each test case, all dates will be within a single month. Each on-line record is paired with the chronologically next record for the same customer provided it is an off-line record. Any on-line records that are not paired with an off-line record are ignored, as are off-line records not paired with an on-line record. It is guaranteed that at least one call is well paired in the input. You may assume that no two records for the same customer have the same time. Times are recorded using a 24-hour clock.

 

不是“保证任何一个用户必然有一个能配对的电话记录”而是“所有电话记录里保证至少有一对能匹配”,即可能有用户虽然出现在列表里但实际上没有产生话费,并且未产生话费的用户不能输出。

推荐阅读