# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
732533 |
2023-04-29T05:28:52 Z |
uy842003 |
Mobile (BOI12_mobile) |
C++17 |
|
1000 ms |
15912 KB |
#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-4;
pair<double, double> cor[1000001];
int main() {
int n;
double len;
cin >> n >> len;
for (int i = 0; i < n; i++)
cin >> cor[i].first >> cor[i].second;
double l = 0, r = 4e9 + 1, m;
while (r - l > eps) {
m = (l + r) / 2;
double cur_pos = 0;
for (int i = 0; i < n; i++) {
if (m < abs(cor[i].second) + eps) continue;
double dx = sqrt(m * m - cor[i].second * cor[i].second);
if (cor[i].first - dx < cur_pos + eps) cur_pos = max(cur_pos, cor[i].first + dx);
}
if (len < cur_pos + eps)
r = m;
else
l = m + eps;
}
cout << setprecision(3) << fixed << r << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
312 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 |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
308 KB |
Output is correct |
3 |
Correct |
1 ms |
308 KB |
Output is correct |
4 |
Correct |
1 ms |
216 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
340 KB |
Output is correct |
2 |
Correct |
4 ms |
340 KB |
Output is correct |
3 |
Correct |
2 ms |
340 KB |
Output is correct |
4 |
Correct |
4 ms |
316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
340 KB |
Output is correct |
2 |
Correct |
6 ms |
388 KB |
Output is correct |
3 |
Correct |
5 ms |
340 KB |
Output is correct |
4 |
Correct |
6 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
340 KB |
Output is correct |
2 |
Correct |
6 ms |
340 KB |
Output is correct |
3 |
Correct |
5 ms |
340 KB |
Output is correct |
4 |
Correct |
7 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
340 KB |
Output is correct |
2 |
Correct |
6 ms |
340 KB |
Output is correct |
3 |
Correct |
5 ms |
340 KB |
Output is correct |
4 |
Correct |
7 ms |
340 KB |
Output is correct |
5 |
Correct |
5 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
93 ms |
2184 KB |
Output is correct |
2 |
Correct |
93 ms |
2544 KB |
Output is correct |
3 |
Correct |
53 ms |
1688 KB |
Output is correct |
4 |
Correct |
88 ms |
2560 KB |
Output is correct |
5 |
Correct |
42 ms |
1460 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
77 ms |
2208 KB |
Output is correct |
2 |
Correct |
76 ms |
2200 KB |
Output is correct |
3 |
Correct |
86 ms |
2492 KB |
Output is correct |
4 |
Correct |
91 ms |
2692 KB |
Output is correct |
5 |
Correct |
112 ms |
2916 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
91 ms |
2456 KB |
Output is correct |
2 |
Correct |
102 ms |
2648 KB |
Output is correct |
3 |
Correct |
82 ms |
2556 KB |
Output is correct |
4 |
Correct |
134 ms |
3020 KB |
Output is correct |
5 |
Correct |
92 ms |
2492 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
122 ms |
3076 KB |
Output is correct |
2 |
Correct |
117 ms |
3032 KB |
Output is correct |
3 |
Correct |
96 ms |
2804 KB |
Output is correct |
4 |
Correct |
139 ms |
3132 KB |
Output is correct |
5 |
Correct |
105 ms |
3100 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
148 ms |
3128 KB |
Output is correct |
2 |
Correct |
119 ms |
3164 KB |
Output is correct |
3 |
Correct |
110 ms |
2876 KB |
Output is correct |
4 |
Correct |
150 ms |
3012 KB |
Output is correct |
5 |
Correct |
108 ms |
3068 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
455 ms |
9916 KB |
Output is correct |
2 |
Correct |
593 ms |
9556 KB |
Output is correct |
3 |
Correct |
577 ms |
9136 KB |
Output is correct |
4 |
Correct |
643 ms |
8404 KB |
Output is correct |
5 |
Correct |
557 ms |
8040 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
611 ms |
8032 KB |
Output is correct |
2 |
Correct |
627 ms |
8140 KB |
Output is correct |
3 |
Correct |
496 ms |
8180 KB |
Output is correct |
4 |
Correct |
665 ms |
8108 KB |
Output is correct |
5 |
Correct |
581 ms |
8168 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
523 ms |
9680 KB |
Output is correct |
2 |
Correct |
725 ms |
9756 KB |
Output is correct |
3 |
Correct |
692 ms |
9680 KB |
Output is correct |
4 |
Correct |
813 ms |
9564 KB |
Output is correct |
5 |
Correct |
639 ms |
9712 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
733 ms |
9560 KB |
Output is correct |
2 |
Correct |
755 ms |
9736 KB |
Output is correct |
3 |
Correct |
588 ms |
9584 KB |
Output is correct |
4 |
Correct |
777 ms |
9632 KB |
Output is correct |
5 |
Correct |
663 ms |
9680 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
617 ms |
11176 KB |
Output is correct |
2 |
Correct |
823 ms |
11152 KB |
Output is correct |
3 |
Correct |
839 ms |
11136 KB |
Output is correct |
4 |
Correct |
974 ms |
11184 KB |
Output is correct |
5 |
Correct |
749 ms |
11344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
877 ms |
11244 KB |
Output is correct |
2 |
Correct |
818 ms |
11240 KB |
Output is correct |
3 |
Correct |
726 ms |
11152 KB |
Output is correct |
4 |
Correct |
933 ms |
11228 KB |
Output is correct |
5 |
Correct |
782 ms |
11144 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
712 ms |
12816 KB |
Output is correct |
2 |
Correct |
943 ms |
12812 KB |
Output is correct |
3 |
Correct |
897 ms |
12852 KB |
Output is correct |
4 |
Execution timed out |
1077 ms |
12712 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
978 ms |
12816 KB |
Output is correct |
2 |
Correct |
900 ms |
13000 KB |
Output is correct |
3 |
Correct |
830 ms |
14136 KB |
Output is correct |
4 |
Execution timed out |
1012 ms |
13660 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
884 ms |
15908 KB |
Output is correct |
2 |
Execution timed out |
1069 ms |
15912 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1077 ms |
15748 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |