http://tjuacm.chaosheng.top/problem.php?id=1248
AC
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <queue> using namespace std; const int N = 1000; int num[N]; int main(){ int n, m, t; cin >> t; while(t--){ cin >> m >> n; memset(num, 0, sizeof(num)); for(int i = 0; i < m+n; i++){ cin >> num[i]; } sort(num, num+m+n); for(int i = 0; i < m+n; i++){ cout << num[i] << " "; } cout << endl; } return 0; }