이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#define ll long long
const long long INF = 2e9;
long long MOD = 1e9+7;
void MinMax(ll ,ll ,long long &,long long &);
void MinMax(ll s,ll t,long long &mn,long long &mx){
// cout<<s<<" "<<t<<endl;
// cin>>mn>>mx;
}
long long findGap(int,int);
long long findGap(int t,int n){
ll l=0,r=1e18;
ll res=0;
ll l1=1e18,r1=0;
while(l<r){
MinMax(l+1,r-1,l,r);
if(r!=-1){
res=(res<r1-r ? r1-r : res);
res=(res<l-l1 ? l-l1 : res);
}
if(l==-1)
res=(res<r1-l1 ? r1-l1 : res);
r1=r,l1=l;
if(l==-1)break;
}
return res;
}
//int main(){
// cout<<findGap(1,4);
//}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |