Submission #106761

# Submission time Handle Problem Language Result Execution time Memory
106761 2019-04-20T10:20:05 Z brcode Gap (APIO16_gap) C++14
Compilation error
0 ms 0 KB
#include <iostream>
#include "gap.h"
using namespace std;
const int MAXN = 1e6+5;
long long arr[MAXN];
long long findgap(int T,int N){
    long long a = 1;
    long long b = 1e18;
    long long l = 0;
    long long r = N-1;
    long long mn,mx;
    long long total = 0;
    while(total<N){
        MinMax(a, b, &mn, &mx);
        arr[l] = mn;
        arr[r] = mx;
        l++;
        r--;
        total+=2;
        a = mn+1;
        b = mx-1;
    }
    long long diff = 0;
    for(long long i=0;i<N-1;i++){
        diff = max(diff,arr[i+1]-arr[i]);
    }
    return diff;
}

Compilation message

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