이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;
ll NN,TT,maior;
void binary_search(ll ini,ll fim){
if(ini == fim) return;
ll copia1,copia2;
ll meio = ini + (fim - ini)/2;
MinMax(meio+1,meio,&copia1,&copia2);
maior = max(maior, abs(copia1 - copia2) );
if(fim - ini <= maior) return;
binary_search(ini,copia2);
binary_search(copia1,fim);
return;
}
ll findGap(int T,int N){
TT = T;
NN = N;
ll ini = 0,fim = (ll)1e18,copia1,copia2;
MinMax(ini,fim,&copia1,&copia2);
binary_search(copia1,copia2);
return maior;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |