# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
464193 |
2021-08-12T13:35:20 Z |
dqk |
Mobile (BOI12_mobile) |
C++17 |
|
831 ms |
74424 KB |
#include <bits/stdc++.h>
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
int n;
double L;
std::cin >> n >> L;
std::vector<std::vector<int>> p(n, std::vector<int>(2, 0));
for (int i = 0; i < n; ++i) {
std::cin >> p[i][0] >> p[i][1];
}
sort(p.begin(), p.end());
double lo = 0.00, hi = 4e9;
while(hi - lo > 1e-6) {
double mi = lo + (hi - lo) / 2;
double cur = 0.00;
for (int i = 0; i < n; ++i) {
double d = sqrt(mi * mi - (1.00 * 1ll * p[i][1]) * (1.00 * 1ll * p[i][1]));
if (cur >= (1.00 * p[i][0] - d))
cur = std::max(cur, 1.00 * p[i][0] + d);
}
if (cur >= L) {
hi = mi;
}
else {
lo = mi;
}
}
printf("%.6lF", lo);
//std::cout << lo << "\n";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
460 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
364 KB |
Output is correct |
4 |
Correct |
2 ms |
332 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
588 KB |
Output is correct |
2 |
Correct |
4 ms |
460 KB |
Output is correct |
3 |
Correct |
3 ms |
584 KB |
Output is correct |
4 |
Correct |
4 ms |
588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
588 KB |
Output is correct |
2 |
Correct |
3 ms |
460 KB |
Output is correct |
3 |
Correct |
3 ms |
580 KB |
Output is correct |
4 |
Correct |
4 ms |
588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
588 KB |
Output is correct |
2 |
Correct |
3 ms |
460 KB |
Output is correct |
3 |
Correct |
3 ms |
620 KB |
Output is correct |
4 |
Correct |
4 ms |
588 KB |
Output is correct |
5 |
Correct |
5 ms |
588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
59 ms |
4300 KB |
Output is correct |
2 |
Correct |
44 ms |
4428 KB |
Output is correct |
3 |
Correct |
32 ms |
3864 KB |
Output is correct |
4 |
Correct |
60 ms |
5584 KB |
Output is correct |
5 |
Correct |
33 ms |
3448 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
55 ms |
4556 KB |
Output is correct |
2 |
Correct |
52 ms |
4172 KB |
Output is correct |
3 |
Correct |
59 ms |
4768 KB |
Output is correct |
4 |
Correct |
58 ms |
5772 KB |
Output is correct |
5 |
Correct |
65 ms |
6452 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
5188 KB |
Output is correct |
2 |
Correct |
49 ms |
4812 KB |
Output is correct |
3 |
Correct |
54 ms |
5964 KB |
Output is correct |
4 |
Correct |
82 ms |
7668 KB |
Output is correct |
5 |
Correct |
59 ms |
6084 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
59 ms |
5708 KB |
Output is correct |
2 |
Correct |
62 ms |
7188 KB |
Output is correct |
3 |
Correct |
59 ms |
6800 KB |
Output is correct |
4 |
Correct |
82 ms |
7756 KB |
Output is correct |
5 |
Correct |
78 ms |
7032 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
60 ms |
5708 KB |
Output is correct |
2 |
Correct |
59 ms |
7196 KB |
Output is correct |
3 |
Correct |
59 ms |
6812 KB |
Output is correct |
4 |
Correct |
76 ms |
7728 KB |
Output is correct |
5 |
Correct |
70 ms |
7068 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
282 ms |
27704 KB |
Output is correct |
2 |
Correct |
328 ms |
35496 KB |
Output is correct |
3 |
Correct |
312 ms |
34864 KB |
Output is correct |
4 |
Correct |
397 ms |
37228 KB |
Output is correct |
5 |
Correct |
372 ms |
34516 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
319 ms |
27704 KB |
Output is correct |
2 |
Correct |
428 ms |
34356 KB |
Output is correct |
3 |
Correct |
304 ms |
33476 KB |
Output is correct |
4 |
Correct |
426 ms |
37028 KB |
Output is correct |
5 |
Correct |
374 ms |
34988 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
342 ms |
33188 KB |
Output is correct |
2 |
Correct |
379 ms |
42524 KB |
Output is correct |
3 |
Correct |
377 ms |
41864 KB |
Output is correct |
4 |
Correct |
476 ms |
45140 KB |
Output is correct |
5 |
Correct |
434 ms |
41160 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
394 ms |
33184 KB |
Output is correct |
2 |
Correct |
512 ms |
41100 KB |
Output is correct |
3 |
Correct |
372 ms |
40076 KB |
Output is correct |
4 |
Correct |
480 ms |
44804 KB |
Output is correct |
5 |
Correct |
440 ms |
41872 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
408 ms |
38656 KB |
Output is correct |
2 |
Correct |
432 ms |
49492 KB |
Output is correct |
3 |
Correct |
428 ms |
48708 KB |
Output is correct |
4 |
Correct |
582 ms |
52212 KB |
Output is correct |
5 |
Correct |
524 ms |
47688 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
433 ms |
38596 KB |
Output is correct |
2 |
Correct |
600 ms |
47812 KB |
Output is correct |
3 |
Correct |
446 ms |
47124 KB |
Output is correct |
4 |
Correct |
563 ms |
51908 KB |
Output is correct |
5 |
Correct |
519 ms |
48784 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
461 ms |
44144 KB |
Output is correct |
2 |
Correct |
498 ms |
56536 KB |
Output is correct |
3 |
Correct |
501 ms |
55760 KB |
Output is correct |
4 |
Correct |
631 ms |
59788 KB |
Output is correct |
5 |
Correct |
587 ms |
55284 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
502 ms |
44144 KB |
Output is correct |
2 |
Correct |
665 ms |
54724 KB |
Output is correct |
3 |
Correct |
496 ms |
53576 KB |
Output is correct |
4 |
Correct |
637 ms |
59592 KB |
Output is correct |
5 |
Correct |
611 ms |
55712 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
580 ms |
55132 KB |
Output is correct |
2 |
Correct |
634 ms |
70628 KB |
Output is correct |
3 |
Correct |
623 ms |
69548 KB |
Output is correct |
4 |
Correct |
806 ms |
74284 KB |
Output is correct |
5 |
Correct |
750 ms |
68664 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
629 ms |
55176 KB |
Output is correct |
2 |
Correct |
831 ms |
68420 KB |
Output is correct |
3 |
Correct |
647 ms |
67376 KB |
Output is correct |
4 |
Correct |
822 ms |
74424 KB |
Output is correct |
5 |
Correct |
761 ms |
69928 KB |
Output is correct |