#include "aplusb.h"
#include <set>
#include <pair>
std::vector<int> smallest_sums(int N, std::vector<int> A, std::vector<int> B) {
std::set<std::pair<int,int>,[](auto a,auto b){return A[a.first]+B[a.second]<A[b.first]+B[b.second];}> q;
std::vector<int> out;
q.emplace(0,0);
while(out.size()<N)
{
auto[a,b] = *out.begin();
out.push(A[a]+B[b]);
out.erase(out.begin());
if(a+1<N) out.emplace(a+1,b);
if(b+1<N) out.emplace(a,b+1);
}
return out;
}
Compilation message
aplusb.cpp:3:10: fatal error: pair: No such file or directory
3 | #include <pair>
| ^~~~~~
compilation terminated.