-
Notifications
You must be signed in to change notification settings - Fork 186
Expand file tree
/
Copy patha.cc
More file actions
26 lines (24 loc) · 648 Bytes
/
a.cc
File metadata and controls
26 lines (24 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// https://codeforces.com/contest/1305/problem/A
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = tuple<int, int>;
using vi = vector<ll>;
using vii = vector<ii>;
using vvi = vector<vi>;
using si = set<ll>;
int main() {
cin.tie(0), ios::sync_with_stdio(0);
ll n, t;
cin >> t;
while (t--) {
cin >> n;
vi a(n), b(n);
for (int i = 0; i < n; i++) cin >> a[i];
for (int i = 0; i < n; i++) cin >> b[i];
sort(a.begin(), a.end());
sort(b.begin(), b.end());
for (int i = 0; i < n; i++) cout << a[i] << " \n"[i == n-1];
for (int i = 0; i < n; i++) cout << b[i] << " \n"[i == n-1];
}
}