Submission #679159

#TimeUsernameProblemLanguageResultExecution timeMemory
679159tigarGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "gap.h" using namespace std; typedef long long ll; ll mn, mx; ll findGap(int T, int N) { if(T==1) { ll up_bound=LONG_LONG_MAX, low_bound=0; MinMAx(low_bound, up_bound, &mn, &mx); ll a=mn, b=mx; ll razlika=0; while(mn!=-1 and up_bound>=low_bound) { MinMAx(low_bound, up_bound, &mn, &mx); razlika=max(razlika, max(mn-a, b-mx)); low_bound=mn+1; up_bound=mx-1; } return razlika; } }

Compilation message (stderr)

gap.cpp: In function 'll findGap(int, int)':
gap.cpp:15:9: error: 'MinMAx' was not declared in this scope; did you mean 'MinMax'?
   15 |         MinMAx(low_bound, up_bound, &mn, &mx);
      |         ^~~~~~
      |         MinMax
gap.cpp:26:1: warning: control reaches end of non-void function [-Wreturn-type]
   26 | }
      | ^