Submission #109291

#TimeUsernameProblemLanguageResultExecution timeMemory
109291b2563125Gap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include<iostream> #include<algorithm> #include<vector> using namespace std; #define int long long #define vel vector<long long> #define rep(i,n) for(int i=0;i<n;i++) int pr = 1000000007; int ref(int &a) { a = a % pr; a += pr; a = a % pr; return a; } int findGap(int t, int n) { vel a(n); int mn = 0; int mx = (pr - 7); mx *= mx; rep(i, (n + 1) / 2) { MinMax(mn, mx, &mn, &mx); a[i] = mn; a[n - 1 - i] = mx; mn++; mx--; } int ans = 0; rep(i, n - 1) { ans = max(ans, a[i + 1] - a[i]); } return ans; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(long long int, long long int)':
gap.cpp:20:3: error: 'MinMax' was not declared in this scope
   MinMax(mn, mx, &mn, &mx);
   ^~~~~~