제출 #39589

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

long long findGap(int t,long long n){
    long long l=0,d=n,x=-1,y=1e18+1,a[100002],m=0;
    for(int i=0;i<n;i++){
        a[i]=-1;
    }
    while(y!=-1){
        MinMax(x+1,y-1,&x,&y);
        a[l]=x;
        a[d]=y;
        l++; d++;
    }
    for(int i=1;i<n;i++){
        if(a[i]!=-1 && a[i-1]!=-1 && a[i]-a[i-1]>m) m=a[i]-a[i-1];
    }
    return m;
}

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

/tmp/ccXo8SAV.o: In function `main':
grader.cpp:(.text.startup+0x1ae): undefined reference to `findGap(int, int)'
collect2: error: ld returned 1 exit status