# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
973951 |
2024-05-02T13:20:42 Z |
andrewp |
Mobile (BOI12_mobile) |
C++14 |
|
33 ms |
3676 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;
ll 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.00,top=(ldb)1.5e9;
while(top-bot>1e-3)
{
ldb mid=(bot+top)/2,calc=0;
for(int i=0;i<n;i++)
{
ldb razl=sqrt((ldb)(mid*mid)-(ldb)(a[i].se*a[i].se));
ldb x=(ldb)a[i].fi-razl;
ldb y=(ldb)a[i].fi+razl;
if(x<=calc)
{
calc=max(calc,y);
}
}
if(calc>=(ldb)l) top=mid;
else bot=mid;
}
cout<<fixed<<setprecision(4)<<bot;
return 0;
}
# |
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 |
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 |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 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 |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
540 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 KB |
Output is correct |
2 |
Correct |
2 ms |
344 KB |
Output is correct |
3 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
540 KB |
Output is correct |
4 |
Correct |
3 ms |
348 KB |
Output is correct |
5 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
1628 KB |
Output is correct |
2 |
Correct |
19 ms |
1536 KB |
Output is correct |
3 |
Correct |
13 ms |
1308 KB |
Output is correct |
4 |
Correct |
24 ms |
1628 KB |
Output is correct |
5 |
Correct |
12 ms |
1112 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
20 ms |
1624 KB |
Output is correct |
2 |
Correct |
20 ms |
1372 KB |
Output is correct |
3 |
Correct |
23 ms |
1628 KB |
Output is correct |
4 |
Correct |
24 ms |
1824 KB |
Output is correct |
5 |
Correct |
27 ms |
1628 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
1628 KB |
Output is correct |
2 |
Correct |
21 ms |
1656 KB |
Output is correct |
3 |
Correct |
20 ms |
1628 KB |
Output is correct |
4 |
Correct |
33 ms |
1880 KB |
Output is correct |
5 |
Correct |
27 ms |
2132 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
1884 KB |
Output is correct |
2 |
Correct |
24 ms |
1956 KB |
Output is correct |
3 |
Correct |
23 ms |
1804 KB |
Output is correct |
4 |
Correct |
33 ms |
1884 KB |
Output is correct |
5 |
Correct |
28 ms |
1884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
1880 KB |
Output is correct |
2 |
Correct |
25 ms |
1992 KB |
Output is correct |
3 |
Correct |
23 ms |
1884 KB |
Output is correct |
4 |
Correct |
32 ms |
1884 KB |
Output is correct |
5 |
Correct |
28 ms |
1880 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
9 ms |
1884 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
15 ms |
3676 KB |
Execution killed with signal 11 |
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 |
Runtime error |
17 ms |
3672 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
1888 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
15 ms |
3676 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
13 ms |
1880 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
16 ms |
3676 KB |
Execution killed with signal 11 |
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 |
Correct |
17 ms |
1808 KB |
Output is correct |
2 |
Incorrect |
18 ms |
2996 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |