| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1358022 | po_rag526 | A Plus B (IOI23_aplusb) | C++20 | 0 ms | 0 KiB |
/*
TASK: A Plus B
LANG: CPP
AUTHOR: PeaTT~
*/
#include "aplusb.h"
#include <bits/stdc++.h>
vector<int> smallest_sums(int N, std::vector<int> A, std::vector<int> B) {
vector<int> dp;
for(int i = 0; i < N; i++)
for(int j = 0; (i + 1) * (j + 1) <= N; j++)
dp.push_back(A[i] + B[j]);
sort(dp.begin(), dp.end());
vector<int> ans;
for(int i = 0; i < N; i++)
ans.push_back(dp[i]);
return ans;
}
