| ||||||||||
| 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 | |||||||||
Re:过了discus提供的所有数据还wa 了 帮忙看看吧 !!!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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator