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:大家能帮我看看么?怎么会WA?谢过~In Reply To:大家能帮我看看么?怎么会WA?谢过~ Posted by:fanjunxiang at 2011-01-29 17:15:11 > #include<stdio.h> > > int main() > { > long int i,j,L,M,count; > int Tree[10001]; > scanf("%d %d",&L,&M); > if (L!=0&&M!=0) > { > for (i=0;i<=L;i++) > Tree[i]=1; > for (i=0;i<M;i++) > { > long int Begin,End; > scanf("%d %d",&Begin,&End); > for (j=Begin;j<=End;j++) > Tree[j]=0; > } > count=0; > for (i=0;i<=L;i++) > if (Tree[i]==1) > count++; > printf ("%d\n",count); > } > } integer L (1 <= L < 2000000000) 怎么是Tree[10001]? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator