Submission #404958

#TimeUsernameProblemLanguageResultExecution timeMemory
404958enerelt14Gap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; long long findGap(int T,int N){ if (T==1){ long long l[N], r[N]; long long res=0; MinMax(0, 1e18, &l[1], &r[1]); for (int i=2;i<=(n+1)/2;i++){ MinMax(l[i-1], r[i-1], &l[i], &r[i]); res=max(res, max(l[i]-l[i-1], r[i]-r[i-1])); } return res; } }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:7:3: error: 'MinMax' was not declared in this scope
    7 |   MinMax(0, 1e18, &l[1], &r[1]);
      |   ^~~~~~
gap.cpp:8:20: error: 'n' was not declared in this scope
    8 |   for (int i=2;i<=(n+1)/2;i++){
      |                    ^
gap.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
      | ^