Submission #1095198

#TimeUsernameProblemLanguageResultExecution timeMemory
1095198KodikMobile (BOI12_mobile)C++17
70 / 100
1063 ms31780 KiB
#include <bits/stdc++.h> using namespace std; #define ss second #define ff first typedef long long ll; typedef long double ld; #define int ll signed main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); ld n, l; cin >> n >> l; pair<ld,ld> bases[1000000]; for(int i = 0; i < n; ++i){ cin >> bases[i].ff >> bases[i].ss; } ld left = 1, right = 2e9; while(right-left>1e-4){ ld mid = left + (right-left)/2; ld curr = 0; for(int i = 0; i < n; ++i){ ld x = bases[i].ff; ld y = bases[i].ss; ld hi_range = sqrt(mid*mid-y*y); ld start = x-hi_range, end = x+hi_range; if(start<=curr) curr = max(curr, end); } if(curr>=l){ right = mid; }else{ left = mid; } } cout << fixed << setprecision(3) << right; 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...