제출 #1027612

#제출 시각아이디문제언어결과실행 시간메모리
1027612stdfloatGap (APIO16_gap)C++17
0 / 100
37 ms2868 KiB
#include <bits/stdc++.h>
#include "gap.h"
using namespace std;

using ll = long long;

ll findGap(int T, int N) {
	ll s, t;
	MinMax(0, (ll)1e18, &s, &t);

	ll ans = LLONG_MAX;
	while (s + 1 < t) {
		ll x, y;
		MinMax(s + 1, t - 1, &x, &y);

		if (x == -1) break;
	
		ans = min({ans, x - s, t - y});
		s = x; t = y;
	}

	return min(ans, t - s);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...