1234567891011121314151617181920212223242526272829303132 |
- #include<algorithm>
- #include<iostream>
- using namespace std;
- int main()
- {
- int N;
- int *digs;
- int n;
- while (cin >> N && N) {
- for (int times = 0; times < N; times++) {
- cin >> n;
- digs = new int[n];
- for (int i = 0; i < n; i++) {
- cin >> digs[i];
- }
- sort(digs, digs + n);
- for (int i = 0; i < n; i++) {
- cout << digs[i];
- if (i != (n-1))
- {
- cout << " ";
- }
- }
- cout << endl;
- free(digs);
- }
- }
- return 0;
- }
|