제출 #1326184

#제출 시각아이디문제언어결과실행 시간메모리
1326184hehe축제 (IOI25_festival)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long

vector<int> max_coupons(int a, vector<int> price, vector<int> type){
    int n = price.size();

    sort(price.begin(), price.end());

    int i = 0;
    vector<int> ans;
    while(i < n && a >= price[i]){
        a-= price[i];
        ans.push_back(price[i]);
        i++;
    }

    return ans;
}

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

/usr/bin/ld: /tmp/cc020vy5.o: in function `main':
grader.cpp:(.text.startup+0x22a): undefined reference to `max_coupons(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status