1016 Phone Bills (25 分)】的更多相关文章

1016 Phone Bills (25 分)   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 connec…
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,…
复建的第一题 理解题意 读懂题目就是一个活,所以我们用观察输出法,可以看出来月份,以及时间和费用之间的关系. 定义过程 然后时间要用什么来记录呢?day hour minute 好麻烦呀..用字符串吧也可以比较大小的 看到这种结果分组的(就像是数据库里面group by之后的结果)就想到用map<string,xxx> 在这道题里面,xxx就是个容器里面存放了打电话挂电话的时间戳, 这个时间戳应该是用结构体的定义,首先需要是电话或者挂电话的时间点,还有这个时间点转化为的数字,以及状态. 题意延…
题意: 输入24个正整数代表从0到23每个小时通话一分钟花费的美分.输入一个正整数N(<=1000),然后输入N组字符串,每个字符串包含客户的名字和通话的时刻以及打出或者挂断的状态. 按照字典序输出用户的名字,(每一段,按行输出)通话时长和花费,以及Total amount. trick: 对于没打通的用户(没有花费),不要输出它的Total amount.(第1,2数据点答案错误原因) AAAAAccepted code: #include<bits/stdc++.h> using n…
题目信息: 1016. Phone Bills (25) 时间限制 400 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, depending…
题目如下: 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…
problem 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-distan…
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,…
题目:https://www.patest.cn/contests/pat-a-practise/1016 思路:用结构体存储,按照名字和日期排序,然后先判断是否有效,然后输出,时间加减直接暴力即可 #include<set> #include<map> #include<queue> #include<algorithm> #include<iostream> #include<cstdio> #include<vector&…
分析: 模拟题,提交无数次WA,注意几点: 1.如果某人没有有效通话记录,则不输出该人的信息,在此WA15次,题目看了N遍也没出现啊. 2.通话时间钱的计算:假设我们计算time1到time2的账单: (1)我们可以采用从起点(即00:00:00)开始计算,结果就是get_money(time2) - get_money(time1), 这样计算方便. (2)我们也可以采用从time1开始递增直到time2, 这样比较烦. 3.有效的通话记录是指:如果某人的通话记录为1.on;2.on;3.of…