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 |
大家帮我看看,为什么总是runtime error?#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator