Let's Chat ZOJ - 3961】的更多相关文章

地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3961 题目: ACM (ACMers' Chatting Messenger) is a famous instant messaging software developed by Marjar Technology Company. To attract more users, Edward, the boss of Marjar Company, has re…
ACM (ACMers' Chatting Messenger) is a famous instant messaging software developed by Marjar Technology Company. To attract more users, Edward, the boss of Marjar Company, has recently added a new feature to the software. The new feature can be descri…
题目链接 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3961 题意 给出两个人的发消息的记录,然后 如果有两人在连续M天及以上 互发消息,超过几天 加几点 友谊值 最后求 友谊值 思路 先把第一个 连续区间 >= M 的 存下来 然后第二次 输入的时候 去判断. AC代码 #include <cstdio> #include <cstring> #include <ctype.h> #…
题意:给定一个长度为n的序列,A和B两人分别给定一些按递增顺序排列的区间,区间个数分别为x和y,问被A和B同时给定的区间中长度为m的子区间个数. 分析: 1.1 ≤ n ≤ 109,而1 ≤x, y ≤ 100,显然应该枚举区间. 2.具体操作为: (1)id1和id2分别指向A和B的第一个区间,若两区间相交,则求相交区间中长度为m的子区间个数. (2)若A指向的区间右边界<=B指向的区间右边界,则id1++,将A的下一个区间与B的该区间比较,依此类推. 3.求两区间的相交区间:分别取两区间左边…
第十三届浙江省大学生程序设计竞赛 I 题, 一道模拟题. ZOJ  3944http://www.icpc.moe/onlinejudge/showProblem.do?problemCode=3944 In a BG (dinner gathering) for ZJU ICPC team, the coaches wanted to count the number of people present at the BG. They did that by having the waitre…
A Simple Tree Problem Time Limit: 3 Seconds      Memory Limit: 65536 KB Given a rooted tree, each node has a boolean (0 or 1) labeled on it. Initially, all the labels are 0. We define this kind of operation: given a subtree, negate all its labels. An…
公司的OA从零开始进行开发,继简单的单点登陆.角色与权限.消息中间件之后,轮到在线即时通信的模块需要我独立去完成.这三周除了逛网店见爱*看动漫接兼职,基本上都花在这上面了.简单地说就是用MVC4基于长轮询实现(伪)即时通信,利用BootMetro搭建即时聊天系统,同时跨域组件化之后今晚移植到了Azure上方便周末进行第一次迭代的公网测试,地址在http://indreamchat.cloudapp.net/.有兴趣的朋友可以上去送测试数据,剥离了认证登陆,简单地伪装了一个...一个...怎么说,…
First we should know some basic conceptions about network: 1.Every PC is supposed to have its own IP,So we can connent other's PC by WAN.That's just like a ID of netwrok world.   2.But if  every PC has its own IP,Then IPs of this world will be insuff…
这道题目还是简单的,但是自己WA了好几次,总结下: 1.对输入的总结,加上上次ZOJ Problem Set - 1334 Basically Speaking ac代码及总结这道题目的总结 题目要求输入的格式: START X Y Z END 这算做一个data set,这样反复,直到遇到ENDINPUT.我们可以先吸纳一个字符串判断其是否为ENDINPUT,若不是进入,获得XYZ后,吸纳END,再进行输出结果 2.注意题目是一个圆周,所以始终用锐角进行计算,即z=360-z; 3.知识点的误…
放了一个长长的暑假,可能是这辈子最后一个这么长的暑假了吧,呵呵...今天来实验室了,先找了zoj上面简单的题目练练手直接贴代码了,不解释,就是一道简单的密文转换问题: #include <stdio.h> #include <string.h> int main() { char cText[1000]; char start[10]; char end[5]; while(scanf("%s",start)!=EOF&&strcmp(start…