제출 #1066892

#제출 시각아이디문제언어결과실행 시간메모리
1066892MunkhErdeneA Plus B (IOI23_aplusb)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#define ll long long
using namespace std;
#define no cout<<"NO"<<endl
#define yes cout<<"YES"<<endl
const ll mod=998244353;
int *solve(int n, int arr1[100'000], int arr2[100'000]){
	sort(arr1, arr1+n);
    sort(arr2, arr2+n);
    int g=0;
    int h=0;
	int* result = new int[100'000];
    for(int i=0 ; i<n ; i++){
		result[i]=arr1[g]+arr2[h];
        if(arr1[g+1]+arr2[h]>arr1[g]+arr2[h+1]){
            h++;
        }
        else{
            g++;
        }
    }
	return result;
}

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

/usr/bin/ld: /tmp/ccBdPHUY.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