# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
961096 | 2024-04-11T13:44:57 Z | The_Cryptic_TG | A Plus B (IOI23_aplusb) | C++17 | 0 ms | 0 KB |
#include <bits/stdc++.h> #define ll long long vector<ll> smallest_sums(ll n, vector<ll> a, vector<ll> b) { multiset<ll> s; loop1(i, n) { loop(j, n / i) { s.insert(a[i - 1] + b[j]); } } auto it = s.begin(); ll k = n; vector <ll> ans; while (k--) { ans.push_back(*it); it++; } return ans; }