# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1065478 | aagii | A Plus B (IOI23_aplusb) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define harderahhh ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace std;
ll x, l, y, t, z, hp, sus1, sus2, g, sus, bruh1, bruh2, dog1, h, dog2, dog, i, p, j, q, m, a[696969], b[696969], c[696969], x1[696969], x2[696969], n, k, d[696969], joy[1005][1005];
string s1, s2, s3, s4, s5, s6, s7, s8, s9, rep1, rep2, rep, s, hsr[696969];
char c1, c2, oon, hi[5][200005], na[1005][1005], cc[696969];
pair <ll, ll> goku[696969];
map <ll, ll> mm;
vector <ll> gl;
set <ll> wow;
bool aa[696969];
int main() {
harderahhh;
// cin >> n;
// while (n--) {
cin >> k;
for (i = 1; i <= k; i++) {
cin >> a[i];
}
for (i = 1; i <= k; i++) {
cin >> b[i];
}
x=1;
for (i = 1; i <= k; i++) {
for (j = 1; j <= k; j++) {
c[x] = a[i]+b[j];
x++;
}
}
sort (c+1, c+x);
for (i = 1; i <= k; i++) {
cout << c[i] << " ";
}
// }
return 0;
}