제출 #356770

#제출 시각아이디문제언어결과실행 시간메모리
356770penguinhackerMobile (BOI12_mobile)C++14
100 / 100
505 ms27628 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define ar array const int mxN = 1000000; int n, l, x[mxN], y[mxN]; int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(4); cin >> n >> l; for (int i = 0; i < n; ++i) cin >> x[i] >> y[i]; double lb = 0, rb = 1.5e9; while(rb - lb > 1e-4) { double mid = (lb + rb) / 2; double cur = 0; for (int i = 0; i < n; ++i) { if (mid > abs(y[i])) { double r = sqrt(mid * mid - (ll)y[i] * y[i]); double a = x[i] - r, b = x[i] + r; if (a <= cur) cur = max(cur, b); } } if (cur > l) rb = mid; else lb = mid; } cout << lb; return 0; }
#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...