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;
long long findGap(int T, int N)
{
long long x=0,y=1e18;
vector<long long>vc;
while(N>=1){
long long *a,*b;
a=new long long(),b=new long long();
MinMax(x,y,a,b);
x=*a,y=*b;
vc.push_back(x);
vc.push_back(y);
x++;y--;
N-=2;
}
sort(vc.begin(),vc.end());
long long ans=0;
for(int i=1;i<(int)vc.size();i++)
ans=max(ans,vc[i]-vc[i-1]);
return ans;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |