이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <algorithm>
using namespace std;
long long findGap(int T, int N){
long long arr[N];
long long s=0, t=1000000000000000000, mn, mx;
for(int i=0;i<(N+1)/2;i++){
MinMax(s, t, &mn, &mx);
arr[i]=mn;
s=mn+1;
arr[N-1-i]=mx;
t=mx-1;
}
long long diff=0;
for(int i=1;i<N;i++){
diff=max(diff, arr[i]-arr[i-1]);
}
return diff;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |