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

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

Posted by tom31203120 at 2009-08-17 19:36:46 on Problem 1083 and last updated at 2009-08-17 19:38:10
In Reply To:过了discus提供的所有数据还wa 了 帮忙看看吧 !!! Posted by:tom31203120 at 2009-08-17 18:28:10
> #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;
> }
    
> 			if(a>b)a=a+b-(b=a);/* 终于找到错误了,这句有问题,不一定成功,有的编译器可以,以后慎用,(坚决不用了!!!!!!)*/

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