제출 #464641

#제출 시각아이디문제언어결과실행 시간메모리
464641nickmet2004Gap (APIO16_gap)C++11
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#include "gap.h"
#define ll long long
using namespace std;
ll findGap(int T , int n){
    if(T==1){
        ll x =0, y = 1e18, ANS =0;
        for(int i = 1; i<= (n + 1) /2; ++i){
            ll mn , mx;
            Minmax(x , 1e18 , &mn , &mx);
            ANS = max(ANS , mn - x);
            Minmax(0 , y , &mn , &mx);
            ANS = max(ANS , y - mx);
            x = mn + 1;
            y = mx - 1;
        }
    }
    return ANS;

}

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

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:10:13: error: 'Minmax' was not declared in this scope; did you mean 'MinMax'?
   10 |             Minmax(x , 1e18 , &mn , &mx);
      |             ^~~~~~
      |             MinMax
gap.cpp:18:12: error: 'ANS' was not declared in this scope
   18 |     return ANS;
      |            ^~~