标签:
1 #include<cstdio> 2 int main() 3 { 4 int t,n,i,j,h1,h2,m1,m2,p; 5 scanf("%d",&t); 6 while(t--) 7 { 8 int b[10000]={0}; 9 int max=0; 10 scanf("%d",&n); 11 for(i=0;i<n;i++) 12 { 13 scanf("%d %d:%d %d:%d",&p,&h1,&m1,&h2,&m2); 14 h1=h1*60+m1; 15 h2=h2*60+m2; 16 for(j=h1;j<h2;j++) 17 { 18 b[j]+=p; 19 max=max>b[j]?max:b[j]; 20 } 21 } 22 printf("%d\n",max); 23 24 } 25 }
杭电 4883 TIANKENG’s restaurant (求饭店最少需要座椅)
标签:
原文地址:http://www.cnblogs.com/yexiaozi/p/5697046.html