답안 #40857

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
40857 2018-02-09T14:33:57 Z IvanC Gap (APIO16_gap) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "gap.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

/tmp/ccpiT3Ei.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cc9ypzgJ.o:gap.cpp:(.text.startup+0x0): first defined here
/tmp/ccpiT3Ei.o: In function `main':
grader.cpp:(.text.startup+0x1ae): undefined reference to `findGap(int, int)'
collect2: error: ld returned 1 exit status