Submission #740053

#TimeUsernameProblemLanguageResultExecution timeMemory
740053CutebolGap (APIO16_gap)C++17
Compilation error
0 ms0 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std ; #define int long long long long findGap(int T, int n) { vector <int> vec ; int ans = 0 ; int l = 1 , r = 1e18 , mn , mx , pl = -1 , pr ; while ( l < r ){ MinMax( l , r , &mn , &mx ) ; if ( mn == -1 || mx == -1 ) break ; vec.push_back(mn) ; vec.push_back(mx) ; l = mn + 1 , r = mx-1 ; } sort ( vec.begin() , vec.end() ) ; for ( int i = 0 ; i < n-1 ; i ++ ) ans = max ( ans , vec[i+1]-vec[i] ) ; return ans ; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(long long int, long long int)':
gap.cpp:10:35: warning: unused variable 'pl' [-Wunused-variable]
   10 |  int l = 1 , r = 1e18 , mn , mx , pl = -1 , pr ;
      |                                   ^~
gap.cpp:10:45: warning: unused variable 'pr' [-Wunused-variable]
   10 |  int l = 1 , r = 1e18 , mn , mx , pl = -1 , pr ;
      |                                             ^~
/usr/bin/ld: /tmp/ccBeyQ3l.o: in function `main':
grader.cpp:(.text.startup+0x1b7): undefined reference to `findGap(int, int)'
collect2: error: ld returned 1 exit status