제출 #366212

#제출 시각아이디문제언어결과실행 시간메모리
366212mathking1021Gap (APIO16_gap)C++17
0 / 100
67 ms1364 KiB
#include "gap.h" #include <iostream> using namespace std; typedef long long ll; ll t, n; long long findGap(int T, int N) { t = T; n = N; ll a, b; MinMax(1LL, 1000000000000000000LL, &a, &b); ll c = (b - a + n - 1) / n; ll t1 = 1e18; ll ans = c; for(ll i = a; i <= b - c + 1; i += c) { ll t3, t4; MinMax(i, i + c - 1, &t3, &t4); if(t3 != -1) { ans = max(ans, t3 - t1); t1 = t4; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...