Submission #370652

#TimeUsernameProblemLanguageResultExecution timeMemory
370652Bill_00Gap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include "gap.h" #include <bits/stdc++.h> #define N 100005 typedef long long ll; using namespace std; ll a[N]; long long findGap(int T, int n) { ll m1=0,m2=1e18,ans=0; if(T==1){ for(int i=1;i<=(n+1)/2;i++){ MinMax(m1,m2,&mn,&mx); a[i]=mn; a[n+1-i]=mx; m1=mn+1; m2=mx-1; } for(int i=1;i<n;i++){ ans=max(ans,a[i+1]-a[i]); } return ans; } return 0; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:12:18: error: 'mn' was not declared in this scope; did you mean 'm2'?
   12 |    MinMax(m1,m2,&mn,&mx);
      |                  ^~
      |                  m2
gap.cpp:12:22: error: 'mx' was not declared in this scope; did you mean 'm2'?
   12 |    MinMax(m1,m2,&mn,&mx);
      |                      ^~
      |                      m2