제출 #1175229

#제출 시각아이디문제언어결과실행 시간메모리
1175229raspyGap (APIO16_gap)C++20
0 / 100
39 ms1212 KiB
#include "gap.h" #include <bits/stdc++.h> #define int long long using namespace std; const int inf = 1e18; long long findGap(int32_t t, int32_t n) { int mn, mx; MinMax(0, inf, &mn, &mx); int ds = mx-mn; int kor = (ds+n-1)/(n-1); int pr = mn, rez = 0; // cout << " ->" << ds << " " << kor <<"\n"; for (int i = mn; i <= mx; i+=kor) { int tr = 0, tmx = 0; MinMax(i, i+kor, &tr, &tmx); // cout << i << " " << i+kor << " " << tr << " " << mx << "\n"; if (tr == -1) continue; rez = max(rez, tr-pr); pr = tmx; } return rez; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...