Submission #1325151

#TimeUsernameProblemLanguageResultExecution timeMemory
1325151riafhasan2010Gap (APIO16_gap)C++17
0 / 100
2097 ms1160 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; long long findGap(int T, int n) { ll mn, mx, ans = 0, last = 0; for (int i = 1; i <= n; i++) { MinMax(mn + 1, mn + 1, &mn, &mx); if (i > 1) ans = max(ans, mx - last); last = mn; } }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
   13 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...