Submission #1325145

#TimeUsernameProblemLanguageResultExecution timeMemory
1325145riafhasan2010Gap (APIO16_gap)C++17
Compilation error
0 ms0 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; 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:6:3: error: 'll' was not declared in this scope
    6 |   ll mn, mx, ans = 0, last = 0;
      |   ^~
gap.cpp:8:12: error: 'mn' was not declared in this scope; did you mean 'n'?
    8 |     MinMax(mn + 1, mn + 1, mn, mx);
      |            ^~
      |            n
gap.cpp:8:32: error: 'mx' was not declared in this scope
    8 |     MinMax(mn + 1, mn + 1, mn, mx);
      |                                ^~
gap.cpp:9:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     if (i > 1) ans = max(ans, mx - last);
      |                ^~~
      |                abs
gap.cpp:9:36: error: 'last' was not declared in this scope
    9 |     if (i > 1) ans = max(ans, mx - last);
      |                                    ^~~~
gap.cpp:10:5: error: 'last' was not declared in this scope
   10 |     last = mn;
      |     ^~~~
gap.cpp:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
   12 | }
      | ^