제출 #1029880

#제출 시각아이디문제언어결과실행 시간메모리
1029880MuhammetGap (APIO16_gap)C++17
0 / 100
44 ms2872 KiB
#include <bits/stdc++.h> #include "gap.h" using namespace std; #define ll long long #define sz(s) (int)s.size() ll findGap(int T, int n){ ll s = 0, t = 1e18, mn, mx; MinMax(s, t, &mn, &mx); ll d = ((mx - mn + 1) / (n - 1)), k = mn, ans = d, m = mx; for(ll i = mn; i + d < m; i += (d + 1)){ MinMax(i, i + d, &mn, &mx); if(mx != -1){ ans = max(ans, mn-k); k = mx; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...