# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
658593 |
2022-11-13T15:39:52 Z |
finn__ |
Mobile (BOI12_mobile) |
C++17 |
|
901 ms |
47324 KB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
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 = 1e11;
while (b - a > 1e-7)
{
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 |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
316 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
468 KB |
Output is correct |
2 |
Correct |
3 ms |
484 KB |
Output is correct |
3 |
Correct |
2 ms |
468 KB |
Output is correct |
4 |
Correct |
3 ms |
460 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
716 KB |
Output is correct |
2 |
Correct |
5 ms |
716 KB |
Output is correct |
3 |
Correct |
4 ms |
716 KB |
Output is correct |
4 |
Correct |
4 ms |
724 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
724 KB |
Output is correct |
2 |
Correct |
5 ms |
724 KB |
Output is correct |
3 |
Correct |
4 ms |
724 KB |
Output is correct |
4 |
Correct |
5 ms |
780 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
716 KB |
Output is correct |
2 |
Correct |
5 ms |
712 KB |
Output is correct |
3 |
Correct |
5 ms |
712 KB |
Output is correct |
4 |
Correct |
4 ms |
704 KB |
Output is correct |
5 |
Correct |
4 ms |
724 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
66 ms |
4828 KB |
Output is correct |
2 |
Correct |
68 ms |
4980 KB |
Output is correct |
3 |
Correct |
44 ms |
3028 KB |
Output is correct |
4 |
Correct |
59 ms |
5024 KB |
Output is correct |
5 |
Correct |
36 ms |
2840 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
55 ms |
4696 KB |
Output is correct |
2 |
Correct |
57 ms |
5064 KB |
Output is correct |
3 |
Correct |
57 ms |
5060 KB |
Output is correct |
4 |
Correct |
72 ms |
5004 KB |
Output is correct |
5 |
Correct |
67 ms |
5072 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
4804 KB |
Output is correct |
2 |
Correct |
74 ms |
4776 KB |
Output is correct |
3 |
Correct |
74 ms |
5016 KB |
Output is correct |
4 |
Correct |
79 ms |
5056 KB |
Output is correct |
5 |
Correct |
61 ms |
5056 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
90 ms |
4784 KB |
Output is correct |
2 |
Correct |
92 ms |
5040 KB |
Output is correct |
3 |
Correct |
78 ms |
4996 KB |
Output is correct |
4 |
Correct |
78 ms |
4956 KB |
Output is correct |
5 |
Correct |
70 ms |
5068 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
101 ms |
4768 KB |
Output is correct |
2 |
Correct |
95 ms |
4604 KB |
Output is correct |
3 |
Correct |
75 ms |
5052 KB |
Output is correct |
4 |
Correct |
77 ms |
5052 KB |
Output is correct |
5 |
Correct |
70 ms |
4960 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
406 ms |
17104 KB |
Output is correct |
2 |
Correct |
445 ms |
17088 KB |
Output is correct |
3 |
Correct |
432 ms |
17356 KB |
Output is correct |
4 |
Correct |
392 ms |
17324 KB |
Output is correct |
5 |
Correct |
363 ms |
17296 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
453 ms |
17140 KB |
Output is correct |
2 |
Correct |
481 ms |
17512 KB |
Output is correct |
3 |
Correct |
382 ms |
17324 KB |
Output is correct |
4 |
Correct |
387 ms |
17396 KB |
Output is correct |
5 |
Correct |
363 ms |
17348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
481 ms |
33528 KB |
Output is correct |
2 |
Correct |
536 ms |
33380 KB |
Output is correct |
3 |
Correct |
523 ms |
33764 KB |
Output is correct |
4 |
Correct |
470 ms |
33760 KB |
Output is correct |
5 |
Correct |
433 ms |
33748 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
544 ms |
33508 KB |
Output is correct |
2 |
Correct |
574 ms |
33756 KB |
Output is correct |
3 |
Correct |
456 ms |
33752 KB |
Output is correct |
4 |
Correct |
470 ms |
33688 KB |
Output is correct |
5 |
Correct |
442 ms |
33688 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
569 ms |
33548 KB |
Output is correct |
2 |
Correct |
622 ms |
33352 KB |
Output is correct |
3 |
Correct |
619 ms |
41084 KB |
Output is correct |
4 |
Correct |
576 ms |
43540 KB |
Output is correct |
5 |
Correct |
529 ms |
40100 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
657 ms |
33432 KB |
Output is correct |
2 |
Correct |
668 ms |
40320 KB |
Output is correct |
3 |
Correct |
548 ms |
39608 KB |
Output is correct |
4 |
Correct |
548 ms |
43604 KB |
Output is correct |
5 |
Correct |
510 ms |
41008 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
629 ms |
33516 KB |
Output is correct |
2 |
Correct |
707 ms |
41584 KB |
Output is correct |
3 |
Correct |
714 ms |
41080 KB |
Output is correct |
4 |
Correct |
629 ms |
43736 KB |
Output is correct |
5 |
Correct |
577 ms |
40728 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
714 ms |
33464 KB |
Output is correct |
2 |
Correct |
740 ms |
40504 KB |
Output is correct |
3 |
Correct |
620 ms |
39636 KB |
Output is correct |
4 |
Correct |
630 ms |
43568 KB |
Output is correct |
5 |
Correct |
590 ms |
41056 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
797 ms |
33560 KB |
Output is correct |
2 |
Correct |
878 ms |
47324 KB |
Output is correct |
3 |
Correct |
868 ms |
46200 KB |
Output is correct |
4 |
Correct |
779 ms |
34360 KB |
Output is correct |
5 |
Correct |
723 ms |
45312 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
899 ms |
34072 KB |
Output is correct |
2 |
Correct |
901 ms |
44840 KB |
Output is correct |
3 |
Correct |
785 ms |
44092 KB |
Output is correct |
4 |
Correct |
776 ms |
34936 KB |
Output is correct |
5 |
Correct |
728 ms |
46452 KB |
Output is correct |