# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
973944 |
2024-05-02T13:16:22 Z |
andrewp |
Mobile (BOI12_mobile) |
C++14 |
|
47 ms |
2224 KB |
//Dedicated to my love,ivaziva
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define dbg(x) cerr<<#x<<": "<<x<<endl;
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ldb double
const ll inf=(ll)1e18+5;
const int mod=1e9+7;
const int K=512;
const int L=30;
const int N=1e5+1;
int n,l;
pll a[N];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin>>n>>l;
for(int i=0;i<n;i++) cin>>a[i].fi>>a[i].se;
ldb bot=1,top=(ldb)1.5e9;
while(top-bot>0.000001)
{
ldb mid=(bot+top)/2.0;
ldb calc=0;
for(int i=0;i<n;i++)
{
ldb razl=sqrt(mid*mid-(ldb)(a[i].se*a[i].se));
ldb x=a[i].fi-razl;
ldb y=a[i].fi+razl;
if(x<=calc)
{
calc=max(calc,y);
}
}
if(calc>=l) top=mid;
else bot=mid;
}
cout<<fixed<<setprecision(6)<<bot;
return 0;
}
# |
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 |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 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 |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
344 KB |
Output is correct |
2 |
Correct |
2 ms |
344 KB |
Output is correct |
3 |
Correct |
2 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
344 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
348 KB |
Output is correct |
4 |
Correct |
3 ms |
348 KB |
Output is correct |
5 |
Correct |
2 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
39 ms |
1628 KB |
Output is correct |
2 |
Correct |
21 ms |
1624 KB |
Output is correct |
3 |
Correct |
16 ms |
1116 KB |
Output is correct |
4 |
Correct |
36 ms |
1876 KB |
Output is correct |
5 |
Correct |
15 ms |
1112 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
1664 KB |
Output is correct |
2 |
Correct |
25 ms |
1372 KB |
Output is correct |
3 |
Correct |
28 ms |
1628 KB |
Output is correct |
4 |
Correct |
29 ms |
1628 KB |
Output is correct |
5 |
Correct |
33 ms |
1624 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
21 ms |
1628 KB |
Output is correct |
2 |
Correct |
31 ms |
2224 KB |
Output is correct |
3 |
Correct |
23 ms |
1628 KB |
Output is correct |
4 |
Correct |
41 ms |
1884 KB |
Output is correct |
5 |
Correct |
29 ms |
1628 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
28 ms |
2016 KB |
Output is correct |
2 |
Correct |
26 ms |
1884 KB |
Output is correct |
3 |
Correct |
27 ms |
1884 KB |
Output is correct |
4 |
Correct |
40 ms |
1884 KB |
Output is correct |
5 |
Correct |
38 ms |
2136 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
28 ms |
1884 KB |
Output is correct |
2 |
Correct |
28 ms |
1880 KB |
Output is correct |
3 |
Correct |
27 ms |
1880 KB |
Output is correct |
4 |
Correct |
47 ms |
1996 KB |
Output is correct |
5 |
Correct |
41 ms |
2004 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
1884 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
15 ms |
1884 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
11 ms |
1884 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
14 ms |
1880 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
1884 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
18 ms |
1880 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
11 ms |
1884 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
15 ms |
1880 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
1892 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
15 ms |
1884 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |