Submission #1318587

#TimeUsernameProblemLanguageResultExecution timeMemory
1318587khanhphucscratchGap (APIO16_gap)C++20
Compilation error
0 ms0 KiB
#include "gap.h" #include<bits/stdc++.h> #define int long long using namespace std; long long findGap(int T, int n) { vector<int> a; int x = -1, y = 2e18; for(int i = 1; i <= (n+1)/2; i++){ MinMax(x+1, y-1, &x, &y); a.push_back(x); if(x != y) a.push_back(y); } sort(a.begin(), a.end()); int ans = 0; for(int i = 1; i < a.size(); i++) ans = max(ans, a[i] - a[i-1]); return ans; }

Compilation message (stderr)

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