Submission #182410

#TimeUsernameProblemLanguageResultExecution timeMemory
182410AQTGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; long long arr[100005]; long long findGap(int T, int N){ int l = 1, r = N; long long lstl = 0, lstr = 1000000000000000000LL; while(l <= r){ MinMax(lstl+1, lstr-1, &lstl, &lstr); arr[l] = lstl, arr[r] = lstr; l++, r--; } long long ans = 0; for(int i = 2; i<=N; i++){ ans = max(ans, arr[i]-arr[i-1]); } return ans; } int main(){ }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:11:9: error: 'MinMax' was not declared in this scope
         MinMax(lstl+1, lstr-1, &lstl, &lstr);
         ^~~~~~
gap.cpp:11:9: note: suggested alternative: 'rindex'
         MinMax(lstl+1, lstr-1, &lstl, &lstr);
         ^~~~~~
         rindex