1.杭电ACM2016 presentation Error
杭电ACM2016 presentation Error
AC源代码
# include <stdio.h>
int a[] ;
int main ()
{
int i,网网站模拟时钟源码怎么用 n, pos ;
while (~scanf ("%d", &n) && n)
{
for (i = 0 ; i < n ;i++)
scanf ("%d", a+i) ;
for (i = 1, pos = 0 ; i < n ; i++)
if (a[i]<a[pos]) pos = i ;
if (pos != 0)
a[0] ^= a[pos] ^= a[0] ^= a[pos] ;
for (i = 0 ; i < n ;i ++)
{
if (i == 0) printf ("%d", a[i]) ;
else printf (" %d", a[i]) ;
}
puts ("") ;
}
return 0 ;
}