# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1088409 | MateiKing80 | 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>
using namespace std;
#define all(x) (x).begin() (x).end()
int* smallest_sums(int n, int a[], int b[])
{
sort(a, a + n);
sort(b, b + n);
vector<int> x;
for(int i = 0; i < n; i ++)
for(int j = 0; j < n / (i + 1); j ++)
x.push_back(a[i] + b[j]);
sort(all(x));
int ans[100005];
for(int i = 0; i < n; i ++)
ans[i] = x[i];
return ans;
}