# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
920754 |
2024-02-03T02:32:18 Z |
ethanv13 |
Mobile (BOI12_mobile) |
C++17 |
|
1000 ms |
50768 KB |
#include <bits/stdc++.h>
using namespace std;
int main() {
long double n,l;cin>>n>>l;
vector<pair<long double,long double>>a(n);
for(int i=0;i<n;++i){
cin>>a[i].first>>a[i].second;
}
long double lo=0;
long double hi=4e9;
long double delta=1e-5;
while(hi-lo>delta){
long double mid=(lo+hi)/2;
long double curr=0;
for(int i=0;i<n;++i){
long double dist=sqrt(mid*mid-a[i].second*a[i].second);
if(a[i].first-dist<=curr){curr=max(a[i].first+dist,curr);}
}
if(curr>=l){hi=mid;}else{lo=mid;}
}
cout<<fixed<<setprecision(5);
cout<<lo<<endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
524 KB |
Output is correct |
2 |
Correct |
3 ms |
348 KB |
Output is correct |
3 |
Correct |
3 ms |
348 KB |
Output is correct |
4 |
Correct |
3 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
604 KB |
Output is correct |
2 |
Correct |
5 ms |
600 KB |
Output is correct |
3 |
Correct |
5 ms |
612 KB |
Output is correct |
4 |
Correct |
8 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
604 KB |
Output is correct |
2 |
Correct |
5 ms |
600 KB |
Output is correct |
3 |
Correct |
5 ms |
604 KB |
Output is correct |
4 |
Correct |
8 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
604 KB |
Output is correct |
2 |
Correct |
5 ms |
604 KB |
Output is correct |
3 |
Correct |
5 ms |
608 KB |
Output is correct |
4 |
Correct |
9 ms |
600 KB |
Output is correct |
5 |
Correct |
6 ms |
600 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
100 ms |
2772 KB |
Output is correct |
2 |
Correct |
78 ms |
2828 KB |
Output is correct |
3 |
Correct |
58 ms |
2728 KB |
Output is correct |
4 |
Correct |
121 ms |
3920 KB |
Output is correct |
5 |
Correct |
59 ms |
2384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
105 ms |
2876 KB |
Output is correct |
2 |
Correct |
97 ms |
2636 KB |
Output is correct |
3 |
Correct |
123 ms |
2976 KB |
Output is correct |
4 |
Correct |
124 ms |
3920 KB |
Output is correct |
5 |
Correct |
150 ms |
4688 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
72 ms |
3160 KB |
Output is correct |
2 |
Correct |
78 ms |
2904 KB |
Output is correct |
3 |
Correct |
87 ms |
4040 KB |
Output is correct |
4 |
Correct |
185 ms |
5572 KB |
Output is correct |
5 |
Correct |
126 ms |
4144 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
96 ms |
3420 KB |
Output is correct |
2 |
Correct |
103 ms |
3416 KB |
Output is correct |
3 |
Correct |
100 ms |
4532 KB |
Output is correct |
4 |
Correct |
178 ms |
5356 KB |
Output is correct |
5 |
Correct |
144 ms |
4820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
102 ms |
3556 KB |
Output is correct |
2 |
Correct |
94 ms |
3420 KB |
Output is correct |
3 |
Correct |
100 ms |
4436 KB |
Output is correct |
4 |
Correct |
177 ms |
5452 KB |
Output is correct |
5 |
Correct |
155 ms |
4688 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
415 ms |
16088 KB |
Output is correct |
2 |
Correct |
488 ms |
16092 KB |
Output is correct |
3 |
Correct |
487 ms |
23116 KB |
Output is correct |
4 |
Correct |
884 ms |
25676 KB |
Output is correct |
5 |
Correct |
746 ms |
22988 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
510 ms |
16088 KB |
Output is correct |
2 |
Correct |
721 ms |
22696 KB |
Output is correct |
3 |
Correct |
554 ms |
21704 KB |
Output is correct |
4 |
Correct |
876 ms |
25412 KB |
Output is correct |
5 |
Correct |
777 ms |
23504 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
505 ms |
19032 KB |
Output is correct |
2 |
Correct |
593 ms |
19216 KB |
Output is correct |
3 |
Correct |
583 ms |
27908 KB |
Output is correct |
4 |
Execution timed out |
1040 ms |
30848 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
660 ms |
19220 KB |
Output is correct |
2 |
Correct |
916 ms |
27140 KB |
Output is correct |
3 |
Correct |
643 ms |
26048 KB |
Output is correct |
4 |
Execution timed out |
1044 ms |
30800 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
607 ms |
22364 KB |
Output is correct |
2 |
Correct |
705 ms |
22360 KB |
Output is correct |
3 |
Correct |
680 ms |
32500 KB |
Output is correct |
4 |
Execution timed out |
1047 ms |
35768 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
706 ms |
22340 KB |
Output is correct |
2 |
Correct |
982 ms |
31544 KB |
Output is correct |
3 |
Correct |
735 ms |
30548 KB |
Output is correct |
4 |
Execution timed out |
1031 ms |
35664 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
668 ms |
25436 KB |
Output is correct |
2 |
Correct |
778 ms |
25476 KB |
Output is correct |
3 |
Correct |
784 ms |
37204 KB |
Output is correct |
4 |
Execution timed out |
1089 ms |
41208 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
805 ms |
25436 KB |
Output is correct |
2 |
Execution timed out |
1071 ms |
35924 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
849 ms |
31744 KB |
Output is correct |
2 |
Correct |
989 ms |
31740 KB |
Output is correct |
3 |
Correct |
959 ms |
46192 KB |
Output is correct |
4 |
Execution timed out |
1031 ms |
50768 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
989 ms |
31832 KB |
Output is correct |
2 |
Execution timed out |
1050 ms |
44780 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |