标签:
1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "algorithm" 5 using namespace std; 6 int ans[110], n; 7 8 int main() 9 { 10 int i; 11 scanf("%d", &n); 12 for(i = 1; i <= n; ++i) 13 scanf("%d", &ans[i]); 14 sort(ans + 1, ans + 1 + n); 15 printf("%d", ans[1]); 16 for(i = 2; i <= n; ++i) 17 printf(" %d", ans[i]); 18 printf("\n"); 19 }
标签:
原文地址:http://www.cnblogs.com/AC-Phoenix/p/4299066.html