Submission #1016376

#TimeUsernameProblemLanguageResultExecution timeMemory
1016376cryptobunnyMobile (BOI12_mobile)C++14
100 / 100
955 ms51708 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n, sz; cin >> n >> sz; vector<pair<long long, long long>> a(n); for (int i = 0; i < n; i++) { cin >> a[i].first >> a[i].second; } double l = 1, r = 2e9; while (r - l > 1e-3) { double mid = (l + r) / 2, j = 0; vector<pair<int, int>> s; for (int i = 0; i < n; i++) { double temp = sqrt(mid * mid - a[i].second * a[i].second); double left = a[i].first - temp, right = a[i].first + temp; s.push_back({left, right}); if (left <= j) j = max(j, right); } if (j >= sz) r = mid; else l = mid; } cout << fixed << setprecision(6) << l << endl; }
#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...