test.cpp

an anonymous user · August 30, 2022
#include <bits/stdc++.h>
using namespace std;

void solve(){
    int n;
    cin>>n;
    vector<int> arr(n);
    for(int i=0;i<n;i++){
        cin>> arr[i];
    }
    sort(arr.begin(),arr.end());
    for(auto it: arr){
        cout << it<< "-";
    }
    cout << endl;
}
int main() {
    int t;
    cin>>t;
    while(t--){
        solve();
    }
    return 0;
}
Output

Comments

Please sign up or log in to contribute to the discussion.