竟然暴力1.44*10^7  还要*T=100  竟然过了

 1 #include<cstdio>
 2 #include<cstring>
 3 #include<algorithm>
 4 #define mt(a,b) memset(a,b,sizeof(a))
 5 using namespace std;
 6 const int M=1450;
 7 int sum[M];
 8 int main(){
 9     int t,n;
10     while(~scanf("%d",&t)){
11         while(t--){
12             scanf("%d",&n);
13             mt(sum,0);
14             while(n--){
15                 int add,sx,sy,ex,ey;
16                 scanf("%d %d:%d %d:%d",&add,&sx,&sy,&ex,&ey);
17                 sx=sx*60+sy+1;
18                 ex=ex*60+ey;
19                 for(int i=sx;i<=ex;i++) sum[i]+=add;
20             }
21             int big=0;
22             for(int i=0;i<M;i++){
23                 big=max(big,sum[i]);
24             }
25             printf("%d\n",big);
26         }
27     }
28     return 0;
29 }
View Code

相关文章:

  • 2021-10-03
  • 2021-12-12
  • 2021-05-21
  • 2021-07-19
  • 2021-10-22
  • 2021-10-22
  • 2021-08-18
  • 2021-07-29
猜你喜欢
  • 2021-12-30
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2021-09-28
  • 2021-07-17
相关资源
相似解决方案