摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4505题目和1008差不多,只是多了个开门时间,少了停顿时间,用简单哈希就可以解了#include<stdio.h>int main(){ int n,sum,a[120],i,c,x,max; scanf("%d",&c); while(c--) { scanf("%d",&n); for(i=0;i<120;i++) a[i]=0; max=a[0]=0; sum=0; for(i=1;i<=n;i++) { scanf(&q 阅读全文
posted @ 2013-05-16 22:11 执着追求的IT小小鸟 阅读(125) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1234题意是按登记表上的记录输出开门和关门的人,关键在于时间的比较#include<stdio.h>#include<string.h>struct node{ int h,m,s; char name[20]; };int n,m,i,h1,m1,s1,h2,m2,s2;struct node open,close;int qian(){ if(h1<open.h||(h1==open.h&&m1<open.m)||(h1==open.... 阅读全文
posted @ 2013-05-16 20:11 执着追求的IT小小鸟 阅读(137) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1200这题算法简单的解密,一个句子,去掉空格,按n数竖着写下来,然后逐行left-to-right and right-to-left,写成结果,要求你把原来的句子写出来,我的思路的一步一步返回去做,原来看着好像很麻烦,代码一次ac貌似还是蛮简单的#include<stdio.h>#include<string.h>int main(){ int i,j,k,len,n; char s[2010],t[2010][25]; while(scanf("%d",& 阅读全文
posted @ 2013-05-16 19:42 执着追求的IT小小鸟 阅读(173) 评论(0) 推荐(0) 编辑