Submission #464639

#TimeUsernameProblemLanguageResultExecution timeMemory
464639nickmet2004Gap (APIO16_gap)C++11
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "gap.h" #define ll long long using namespace std; ll findGap(int T , int n){ if(T==1){ ll x =0, y = 1e18,lsx = 0 , lsy = 0 , ANS =0; for(int i = 1; i<= (n + 1) /2; ++i){ Minmax(x , 1e18 , &mn , &mx); ANS = max(ANS , mn - lsx); Minmax(0 , y , &mn , &mx); ANS = max(ANS , y - mx); x = mn + 1; y = mx - 1; } } return ANS; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:9:32: error: 'mn' was not declared in this scope; did you mean 'n'?
    9 |             Minmax(x , 1e18 , &mn , &mx);
      |                                ^~
      |                                n
gap.cpp:9:38: error: 'mx' was not declared in this scope; did you mean 'x'?
    9 |             Minmax(x , 1e18 , &mn , &mx);
      |                                      ^~
      |                                      x
gap.cpp:9:13: error: 'Minmax' was not declared in this scope; did you mean 'MinMax'?
    9 |             Minmax(x , 1e18 , &mn , &mx);
      |             ^~~~~~
      |             MinMax
gap.cpp:7:37: warning: unused variable 'lsy' [-Wunused-variable]
    7 |         ll x =0, y = 1e18,lsx = 0 , lsy = 0 , ANS =0;
      |                                     ^~~
gap.cpp:17:12: error: 'ANS' was not declared in this scope
   17 |     return ANS;
      |            ^~~