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:大家帮我看看,为什么总是runtime error?

Posted by 200711010136 at 2008-08-05 10:30:34 on Problem 2182
In Reply To:大家帮我看看,为什么总是runtime error? Posted by:zrl at 2006-05-22 19:02:31
> #include<stdio.h>  //lost cows
> main()
> {int a[50],b[50],i,n,t,j,c[50],m=0;
> scanf("%d",&n);
>       for(i=1;i<=n-1;i++)
>         scanf("%d",&b[i]);
>       for(i=1;i<=(n-1)/2;i++)
> 		  {t=b[i];
>            b[i]=b[n-i];
>            b[n-i]=t;}
>      for(i=1;i<=n;i++)
> 	  a[i]=i;
> 	  for(i=1;i<=n;i++)
> 		{for(j=1;j<b[i]+1;j++);
>          c[m]=a[j];m++;
>          for(;j<=n;j++)
>          a[j]=a[j+1];
> 	  }
> for(m=n-1;m>=0;m--)
> printf("%d\n",c[m]);
> }
> 
> 
> 一般都什么情况下出现
> runtime error这种情况阿?
> 谢谢

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