# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
658592 |
2022-11-13T15:38:32 Z |
finn__ |
Mobile (BOI12_mobile) |
C++17 |
|
1000 ms |
43868 KB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
size_t n;
long double l;
cin >> n >> l;
vector<complex<long double>> p;
for (size_t i = 0; i < n; i++)
{
long double x, y;
cin >> x >> y;
p.push_back({x, y});
}
long double a = 0.0, b = 1e15;
while (b - a > 1e-8)
{
long double r = (a + b) / 2, covered_until = 0.0;
for (size_t i = 0; i < n; i++)
{
if (abs(p[i].imag()) <= r)
{
long double delta_x = sqrt(r * r - p[i].imag() * p[i].imag());
if (p[i].real() - delta_x <= covered_until)
covered_until = max(covered_until, p[i].real() + delta_x);
}
}
if (covered_until >= l)
b = r;
else
a = r;
}
cout << fixed << setprecision(10) << a << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
468 KB |
Output is correct |
2 |
Correct |
5 ms |
448 KB |
Output is correct |
3 |
Correct |
3 ms |
340 KB |
Output is correct |
4 |
Correct |
5 ms |
468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
596 KB |
Output is correct |
2 |
Correct |
8 ms |
684 KB |
Output is correct |
3 |
Correct |
6 ms |
724 KB |
Output is correct |
4 |
Correct |
7 ms |
724 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
596 KB |
Output is correct |
2 |
Correct |
9 ms |
688 KB |
Output is correct |
3 |
Correct |
9 ms |
724 KB |
Output is correct |
4 |
Correct |
10 ms |
696 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
596 KB |
Output is correct |
2 |
Correct |
10 ms |
720 KB |
Output is correct |
3 |
Correct |
8 ms |
724 KB |
Output is correct |
4 |
Correct |
8 ms |
736 KB |
Output is correct |
5 |
Correct |
6 ms |
724 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
132 ms |
4576 KB |
Output is correct |
2 |
Correct |
128 ms |
5644 KB |
Output is correct |
3 |
Correct |
69 ms |
3032 KB |
Output is correct |
4 |
Correct |
100 ms |
5708 KB |
Output is correct |
5 |
Correct |
53 ms |
2752 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
92 ms |
4516 KB |
Output is correct |
2 |
Correct |
92 ms |
5308 KB |
Output is correct |
3 |
Correct |
106 ms |
5476 KB |
Output is correct |
4 |
Correct |
106 ms |
5636 KB |
Output is correct |
5 |
Correct |
121 ms |
5780 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
117 ms |
4512 KB |
Output is correct |
2 |
Correct |
117 ms |
4432 KB |
Output is correct |
3 |
Correct |
112 ms |
5512 KB |
Output is correct |
4 |
Correct |
148 ms |
6004 KB |
Output is correct |
5 |
Correct |
107 ms |
5316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
153 ms |
4536 KB |
Output is correct |
2 |
Correct |
149 ms |
5736 KB |
Output is correct |
3 |
Correct |
133 ms |
5408 KB |
Output is correct |
4 |
Correct |
169 ms |
5976 KB |
Output is correct |
5 |
Correct |
126 ms |
5488 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
148 ms |
4524 KB |
Output is correct |
2 |
Correct |
173 ms |
4432 KB |
Output is correct |
3 |
Correct |
139 ms |
5312 KB |
Output is correct |
4 |
Correct |
149 ms |
5964 KB |
Output is correct |
5 |
Correct |
129 ms |
5468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
644 ms |
16772 KB |
Output is correct |
2 |
Correct |
756 ms |
16792 KB |
Output is correct |
3 |
Correct |
758 ms |
23272 KB |
Output is correct |
4 |
Correct |
763 ms |
25672 KB |
Output is correct |
5 |
Correct |
650 ms |
22900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
767 ms |
16832 KB |
Output is correct |
2 |
Correct |
808 ms |
22704 KB |
Output is correct |
3 |
Correct |
647 ms |
21824 KB |
Output is correct |
4 |
Correct |
887 ms |
25452 KB |
Output is correct |
5 |
Correct |
683 ms |
23556 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
842 ms |
33280 KB |
Output is correct |
2 |
Correct |
924 ms |
33292 KB |
Output is correct |
3 |
Correct |
895 ms |
40968 KB |
Output is correct |
4 |
Correct |
966 ms |
43868 KB |
Output is correct |
5 |
Correct |
774 ms |
40412 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
922 ms |
33188 KB |
Output is correct |
2 |
Correct |
926 ms |
40344 KB |
Output is correct |
3 |
Correct |
816 ms |
39520 KB |
Output is correct |
4 |
Correct |
954 ms |
43764 KB |
Output is correct |
5 |
Correct |
793 ms |
41068 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
909 ms |
33304 KB |
Output is correct |
2 |
Execution timed out |
1073 ms |
33216 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1090 ms |
33256 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1016 ms |
33300 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1085 ms |
33268 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1084 ms |
33264 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1085 ms |
33228 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |