Submission #1067229

# Submission time Handle Problem Language Result Execution time Memory
1067229 2024-08-20T13:14:52 Z ChericMAC A Plus B (IOI23_aplusb) C++17
Compilation error
0 ms 0 KB
#include <aplusb.h>
#include <queue>
#include <algorithm>
using namespace std;

vector<int> smallest_sums(int N, vector<int> A, vector<int> B) {
    priority_queue<int, vector<int>, greater<int>> C;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < N - i; j++) {
            C.push(A[j] + B[i]);
        }
    }
    vector<int> result(N);
    for (int i = 0; i < N; i++) {
        result[i] = priority_queue.top()
        priority_queue.pop()
    }
    return result;
}

Compilation message

aplusb.cpp: In function 'std::vector<int> smallest_sums(int, std::vector<int>, std::vector<int>)':
aplusb.cpp:15:35: error: missing template arguments before '.' token
   15 |         result[i] = priority_queue.top()
      |                                   ^