Submission #284834

#TimeUsernameProblemLanguageResultExecution timeMemory
284834triplem5dsGap (APIO16_gap)C++14
0 / 100
40 ms1272 KiB
#include "gap.h" #include "bits/stdc++.h" using namespace std; long long findGap(int T, int N) { long long ans = 0; if(T == 2){ long long cur = 0; vector<long long > vr; for(int i = 0; i < N; i++){ long long * mn, * mx; MinMax(cur, cur, mn, mx); vr.push_back(*mn); cur = *mn + 1; if(i)ans = max(ans, vr[i] - vr[i-1]); } } return ans; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:12:13: warning: 'mn' may be used uninitialized in this function [-Wmaybe-uninitialized]
   12 |       MinMax(cur, cur, mn, mx);
      |       ~~~~~~^~~~~~~~~~~~~~~~~~
gap.cpp:12:13: warning: 'mx' may be used uninitialized in this function [-Wmaybe-uninitialized]
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...