Submission #964052

#TimeUsernameProblemLanguageResultExecution timeMemory
964052Neco_arcMobile (BOI12_mobile)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include <bits/debug.hpp> #define ll long long #define all(x) x.begin(), x.end() #define Neco "Mobile" #define resp(x) sort(all(x)), x.resize(unique(all(x)) - x.begin()) #define getbit(x,i) ((x >> i)&1) #define _left id * 2, l, mid #define _right id * 2 + 1, mid + 1, r #define cntbit(x) __builtin_popcountll(x) #define fi(i, a, b) for(int i = a; i <= b; i++) #define fid(i, a, b) for(int i = a; i >= b; i--) #define maxn (int) 1e6 + 7 using namespace std; const ll mod = 1e9 + 7; //972663749 const ll base = 911382323; typedef long double ld; mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); ll GetRandom(ll l, ll r) { return uniform_int_distribution<ll> (l, r)(rng); } int n, L; pair<ld, ld> a[maxn]; void solve() { cin >> n >> L; fi(i, 1, n) cin >> a[i].first >> a[i].second; ld l = 1, r = 2e9; int T = 50; while(T--) { ld mid = (l + r) / 2; ld Curr = 0; fi(i, 1, n) { ld L, R; if(mid < a[i].second) L = R = 0; else { ld len = sqrt( (mid * mid) - (a[i].second * a[i].second) ); L = a[i].first - len, R = a[i].first + len; } if(Curr >= L) Curr = max(Curr, R); } if(Curr >= L) r = mid; else l = mid; } cout << fixed << setprecision(5) << r; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); if(fopen(Neco".inp", "r")) { freopen(Neco".inp", "r", stdin); freopen(Neco".out", "w", stdout); } int nTest = 1; // cin >> nTest; while(nTest--) { solve(); } return 0; }

Compilation message (stderr)

mobile.cpp:2:10: fatal error: bits/debug.hpp: No such file or directory
    2 | #include <bits/debug.hpp>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.