Submission #1131691

#TimeUsernameProblemLanguageResultExecution timeMemory
1131691monostackMobile (BOI12_mobile)C++20
0 / 100
1097 ms31556 KiB
#include<bits/stdc++.h> using namespace std; #define ld long double ld n,l; ld P(pair<ld,ld> x, pair<ld,ld> y){ return min(l,max((ld)0,(x.first*x.first + x.second*x.second - y.first*y.first - y.second*y.second)/(2*(x.first - y.first)))); } int main(){ cin>>n>>l; vector<pair<ld,ld>> a(n); ld ans = 1e12; for(auto i = 0; i < n; i++){ cin>>a[i].first>>a[i].second; for(auto j = 0; j < i; j++){ ans = min(ans, P(a[j],a[i])); } } cout<<fixed<<setprecision(8); cout<<ans<<'\n'; }
#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...