답안 #40856

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
40856 2018-02-09T14:33:26 Z IvanC Gap (APIO16_gap) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;
ll NN,TT,maior;
ii binary_search(ll ini,ll fim){
	if(ini == fim) return ii(ini,ini);
	ll copia1 = ini,copia2 = fim;
	MinMax(ini,fim,&copia1,&copia2);
	ini = copia1;
	fim = copia2;
	if(fim - ini <= maior) return ii(ini,fim);
	ll meio = ini + (fim - ini)/2;
	ii novo1 = binary_search(ini,meio);
	ii novo2 = binary_search(meio,fim);
	if(novo1.second != novo2.first) maior = max(maior, novo2.first - novo1.second);
	return ii(ini,fim);
}
ll findGap(ll T,ll N){
	TT = T;
	NN = N;
	ll ini = 0,fim = (ll)1e18;
	binary_search(ini,fim);
	return maior;
}
int main(){
	return 0;
}

Compilation message

gap.cpp: In function 'ii binary_search(ll, ll)':
gap.cpp:9:32: error: 'MinMax' was not declared in this scope
  MinMax(ini,fim,&copia1,&copia2);
                                ^