Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 12304 Accepted Submission(s): 4226
(注意临界值!!!)
#include<stdio.h> #include<string.h> int main() { int count[205]; int end,begin; int T,n; int temp,i; int max; scanf("%d",&T); while(T--) { memset(count,0,sizeof(count)); scanf("%d",&n); while(n--) { scanf("%d %d",&begin,&end); if(begin>end) {temp=begin;begin=end;end=temp;} for(i=(begin+1)/2;i<=(end+1)/2;i++) { count[i]++; } } max=0; for(i=1;i<=202;i++) { if(max<count[i]){max=count[i];} } printf("%d\n",10*max); } }
原文:http://www.cnblogs.com/renqiqiang/p/5308598.html