이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define pb push_back
#define FIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
using namespace std;
long long findGap(int T, int N)
{
	ll inf = 1e18;
	set <ll> s;
	ll a, b, nn = 2, mx = 0, la = -1;
	MinMax(0, inf, &a, &b);
	s.insert(a);
	s.insert(b);
	while (nn < N) {
		ll c = a+1, d = b-1;
		MinMax(c, d, &a, &b);
		s.insert(a);
		s.insert(b);
		nn += 2;
	}
	for (auto it : s) {
		if (la != -1) {
			mx = max(mx, it - la);
		}
		la = it;
	}
	
	return mx;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |