Submission #1000218

#TimeUsernameProblemLanguageResultExecution timeMemory
1000218ArtistWallMobile (BOI12_mobile)C++17
100 / 100
715 ms35304 KiB
#include <bits/stdc++.h> using namespace std; #define x first #define y second pair<long long, long long> p[1000000]; int main() { int n, len; cin >> n >> len; for (int i = 0; i < n; i++) { cin >> p[i].x >> p[i].y; } double l = 1, r = 1.5e9; while (r - l > 1e-3) { double mid = (l + r) / 2, curr = 0; for (int i = 0; i < n; i++) { double delta = sqrt(mid * mid - p[i].y * p[i].y); double a = p[i].x - delta, b = p[i].x + delta; if (a <= curr) curr = max(curr, b); } if (curr >= len) r = mid; else l = mid; } cout << fixed << setprecision(4) << l; 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...