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 |
求教!为什么总是Output Limit Exceeded(C代码)#include<stdio.h> int maopao(int n,int a[]) { int i,j,temp; for(i=0;i<9;i++) for(j=i+1;j<10;j++) if(a[j]<a[i]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } int main() { int n,a[10],i,j,sum=0,m,next,temp,max=0; scanf("%d",m); while(m--){ for(i=1;i<=m;i++) { scanf("%d",&n); for(i=0;i<10;i++) scanf("%d",&a[i]); maopao(n,a); printf("%d %d\n",n,a[7]); m--; } } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator