Submission #979658

# Submission time Handle Problem Language Result Execution time Memory
979658 2024-05-11T09:33:38 Z canadavid1 A Plus B (IOI23_aplusb) C++17
Compilation error
0 ms 0 KB
#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.