# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
906157 |
2024-01-13T14:55:50 Z |
Ludissey |
Mobile (BOI12_mobile) |
C++14 |
|
511 ms |
18892 KB |
#include <bits/stdc++.h>
using namespace std;
#define int double
signed main() {
ios::sync_with_stdio(false); cin.tie(nullptr);
int n,L; cin >> n >> L;
vector<pair<double,double>> a;
int N=0;
for (int i = 0; i < n; i++){
int x,y; cin >> x >> y;
y=abs(y);
if(i>0&&a[N-1].first==x) a[N-1].second=min(a[N-1].second,y);
else{
N++;
a.push_back({x,y});
}
}
int l=0,r=1e9;
while(r-l>0.0003){
int mid=(l+r)/2;
int rght=0;
for (int i = 0; i < N; i++)
{
if(mid<a[i].second) continue;
int pnt1=sqrt((mid*mid)-(a[i].second*a[i].second));
if(a[i].first-pnt1<=rght) rght=max(rght, pnt1+a[i].second);
}
if(rght>=L) {
r=mid;
}else{
l=mid;
}
}
cout << setprecision(5) << fixed << (double)l << "\n";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
600 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
36 ms |
2520 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
25 ms |
596 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
41 ms |
2520 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
41 ms |
1492 KB |
Output is correct |
2 |
Correct |
40 ms |
1384 KB |
Output is correct |
3 |
Correct |
32 ms |
736 KB |
Output is correct |
4 |
Incorrect |
73 ms |
2512 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
54 ms |
2516 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
247 ms |
10148 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
169 ms |
652 KB |
Output is correct |
2 |
Incorrect |
255 ms |
8876 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
289 ms |
17336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
213 ms |
592 KB |
Output is correct |
2 |
Incorrect |
306 ms |
17376 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
339 ms |
17376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
232 ms |
592 KB |
Output is correct |
2 |
Incorrect |
356 ms |
18892 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
381 ms |
17332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
268 ms |
604 KB |
Output is correct |
2 |
Incorrect |
404 ms |
17960 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
511 ms |
18332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
339 ms |
680 KB |
Output is correct |
2 |
Incorrect |
511 ms |
18168 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |