| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 961102 | The_Cryptic_TG | 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 "aplusb.h"
#include <iostream>
#include <vector>
#include <bits/stdc++.h>
#define loop(g, t) for (ll g{}; g < t; g++)
#define loop1(g, t) for (ll g{1}; g <= t; g++)
#include <set>
#define ll long long
using namespace std;
std::vector<ll> smallest_sums(ll n, std::vector<ll> a, std::vector<ll> b)
{
std::multiset<ll> s;
loop1(i, n)
{
loop(j, n / i)
{
s.insert(a[i - 1] + b[j]);
}
}
auto it = s.begin();
ll k = n;
std::vector <ll> ans;
while (k--)
{
ans.push_back(*it);
it++;
}
return ans;
}
