Submission #344021

#TimeUsernameProblemLanguageResultExecution timeMemory
344021milleniumEeeeGap (APIO16_gap)C++17
Compilation error
0 ms0 KiB
#include "gap.h" #include "grader.cpp" #include <bits/stdc++.h> #define ll long long using namespace std; //MinMax(long long s, long long t, long long *mn, long long *mx) const int INF = (int)1e18; const int MAXN = (int)1e5 + 5; ll a[MAXN]; long long findGap(int type, int n) { ll mn, mx; MinMax(0, INF, &mn, &mx); int l = 1, r = n; a[l] = mn; a[r] = mx; l++, r--; while (l <= r) { if (l != r) { MinMax(mn + 1, mx - 1, &mn, &mx); a[l] = mn; a[r] = mx; } else { MinMax(mn + 1, mx - 1, &mn, &mx); a[l] = mn; } l++, r--; } ll ans = 0; for (int i = 1; i < n; i++) { ans = max(ans, a[i + 1] - a[i]); } return ans; }

Compilation message (stderr)

/tmp/ccwYLjm8.o: In function `MinMax(long long, long long, long long*, long long*)':
grader.cpp:(.text+0x0): multiple definition of `MinMax(long long, long long, long long*, long long*)'
/tmp/ccolW7vU.o:gap.cpp:(.text+0x1b0): first defined here
/tmp/ccwYLjm8.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccolW7vU.o:gap.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status