Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

过了discus提供的所有数据还wa 了 帮忙看看吧 !!!

Posted by tom31203120 at 2009-08-17 18:28:10 on Problem 1083
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator