Submission #1024267

#TimeUsernameProblemLanguageResultExecution timeMemory
1024267angelsMobile (BOI12_mobile)C++14
90 / 100
1057 ms50952 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); long long int n, L; cin>>n>>L; vector<pair<long double, long double>>v(n); for(int i=0; i<n; i++) { cin>>v[i].first>>v[i].second; } long double l=1, r=1.2e9; while(r-l>1e-3) { long double mid=(l+r)/2.0; long double granica=0; for(int i=0; i<n; i++) { long double opseg=sqrt(mid*mid-v[i].second*v[i].second); long double minn=v[i].first-opseg; long double maxx=v[i].first+opseg; if(minn<=granica) { granica=max(granica, maxx); } } if(granica<L) { l=mid; } else r=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...