Submission #958947

#TimeUsernameProblemLanguageResultExecution timeMemory
958947biximoMobile (BOI12_mobile)C++17
0 / 100
355 ms23888 KiB
#include <bits/stdc++.h> #define N 1000005 using namespace std; typedef long long ll; typedef array<int, 2> p2; typedef long double ld; int n, L; p2 seq[N]; bool check(ld d) { ld r = 0; for(int i = 0; i < n; i ++) { auto[h,k] = seq[i]; if(d*d-k*k < 0) return false; if(h-sqrt(d*d-k*k) <= r) r = max(r,h+sqrt(d*d-k*k)); } return r >= L; } int main() { cin.tie(0)->sync_with_stdio(0); cin >> n >> L; for(int i = 0; i < n; i ++) { cin >> seq[i][0] >> seq[i][1]; } ld l=1,h=2e9,ans; while(h-l>1e-5) { ld m=(l+h)/2; if(check(m)) { ans = m; h = m; } else { l = m; } } cout << setprecision(15) << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...