답안 #961103

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
961103 2024-04-11T13:53:40 Z The_Cryptic_TG A Plus B (IOI23_aplusb) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#define loop(g, t) for (ll g{}; g < t; g++)
#define loop1(g, t) for (ll g{1}; g <= t; g++)
#include <set>
#define ll long long
using namespace std;
vector<ll> smallest_sums(ll n, vector<ll> a, vector<ll> b)
{
	std::multiset<ll> s;
        loop1(i, n)
        {
            loop(j, n / i)
            {
                s.insert(a[i - 1] + b[j]);
            }
        }
        auto it = s.begin();
        ll k = n;
        std::vector <ll> ans;
        while (k--)
        {
            ans.push_back(*it);
            it++;
        }
        return ans;
}

Compilation message

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