Submission #1083345

# Submission time Handle Problem Language Result Execution time Memory
1083345 2024-09-03T02:31:57 Z dong_gas Gap (APIO16_gap) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include "gap.h"
 
using namespace std;
using ll = long long;
 
ll a[100201];
 
ll findGap(ll T, ll n) {
    ll l = 1, r = n, mn, mx;
    ll low = 0, high = 1e18;
    while (l < r) {
        MinMax(low, high, &mn, &mx);
        a[l++] = mn, a[r--] = mx;
        low = mn + 1, high = mx - 1;
    }
    if (l == r) {
        MinMax(low, high, &mn, &mx);
        a[l] = mn;
    }
    ll ret = 0;
    for (int i = 2; i <= n; i++) ret = max(ret, a[i] - a[i - 1]);
    return ret;
}

Compilation message

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