제출 #1124018

#제출 시각아이디문제언어결과실행 시간메모리
1124018lsdwpqerMobile (BOI12_mobile)C++20
0 / 100
696 ms16056 KiB
#include<bits/stdc++.h> #include<math.h> using namespace std; #define ll long long int main(){ ll n,le; cin >> n >> le; double x[n]; double y[n]; for(int i = 0;i < n;i++){ cin >> x[i] >> y[i]; } double ra = 0; double rb = 1e12; while(rb-ra > 0.0001){ double r = (rb-ra)/2+ra; // r = 5.99; // cout << ra << " " <<rb << " r " << r; double p = 0; for(int i = 0;i < n;i++){ double a = p; if(r-y[i] > 0 && (x[i]-sqrt(r*r-y[i]*y[i])) <= a && x[i]+(sqrt(r*r-y[i]*y[i])) > a){ p = x[i]+sqrt(r*r-y[i]*y[i]); break; } } if(p >= le){ rb = r; } else{ ra = r; } // break; } cout << ra << 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...