OJ-Problems-Source/HDOJ/1040_autoAC.cpp

24 lines
366 B
C++
Raw Normal View History

2016-08-12 10:14:21 +08:00
#include <iostream>
#include <algorithm>
using namespace std;
int main ()
{
int t, n, i;
int *d;
cin >> t;
while (t--) {
cin >> n;
d = (int *)malloc(sizeof(int)*n);
for (i = 0; i < n; i++) {
cin >> d[i];
}
sort (d, d+n);
cout << d[0];
for (i = 1; i < n; i++) {
cout << " " << d[i];
}
cout << endl;
}
return 0;
}