# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1035103 |
2024-07-26T04:26:56 Z |
Uniq0rn |
Mobile (BOI12_mobile) |
C++14 |
|
433 ms |
15964 KB |
#include <bits/stdc++.h>
using namespace std;
#define ld long double
#define ll long long int
#define pi pair<int,int>
#define sz(x) (int)x.size()
#define all(x) begin(x),end(x)
int main()
{
cin.tie(0)->sync_with_stdio(0);
int n;
double L;
cin >> n >> L;
vector<pair<double,double>> a(n);
for(int i=0;i<n;i++){
cin >> a[i].first >> a[i].second;
}
sort(all(a));
auto len = [&](double a,double b){
return sqrt(a*a - b*b);
};
double l = 0,r = 2e9;
while(r - l > 0.000001){
double mid = (l + r) / 2.0;
double mx = 0;
for(int i=1;i<n;i++){
double le = a[i].first - len(mid,a[i].second),ri = a[i].first + len(mid,a[i].second);
if(le <= mx){
mx = max(mx,ri);
}
}
if(mx >= L){
r = mid;
}
else{
l = mid;
}
}
cout << setprecision(6) << fixed << l;
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 |
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 |
2 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 |
3 ms |
344 KB |
Output is correct |
2 |
Incorrect |
3 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
348 KB |
Output is correct |
2 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 KB |
Output is correct |
2 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
48 ms |
1624 KB |
Output is correct |
2 |
Correct |
32 ms |
1624 KB |
Output is correct |
3 |
Correct |
23 ms |
1112 KB |
Output is correct |
4 |
Correct |
60 ms |
1628 KB |
Output is correct |
5 |
Correct |
25 ms |
1116 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
43 ms |
1628 KB |
Output is correct |
2 |
Correct |
41 ms |
1624 KB |
Output is correct |
3 |
Correct |
48 ms |
1628 KB |
Output is correct |
4 |
Correct |
50 ms |
1624 KB |
Output is correct |
5 |
Correct |
57 ms |
1624 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
32 ms |
1628 KB |
Output is correct |
2 |
Correct |
35 ms |
1624 KB |
Output is correct |
3 |
Correct |
37 ms |
1628 KB |
Output is correct |
4 |
Correct |
69 ms |
1884 KB |
Output is correct |
5 |
Correct |
51 ms |
1624 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
43 ms |
1884 KB |
Output is correct |
2 |
Correct |
42 ms |
1884 KB |
Output is correct |
3 |
Correct |
50 ms |
1884 KB |
Output is correct |
4 |
Correct |
71 ms |
1880 KB |
Output is correct |
5 |
Correct |
59 ms |
1884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
43 ms |
1880 KB |
Output is correct |
2 |
Correct |
44 ms |
1884 KB |
Output is correct |
3 |
Correct |
51 ms |
1884 KB |
Output is correct |
4 |
Correct |
66 ms |
1880 KB |
Output is correct |
5 |
Correct |
57 ms |
1880 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
174 ms |
8280 KB |
Output is correct |
2 |
Incorrect |
195 ms |
8284 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
200 ms |
8284 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
228 ms |
9816 KB |
Output is correct |
2 |
Correct |
250 ms |
9816 KB |
Output is correct |
3 |
Correct |
245 ms |
9820 KB |
Output is correct |
4 |
Correct |
411 ms |
9820 KB |
Output is correct |
5 |
Correct |
358 ms |
9816 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
262 ms |
9820 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
263 ms |
11356 KB |
Output is correct |
2 |
Correct |
304 ms |
11356 KB |
Output is correct |
3 |
Incorrect |
288 ms |
11356 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
304 ms |
11356 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
297 ms |
12892 KB |
Output is correct |
2 |
Correct |
335 ms |
12892 KB |
Output is correct |
3 |
Incorrect |
386 ms |
12892 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
357 ms |
12892 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
351 ms |
15960 KB |
Output is correct |
2 |
Correct |
424 ms |
15960 KB |
Output is correct |
3 |
Incorrect |
416 ms |
15960 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
433 ms |
15964 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |