Submission #38708

#TimeUsernameProblemLanguageResultExecution timeMemory
38708oTTo_22Gap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "gap.h" #define se second #define fi first using namespace std; long long findGap(int T, int N) { long long &Mn,&Mx; long long S=0; long long T=1000000000000000000; while (Mn!=-1 && Mx!=-1) { MinMax(S,T,&Mn,&Mn); S=Mn; T=Mx; } return T-S; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:9:16: error: 'Mn' declared as reference but not initialized
     long long &Mn,&Mx;
                ^
gap.cpp:9:20: error: 'Mx' declared as reference but not initialized
     long long &Mn,&Mx;
                    ^
gap.cpp:11:15: error: declaration of 'long long int T' shadows a parameter
     long long T=1000000000000000000;
               ^