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 |
大家能帮我看看么?怎么会WA?谢过~#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); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator