标签:acm
Description
Input
Output
Sample Input
2 3 2 1 3 9 1 4 7 2 5 8 3 6 9
Sample Output
1 2 3 1 2 3 4 5 6 7 8 9
#include <iostream> #include <algorithm> using namespace std; int main() { int a[1010],i,n,m; cin >> n; while (n--) { cin >> m; for (i=0;i<m;i++) { cin >> a[i]; } sort(a,a+m); for (i=0;i<=m-1;i++) { cout << a[i]; if (i<m-1) { cout << " "; } } cout << endl; } return 0; }
标签:acm
原文地址:http://blog.csdn.net/zsc2014030403015/article/details/43484527