标签:while ota 输出 rip acm for sam can turn
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 122510 Accepted Submission(s): 50550
1 #include<stdio.h> 2 int main() 3 { 4 int n,a[101],i,temp,m,j; 5 while(~scanf("%d%d",&n,&m)&&n&&m) 6 { 7 for(i=0;i<n;i++) 8 scanf("%d",&a[i]); 9 a[i]=m; 10 for(i=0,j=n;i<n+1;i++) 11 if(a[i]>a[j]) 12 { 13 temp=a[i]; 14 a[i]=a[j]; 15 a[j]=temp; 16 } 17 printf("%d",a[0]); 18 for(i=1;i<=n;i++) 19 printf(" %d",a[i]); 20 printf("\n"); 21 } 22 return 0; 23 }
标签:while ota 输出 rip acm for sam can turn
原文地址:https://www.cnblogs.com/lightice/p/10261275.html