标签:memset string include style sizeof color amp while nbsp
1 #include<stdio.h> 2 #include<string.h> 3 int a[200]; 4 int main() 5 { 6 int n,m; 7 scanf("%d",&n); 8 while(n--) 9 { 10 int day,sr,fn; 11 scanf("%d",&m); 12 memset(a,0,sizeof a); 13 while(m--) 14 { 15 scanf("%d%d%d",&day,&sr,&fn); 16 for(int i=sr; i<sr+fn; ++i) 17 a[i]+=day; 18 } 19 int maxa=a[1]; 20 for(int i=2; i<200; ++i) 21 if(maxa<a[i]) 22 maxa=a[i]; 23 printf("%d\n",maxa); 24 } 25 }
标签:memset string include style sizeof color amp while nbsp
原文地址:http://www.cnblogs.com/qq188380780/p/6344745.html