제출 #1199515

#제출 시각아이디문제언어결과실행 시간메모리
1199515sula2Gap (APIO16_gap)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define bitcount __builtin_popcount #define all(a) a.begin(), a.end() using namespace std; using namespace chrono; using namespace __gnu_pbds; template<typename T> using ordered_set = tree<T,null_type,less_equal<>,rb_tree_tag,tree_order_statistics_node_update>; long long findGap(int t, int n) { long long mn = -1, mx = 1e18+1; vector<long long> a; while (mn != -1) { MinMax(mn + 1, mx - 1, mn, mx); if (mn == -1) break; a.push_back(mn); a.push_back(mx); } sort(all(a)); long long res = 0; for (int i = 1; i < a.size(); i++) res = max(res, a[i] - a[i-1]); return res; }

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

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:15:9: error: 'MinMax' was not declared in this scope
   15 |         MinMax(mn + 1, mx - 1, mn, mx);
      |         ^~~~~~