제출 #1104599

#제출 시각아이디문제언어결과실행 시간메모리
1104599NonozeA + B (IOI24_aplusb)C++17
컴파일 에러
0 ms0 KiB
#include "aplusb.h" #include <bits/stdc++.h> using namespace std; #define sz(x) (int)(x.size()) #define debug(x) cerr << (#x) << ": " << (x) << endl #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() vector<int> smallest_sums(int N, vector<int> A, vector<int> B) { int n=N; auto a=A, b=B; priority_queue<tuple<int, int, int>, vector<tuple<int, int, int>>, greater<>> pq; for (int i=0; i<n; i++) pq.push({a[i] + b[0], i, 0}); vector<int> ans; while (sz(ans)<n) { int val, x, y; tie(val, x, y)=pq.top(); pq.pop(); ans.push_back(val); if (y+1<n) pq.push({a[x]+b[y+1], x, y+1}); } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccFlbmxA.o: in function `main':
grader.cpp:(.text.startup+0x161): undefined reference to `sum(int, int)'
collect2: error: ld returned 1 exit status