aplusb.cpp: In function 'std::vector<int> smallest_sums(int, std::vector<int>, std::vector<int>)':
aplusb.cpp:5:30: error: lambda-expression in template-argument only available with '-std=c++2a' or '-std=gnu++2a'
5 | std::set<std::pair<int,int>,[](auto a,auto b){return A[a.first]+B[a.second]<A[b.first]+B[b.second];}> q;
| ^
aplusb.cpp:5:102: error: template argument 2 is invalid
5 | std::set<std::pair<int,int>,[](auto a,auto b){return A[a.first]+B[a.second]<A[b.first]+B[b.second];}> q;
| ^
aplusb.cpp:7:6: error: request for member 'emplace' in 'q', which is of non-class type 'int'
7 | q.emplace(0,0);
| ^~~~~~~
aplusb.cpp:8:20: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
8 | while(out.size()<N)
| ~~~~~~~~~~^~
aplusb.cpp:10:11: error: cannot decompose non-array non-class type 'int'
10 | auto[a,b] = *out.begin();
| ^~~~~
aplusb.cpp:11:11: error: 'class std::vector<int>' has no member named 'push'
11 | out.push(A[a]+B[b]);
| ^~~~