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

题目信息: 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…
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…
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&…
复建的第一题 理解题意 读懂题目就是一个活,所以我们用观察输出法,可以看出来月份,以及时间和费用之间的关系. 定义过程 然后时间要用什么来记录呢?day hour minute 好麻烦呀..用字符串吧也可以比较大小的 看到这种结果分组的(就像是数据库里面group by之后的结果)就想到用map<string,xxx> 在这道题里面,xxx就是个容器里面存放了打电话挂电话的时间戳, 这个时间戳应该是用结构体的定义,首先需要是电话或者挂电话的时间点,还有这个时间点转化为的数字,以及状态. 题意延…
分析: 模拟题,提交无数次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…
简单模拟题. #include<iostream> #include<cstring> #include<cmath> #include<algorithm> #include<cstdio> #include<map> #include<queue> using namespace std; ]; int n; struct X { string name; int dd,hh,mm,len,f; }s[],ans[];…
博主欢迎转载,但请给出本文链接,我尊重你,你尊重我,谢谢~http://www.cnblogs.com/chenxiwenruo/p/6789229.html特别不喜欢那些随便转载别人的原创文章又不给出链接的所以不准偷偷复制博主的博客噢~~ 给出一天24小时内,每个小时内,每分钟的通话费用给出n个记录,on-line表示通话的开始,off-line表示通话的结束如果on-line/off-line没有对应的另一个,忽略即可 先按人名排序,名称一样的按时间排序,这里时间统一按分钟来算,即一天有24…