제출 #1325144

#제출 시각아이디문제언어결과실행 시간메모리
1325144riafhasan2010Gap (APIO16_gap)C++17
컴파일 에러
0 ms0 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; long long findGap(int T, int n) { ll mn, mx; for (int i = 1; i <= n; i++) { MinMax(mn + 1, mn + 1, mn, mx); if (i) ans = max(ans, mx - last); last = mn; } }

컴파일 시 표준 에러 (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;
      |   ^~
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:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     if (i) ans = max(ans, mx - last);
      |            ^~~
      |            abs
gap.cpp:9:32: error: 'last' was not declared in this scope
    9 |     if (i) 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 | }
      | ^