# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1067157 | ChericMAC | 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 <iostream>
#include <algorithm>
using namespace std;
int[] smallest_sums(int N, int[] A, int[B]) {
int[N * N] C;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
c.append(A[i] + b[j])
}
}
sort(C.begin(), C.end());
int[N] result;
for (int i = 0; i < N; i++) {
result.append(C[i]);
}
return result;
}
int main() {
for (int i: smallest_sums(2, [0, 2], [1, 4])) cout << i << " ";
cout << endl;
return 0;
}