Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
过了discus提供的所有数据还wa 了 帮忙看看吧 !!!#include<iostream> using namespace std; int v[410]; int main() { //freopen("ooo.txt","w",stdout); int i,t,m,a,b; scanf("%d",&t); while(t--){ memset(v,0,sizeof(v)); scanf("%d",&m); while(m--){ scanf("%d%d",&a,&b); a=a+(a&1); b=b+(b&1); if(a>b)a=a+b-(b=a); for(i=a;i<=b;i+=2){ v[i]++; } } int max=0; for(i=2;i<=400;i+=2){if(max<v[i])max=v[i];} printf("%d\n",max*10); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator