제출 #95567

#제출 시각아이디문제언어결과실행 시간메모리
95567lycGap (APIO16_gap)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; long long findGap(int T, int N) { ll s, t, mn, mx; s = 0, t = (ll)1e18; ll arr[N]; for (int i = 0; i < (N+1)/2; ++i) { MinMax(s, t, &mn, &mx); arr[i] = mn; arr[N-1-i] = mx; s = mn+1; t = mx-1; //cout << "FOUND " << mn << " " << mx << '\n'; } //for (int i = 0; i < N; ++i) cout << arr[i] << ' ' ;cout << endl; ll ans = 0; for (int i = 1; i < N; ++i) { ans = max(ans, arr[i]-arr[i-1]); } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:12:9: error: 'MinMax' was not declared in this scope
         MinMax(s, t, &mn, &mx);
         ^~~~~~
gap.cpp:12:9: note: suggested alternative: 'rindex'
         MinMax(s, t, &mn, &mx);
         ^~~~~~
         rindex