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 |
机上运行没问题但为什么是运行错误。。。。。运行错误时怎么办啊?求大牛们讲下心得。。。谢谢 #include<stdio.h> int main() { int i,j,x,n,m,first,second,point[10001]; while(1) { scanf("%d%d",&n,&m); if(n==0&&m==0)break; for(i=0;i<10001;i++) point[i]=0; first=0; second=0; for(i=0;i<n*m;i++) { scanf("%d",&x); point[x]++; if(point[x]>first) { second=first; first=point[x]; } } for(j=10000;;j--) if(point[j]==second)break; for(i=1;i<j;i++) if(point[i]==second) printf("%d ",i); printf("%d\n",j); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator