Submission #1100301

#TimeUsernameProblemLanguageResultExecution timeMemory
1100301adkjtGap (APIO16_gap)C++14
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) { int mx=0; if(T==1) { int l=0,r=1e18; int *pl,*pr; MinMax(l,r,pl,pr); l=*pl,r=*pr; while(pl!=pr){ MinMax(l,r,pl,pr); mx=max({mx,*pl-l,r-*pr}); l=*pl,r=*pr; } } return mx; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(long long int, long long int)':
gap.cpp:12:15: warning: 'pl' may be used uninitialized in this function [-Wmaybe-uninitialized]
   12 |         MinMax(l,r,pl,pr);
      |         ~~~~~~^~~~~~~~~~~
gap.cpp:12:15: warning: 'pr' may be used uninitialized in this function [-Wmaybe-uninitialized]
/usr/bin/ld: /tmp/ccSHsxXC.o: in function `main':
grader.cpp:(.text.startup+0x1b7): undefined reference to `findGap(int, int)'
collect2: error: ld returned 1 exit status