이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include<bits/stdc++.h>
#define fori(a,b,c) for(int a=b; a<c; a++)
#define ford(a,b,c) for(int a=b; a>=c; a--)
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define fi first
#define se second
using namespace std;
long long findGap(int T, int N)
{
	//if(T==1){
		ll lmn=-1, lmx=1000000000000000001;
		ll ans=0;
		fori(i,0,(N+1)/2){
			ll mn,mx;
			MinMax(lmn+1,lmx-1,&mn,&mx);
			if(i!=0){
				ans=max(ans,mn-lmn);
				ans=max(ans,lmx-mx);
			}
			if(i==(N+1)/2-1){
				ans=max(ans,mx-mn);
			}
			lmn=mn;
			lmx=mx;
			cout << ans << " " << i << " " << endl;
		}
		return ans;
	//}
	return 0;
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |