# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
919371 |
2024-01-31T16:48:40 Z |
ethanv13 |
Mobile (BOI12_mobile) |
C++17 |
|
1000 ms |
65968 KB |
#include <bits/stdc++.h>
using namespace std;
vector<pair<long long,long long>>c;long long n,l;
bool can(long double mid){
vector<pair<long double,long double>>seg;
for(int i=0;i<n;++i){
if(mid<abs(c[i].second)){
return false;
}
else {
long double delta=sqrt(mid*mid-c[i].second*c[i].second);
seg.push_back({c[i].first-delta,c[i].first+delta});
}
}
long double currub=0;
for(int i=0;i<n;++i){
if(seg[i].first<=currub){
currub=max(currub,seg[i].second);
}
}
return currub>=l;
}
int main() {
cin>>n>>l;
for(int i=0;i<n;++i){
long long x,y;cin>>x>>y;c.push_back({x,y});
}
long double lo=0;long double hi=2e9;
for(int i=0;i<45;++i){
long double mid=(lo+hi)/2;
if(can(mid)){
hi=mid;
}
else {
lo=mid;
}
}
cout<<fixed<<setprecision(9);
cout<<lo<<endl;
};
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
704 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
9 ms |
920 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
9 ms |
920 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
924 KB |
Output is correct |
2 |
Correct |
11 ms |
940 KB |
Output is correct |
3 |
Incorrect |
8 ms |
936 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
148 ms |
9220 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
115 ms |
8724 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
166 ms |
9220 KB |
Output is correct |
2 |
Correct |
181 ms |
9336 KB |
Output is correct |
3 |
Incorrect |
115 ms |
10120 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
198 ms |
9340 KB |
Output is correct |
2 |
Correct |
216 ms |
9744 KB |
Output is correct |
3 |
Incorrect |
141 ms |
10084 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
207 ms |
9892 KB |
Output is correct |
2 |
Correct |
202 ms |
10272 KB |
Output is correct |
3 |
Incorrect |
131 ms |
9360 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
900 ms |
40360 KB |
Output is correct |
2 |
Correct |
998 ms |
40708 KB |
Output is correct |
3 |
Correct |
988 ms |
40360 KB |
Output is correct |
4 |
Incorrect |
848 ms |
40588 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
949 ms |
40544 KB |
Output is correct |
2 |
Incorrect |
738 ms |
40372 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1016 ms |
60736 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1036 ms |
62228 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1022 ms |
62400 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1039 ms |
63148 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1006 ms |
63420 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1033 ms |
63472 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1010 ms |
65968 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1030 ms |
65824 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |