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>
typedef long long ll;
using namespace std;
long long findGap(int T, int N)
{
ll mx,mn;
MinMax(0,1000000000000000000,&mn,&mx);
ll interval = (mx-mn)/N;
ll lowest = mn, highest = mx;
ll lower = lowest,lastmx = 0;
while(lower<=highest){
MinMax(lower,lower+interval,&mn,&mx);
if(mn>-1){
interval = max(interval,mn-lastmx);
lastmx = mx;
}
lower += interval+1;
}
return interval;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |