#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll findGap(int tc, int n){
ll L,R;
MinMax(0,(ll)1e18,&L,&R);
if(R - L + 1 == n) return 1;
ll s = (R - L + n) / (n + 1);
vector<ll> vals;
for(ll i = L;i <= R;i += s){
ll nx = min(R,i + s -1);
ll _l,_r;
MinMax(i,nx,&_l,&_r);
// cout << i << ' ' << nx << ' ' << _l << ' ' << _r << '\n';
if(_l!=-1 && _l <= nx){
vals.push_back(_l);
vals.push_back(_r);
}
}
assert((int)vals.size() >= 2);
ll ret = 0;
// for(ll o:vals){
// cout << o << ' ';
// }
// cout << '\n';
for(int i = 1;i < (int)vals.size();i++){
ret = max(ret,vals[i] - vals[i - 1]);
}
return ret;
}
Compilation message
boat.cpp:1:10: fatal error: gap.h: No such file or directory
1 | #include "gap.h"
| ^~~~~~~
compilation terminated.