제출 #404457

#제출 시각아이디문제언어결과실행 시간메모리
404457CursedCodeGap (APIO16_gap)C++14
0 / 100
73 ms1168 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; int findGap(int t, int n){ long long L, R; MinMax(0LL, 1e18, &L, &R); long long x = (R - L + n - 2) / (n - 1); long long ans = x; long long last = L; for(long long i = L + 1; i < R; i += x){ long long mn, mx; MinMax(i, min(i + x - 1, R), &mn, &mx); if(mn != -1){ ans = max(ans, mn - last); last = mx; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...