# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
914983 |
2024-01-23T05:13:23 Z |
Em1L |
Mobile (BOI12_mobile) |
C++14 |
|
1000 ms |
8284 KB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using tiiii = tuple<int, int, ll, ll>;
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
int n, L; cin >> n >> L;
vector < int > x(n), y(n);
for (int i = 0; i < n; i++)
cin >> x[i] >> y[i];
auto Good = [&](double dist) {
double r = 0;
for (int i = 0; i < n; i++) {
if (y[i] > dist)
continue;
double left = x[i] - sqrtl(dist * dist - y[i] * y[i]);
double right = x[i] + sqrtl(dist * dist - y[i] * y[i]);
if (left <= r)
r = max(r, right);
}
return r >= L;
};
double l = -0.1, m, r = 2e+9;
for (int i = 0; i < 200; i++) {
m = (l + r) / 2;
if (Good(m))
r = m;
else
l = m;
}
cout << setprecision(16) << fixed << r << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 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 |
560 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
348 KB |
Output is correct |
2 |
Correct |
3 ms |
348 KB |
Output is correct |
3 |
Correct |
7 ms |
488 KB |
Output is correct |
4 |
Correct |
3 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
344 KB |
Output is correct |
2 |
Correct |
6 ms |
348 KB |
Output is correct |
3 |
Correct |
5 ms |
348 KB |
Output is correct |
4 |
Incorrect |
14 ms |
348 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
344 KB |
Output is correct |
2 |
Correct |
6 ms |
348 KB |
Output is correct |
3 |
Correct |
4 ms |
348 KB |
Output is correct |
4 |
Incorrect |
15 ms |
348 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
348 KB |
Output is correct |
2 |
Correct |
6 ms |
560 KB |
Output is correct |
3 |
Correct |
5 ms |
348 KB |
Output is correct |
4 |
Incorrect |
13 ms |
572 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
102 ms |
860 KB |
Output is correct |
2 |
Incorrect |
74 ms |
1884 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
252 ms |
856 KB |
Output is correct |
2 |
Correct |
291 ms |
1816 KB |
Output is correct |
3 |
Incorrect |
309 ms |
1884 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
100 ms |
1136 KB |
Output is correct |
2 |
Incorrect |
92 ms |
1112 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
118 ms |
1224 KB |
Output is correct |
2 |
Incorrect |
96 ms |
2648 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
111 ms |
1232 KB |
Output is correct |
2 |
Incorrect |
96 ms |
1228 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
564 ms |
4616 KB |
Output is correct |
2 |
Incorrect |
488 ms |
4432 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
481 ms |
4364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
678 ms |
4956 KB |
Output is correct |
2 |
Incorrect |
584 ms |
5200 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
683 ms |
4952 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
816 ms |
5924 KB |
Output is correct |
2 |
Incorrect |
699 ms |
5928 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
684 ms |
5940 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
915 ms |
6708 KB |
Output is correct |
2 |
Incorrect |
764 ms |
6708 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
914 ms |
6708 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1067 ms |
8284 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
950 ms |
8284 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |