标签:des style blog color io java strong for 数据
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 46658 Accepted Submission(s):
20141
1 #include<cstdio> 2 int main() 3 { 4 int n,m,a[100]={0}; 5 while(scanf("%d%d",&n,&m)!=EOF) 6 { 7 if(n==0&&m==0)return 0; 8 for(int i=0;i<n;i++)scanf("%d",&a[i]); 9 a[n]=m; 10 for(int i=0;i<n;i++) 11 for(int j=i+1;j<=n;j++) 12 if(a[i]>a[j]){m=a[i];a[i]=a[j];a[j]=m;} 13 14 for(int i=0;i<n;i++)printf("%d ",a[i]); 15 printf("%d\n",a[n]); 16 } 17 }
标签:des style blog color io java strong for 数据
原文地址:http://www.cnblogs.com/The-courage-that-year/p/3998962.html