Submission #406346

#TimeUsernameProblemLanguageResultExecution timeMemory
406346p_squareGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "gap.h" #define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define ll long long #define mp make_pair #define se second #define fi first using namespace std; ll findGap(ll t, ll n) { ll a[n]; ll l = 0, r = 1e18+1; ll ptr1, ptr2; for(int i = 0; 2*i<n; i++) { MinMax(l, r, &ptr1, &ptr2); a[2*i] = ptr1; if(2*i < n-1) a[2*i+1] = ptr2; l = ptr1 + 1; r = ptr2 - 1; } sort(a, a+n); ll ma = 0; for(int i = 1; i<n; i++) { ma = max(ma, a[i]-a[i-1]); } return ma; }

Compilation message (stderr)

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