제출 #1323941

#제출 시각아이디문제언어결과실행 시간메모리
1323941aritro_Gap (APIO16_gap)C++20
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#include "gap.h"
using namespace std;

typedef long long ll;
#define int ll
#define pb push_back

//void MinMax(ll s,ll t,ll &mn,ll &mn);

ll findGap(int t,int n){
    ll l=-1,r=1e18 + 1;
    vector<int> a;
    for(int i=0;i<=(n+1)/2;i++){
        MinMax(l+1,r-1,&l,&r);
        a.pb(l);
        if(l!=r) a.pb(r);
    }
    sort(a.begin(),a.end());
    int ans=0;
    for(int i=0;i<n-1;i++) ans=max(ans,a[i+1]-a[i]);
    return ans;
}

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

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