This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;
const ll MINV = 0;
const ll MAXV = (ll)1e18;
ll NN,TT,maior;
ll findGap(int T,int N){
TT = T;
NN = N;
ll ini,fim;
MinMax(MINV,MAXV,&ini,&fim);
ll gap = (ll)ceil(double(fim - ini)/double(N));
vector<ll> diferencas;
for(ll i = 0;i<N;i++){
ll lo = ini + i*gap;
ll hi = min(lo+gap,fim);
if(i != 0) lo++;
ll copia1,copia2;
MinMax(lo,hi,&copia1,&copia2);
maior = max(copia2 - copia1,maior);
}
return maior;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |