# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
371529 |
2021-02-26T20:13:47 Z |
Codurr |
Mobile (BOI12_mobile) |
C++14 |
|
1000 ms |
31724 KB |
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
signed main(){
ios::sync_with_stdio(0);cin.tie(0);
int n,l;
cin>>n>>l;
vector<pair<double,double>> v(n);
for(int i=0;i<n;i++) cin>>v[i].first>>v[i].second;
double l1=0,r=1e9*sqrt(2);
for(int j=1;j<100;j++){
double m=(l1+r)/2;
bool ans=true;
vector<pair<double,double>> c(n);
for(int i=0;i<n;i++){
c[i].first=v[i].first-sqrt(m*m-v[i].second*v[i].second);
c[i].second=v[i].first+sqrt(m*m-v[i].second*v[i].second);
}
if(c[0].first>0) ans=false;
else if(c[n-1].second<l) ans=false;
else{
for(int i=0;i<n-1;i++){
if(c[i+1].first>c[i].second) {ans=false; break;}
}
}
if(ans) r=m;
else l1=m;
}
cout<<fixed<<setprecision(4)<<r;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
492 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
492 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
552 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
117 ms |
2668 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
123 ms |
2796 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
86 ms |
3084 KB |
Output is correct |
2 |
Incorrect |
87 ms |
2924 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
110 ms |
3624 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
116 ms |
3436 KB |
Output is correct |
2 |
Incorrect |
113 ms |
3496 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
547 ms |
16132 KB |
Output is correct |
2 |
Correct |
649 ms |
16032 KB |
Output is correct |
3 |
Correct |
624 ms |
16108 KB |
Output is correct |
4 |
Incorrect |
982 ms |
15980 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
652 ms |
16100 KB |
Output is correct |
2 |
Incorrect |
889 ms |
16108 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
690 ms |
19148 KB |
Output is correct |
2 |
Incorrect |
713 ms |
19128 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
749 ms |
19128 KB |
Output is correct |
2 |
Execution timed out |
1048 ms |
19180 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
822 ms |
22320 KB |
Output is correct |
2 |
Incorrect |
854 ms |
22320 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
900 ms |
22320 KB |
Output is correct |
2 |
Execution timed out |
1078 ms |
22300 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
873 ms |
25640 KB |
Output is correct |
2 |
Execution timed out |
1034 ms |
25492 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1050 ms |
25492 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1077 ms |
31664 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1074 ms |
31724 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |