답안 #1084421

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1084421 2024-09-06T08:33:44 Z MMihalev Gap (APIO16_gap) C++14
컴파일 오류
0 ms 0 KB
#include<iostream>
#include<algorithm>
#include "gap.h"
using namespace std;
int64 mn,mx;
int64 findGap(int T,long int N)
{
    int64 l=-1,r=1000000000000000001LL;
    long int rem=N;
    int64 ans=1;
    while(rem>0)
    {
        MinMax(l+1,r-1,&mn,&mx);
        if(rem==2)ans=max(ans,mx-mn);
        if(l!=-1)
        {
            ans=max(ans,mn-l);
            ans=max(ans,r-mx);
        }
        if(mn!=mx)rem-=2;
        else rem--;
        l=mn;
        r=mx;
    }
    return ans;
}

Compilation message

gap.cpp:5:1: error: 'int64' does not name a type; did you mean 'int64_t'?
    5 | int64 mn,mx;
      | ^~~~~
      | int64_t
gap.cpp:6:1: error: 'int64' does not name a type; did you mean 'int64_t'?
    6 | int64 findGap(int T,long int N)
      | ^~~~~
      | int64_t