标签:des style blog http java color os strong
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4883
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)
Total Submission(s): 566 Accepted Submission(s): 267
---------------------------------------------------------------------
1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 int main() 6 { 7 int str[1445]; 8 int n,m,i,j,k,t,num,hh1,hh2,mm1,mm2; 9 scanf("%d",&n); 10 while(n--) 11 { 12 memset(str,0,sizeof(str)); 13 scanf("%d",&m); 14 for(i=0;i<m;i++) 15 { 16 scanf("%d %d:%d %d:%d",&num,&hh1,&mm1,&hh2,&mm2); 17 hh1=hh1*60+mm1; 18 hh2=hh2*60+mm2; 19 str[hh1]+=num; 20 str[hh2]-=num;//printf("%d%d^^",str[hh1],str[hh2]); 21 } 22 int maxx=0,cas=0; 23 for(i=0;i<=1440;i++) 24 { 25 cas+=str[i]; 26 if(cas>maxx) 27 { 28 maxx=cas; 29 } 30 } 31 printf("%d\n",maxx); 32 } 33 return 0; 34 }
标签:des style blog http java color os strong
原文地址:http://www.cnblogs.com/ccccnzb/p/3875014.html