# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
684376 |
2023-01-21T05:06:29 Z |
handlename |
Mobile (BOI12_mobile) |
C++17 |
|
1000 ms |
31756 KB |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define float long double
const int MOD=1e9+7;
//const int MOD=998244353;
const int sqn=450;
const long double eps=1e-4;
long double n,l,x[1000002],y[1000002];
void runtc(){
cin>>n>>l;
for (int i=1;i<=n;i++){
cin>>x[i]>>y[i];
}
long double mini=0,maxi=2e9;
while (mini+eps<maxi){
long double mid=(mini+maxi)/2;
long double cur=0;
for (int i=1;i<=n;i++){
long double lol=sqrt(mid*mid-y[i]*y[i]);
if (x[i]-lol<=cur) cur=max(cur,x[i]+lol);
}
if (cur>=l) maxi=mid;
else mini=mid;
}
cout<<fixed<<setprecision(4);
cout<<maxi;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
//freopen("moocast.in","r",stdin);
//freopen("moocast.out","w",stdout);
//freopen("input1.in","r",stdin);
//freopen("output1.out","w",stdout);
//freopen("perfectly_balanced_chapter_1_input.txt","r",stdin);
//freopen("hackercup_output.txt","w",stdout);
int tc;
//cin>>tc;
tc=1;
for (int i=1;i<=tc;i++){
//cout<<"Case #"<<i<<": ";
runtc();
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
340 KB |
Output is correct |
2 |
Correct |
0 ms |
340 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
340 KB |
Output is correct |
2 |
Correct |
2 ms |
368 KB |
Output is correct |
3 |
Correct |
2 ms |
340 KB |
Output is correct |
4 |
Correct |
2 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
508 KB |
Output is correct |
2 |
Correct |
4 ms |
468 KB |
Output is correct |
3 |
Correct |
4 ms |
468 KB |
Output is correct |
4 |
Correct |
7 ms |
468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
468 KB |
Output is correct |
2 |
Correct |
4 ms |
416 KB |
Output is correct |
3 |
Correct |
4 ms |
468 KB |
Output is correct |
4 |
Correct |
7 ms |
500 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
468 KB |
Output is correct |
2 |
Correct |
5 ms |
468 KB |
Output is correct |
3 |
Correct |
4 ms |
468 KB |
Output is correct |
4 |
Correct |
8 ms |
504 KB |
Output is correct |
5 |
Correct |
5 ms |
468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
83 ms |
2672 KB |
Output is correct |
2 |
Correct |
54 ms |
2732 KB |
Output is correct |
3 |
Correct |
43 ms |
2004 KB |
Output is correct |
4 |
Correct |
103 ms |
2636 KB |
Output is correct |
5 |
Correct |
50 ms |
1996 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
87 ms |
2780 KB |
Output is correct |
2 |
Correct |
84 ms |
2532 KB |
Output is correct |
3 |
Correct |
101 ms |
2760 KB |
Output is correct |
4 |
Correct |
105 ms |
2760 KB |
Output is correct |
5 |
Correct |
126 ms |
3056 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
55 ms |
3084 KB |
Output is correct |
2 |
Correct |
59 ms |
2828 KB |
Output is correct |
3 |
Correct |
71 ms |
2980 KB |
Output is correct |
4 |
Correct |
151 ms |
3344 KB |
Output is correct |
5 |
Correct |
102 ms |
3044 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
72 ms |
3468 KB |
Output is correct |
2 |
Correct |
70 ms |
3464 KB |
Output is correct |
3 |
Correct |
80 ms |
3460 KB |
Output is correct |
4 |
Correct |
154 ms |
3444 KB |
Output is correct |
5 |
Correct |
126 ms |
3444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
75 ms |
3460 KB |
Output is correct |
2 |
Correct |
71 ms |
3460 KB |
Output is correct |
3 |
Correct |
78 ms |
3388 KB |
Output is correct |
4 |
Correct |
171 ms |
3464 KB |
Output is correct |
5 |
Correct |
128 ms |
3512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
319 ms |
15900 KB |
Output is correct |
2 |
Correct |
357 ms |
15988 KB |
Output is correct |
3 |
Correct |
348 ms |
15924 KB |
Output is correct |
4 |
Correct |
756 ms |
15988 KB |
Output is correct |
5 |
Correct |
638 ms |
16076 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
363 ms |
15984 KB |
Output is correct |
2 |
Correct |
583 ms |
15948 KB |
Output is correct |
3 |
Correct |
393 ms |
15968 KB |
Output is correct |
4 |
Correct |
758 ms |
16060 KB |
Output is correct |
5 |
Correct |
654 ms |
16076 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
387 ms |
19232 KB |
Output is correct |
2 |
Correct |
432 ms |
19032 KB |
Output is correct |
3 |
Correct |
431 ms |
19148 KB |
Output is correct |
4 |
Correct |
918 ms |
19148 KB |
Output is correct |
5 |
Correct |
736 ms |
19124 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
439 ms |
19120 KB |
Output is correct |
2 |
Correct |
695 ms |
19112 KB |
Output is correct |
3 |
Correct |
481 ms |
19068 KB |
Output is correct |
4 |
Correct |
908 ms |
19148 KB |
Output is correct |
5 |
Correct |
768 ms |
19176 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
446 ms |
22248 KB |
Output is correct |
2 |
Correct |
511 ms |
22276 KB |
Output is correct |
3 |
Correct |
486 ms |
22220 KB |
Output is correct |
4 |
Execution timed out |
1043 ms |
22384 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
509 ms |
22192 KB |
Output is correct |
2 |
Correct |
813 ms |
22288 KB |
Output is correct |
3 |
Correct |
579 ms |
22248 KB |
Output is correct |
4 |
Execution timed out |
1059 ms |
22316 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
515 ms |
25448 KB |
Output is correct |
2 |
Correct |
576 ms |
25292 KB |
Output is correct |
3 |
Correct |
576 ms |
25344 KB |
Output is correct |
4 |
Execution timed out |
1090 ms |
25352 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
591 ms |
25412 KB |
Output is correct |
2 |
Correct |
955 ms |
25552 KB |
Output is correct |
3 |
Correct |
653 ms |
25444 KB |
Output is correct |
4 |
Execution timed out |
1087 ms |
25316 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
640 ms |
31704 KB |
Output is correct |
2 |
Correct |
716 ms |
31692 KB |
Output is correct |
3 |
Correct |
690 ms |
31508 KB |
Output is correct |
4 |
Execution timed out |
1090 ms |
31564 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
726 ms |
31756 KB |
Output is correct |
2 |
Execution timed out |
1085 ms |
31604 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |