#include "bits/stdc++.h"
using namespace std;
using ll = long long;
ll x[1000005], y[1000005];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
// freopen("", "r", stdin);
// freopen("", "w", stdout);
int n, l; cin >> n >> l;
for (int i = 0; i < n; i++) {
cin >> x[i] >> y[i];
}
double lo = 1, hi = 1.5e9;
while (hi-lo > 1e-4) {
double mid = (hi + lo) / 2;
double t = 0;
for (int i = 0; i < n; i++) {
double length = sqrt(mid * mid - y[i] * y[i]);
double left = x[i] - length;
double right = x[i] + length;
if (left <= t) {
t = max(t, right);
}
}
if (t >= l) {
hi = mid;
} else {
lo = mid;
}
}
cout << fixed << setprecision(10) << lo << "\n";
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
280 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
332 KB |
Output is correct |
2 |
Correct |
1 ms |
332 KB |
Output is correct |
3 |
Correct |
1 ms |
332 KB |
Output is correct |
4 |
Correct |
1 ms |
332 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
332 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
332 KB |
Output is correct |
4 |
Correct |
2 ms |
460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
332 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
360 KB |
Output is correct |
4 |
Correct |
3 ms |
460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
332 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
332 KB |
Output is correct |
4 |
Correct |
2 ms |
460 KB |
Output is correct |
5 |
Correct |
2 ms |
332 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
29 ms |
2252 KB |
Output is correct |
2 |
Correct |
22 ms |
2508 KB |
Output is correct |
3 |
Correct |
15 ms |
1740 KB |
Output is correct |
4 |
Correct |
29 ms |
2680 KB |
Output is correct |
5 |
Correct |
13 ms |
1512 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
23 ms |
2276 KB |
Output is correct |
2 |
Correct |
25 ms |
2172 KB |
Output is correct |
3 |
Correct |
30 ms |
2508 KB |
Output is correct |
4 |
Correct |
28 ms |
2740 KB |
Output is correct |
5 |
Correct |
35 ms |
3144 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
21 ms |
2392 KB |
Output is correct |
2 |
Correct |
24 ms |
2688 KB |
Output is correct |
3 |
Correct |
34 ms |
2512 KB |
Output is correct |
4 |
Correct |
40 ms |
3792 KB |
Output is correct |
5 |
Correct |
28 ms |
2524 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
31 ms |
3392 KB |
Output is correct |
2 |
Correct |
29 ms |
3220 KB |
Output is correct |
3 |
Correct |
34 ms |
2868 KB |
Output is correct |
4 |
Correct |
41 ms |
3788 KB |
Output is correct |
5 |
Correct |
41 ms |
3148 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
31 ms |
3272 KB |
Output is correct |
2 |
Correct |
30 ms |
3232 KB |
Output is correct |
3 |
Correct |
30 ms |
2908 KB |
Output is correct |
4 |
Correct |
42 ms |
3836 KB |
Output is correct |
5 |
Correct |
36 ms |
3140 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
125 ms |
12384 KB |
Output is correct |
2 |
Correct |
148 ms |
15868 KB |
Output is correct |
3 |
Correct |
145 ms |
15372 KB |
Output is correct |
4 |
Correct |
201 ms |
17840 KB |
Output is correct |
5 |
Correct |
172 ms |
14916 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
145 ms |
16348 KB |
Output is correct |
2 |
Correct |
226 ms |
14752 KB |
Output is correct |
3 |
Correct |
140 ms |
13780 KB |
Output is correct |
4 |
Correct |
192 ms |
17476 KB |
Output is correct |
5 |
Correct |
176 ms |
15368 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
143 ms |
14788 KB |
Output is correct |
2 |
Correct |
185 ms |
18924 KB |
Output is correct |
3 |
Correct |
167 ms |
18360 KB |
Output is correct |
4 |
Correct |
238 ms |
21572 KB |
Output is correct |
5 |
Correct |
206 ms |
17716 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
186 ms |
19536 KB |
Output is correct |
2 |
Correct |
262 ms |
17620 KB |
Output is correct |
3 |
Correct |
185 ms |
16672 KB |
Output is correct |
4 |
Correct |
245 ms |
21448 KB |
Output is correct |
5 |
Correct |
253 ms |
18436 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
188 ms |
17328 KB |
Output is correct |
2 |
Correct |
228 ms |
22116 KB |
Output is correct |
3 |
Correct |
208 ms |
21316 KB |
Output is correct |
4 |
Correct |
307 ms |
24872 KB |
Output is correct |
5 |
Correct |
252 ms |
20292 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
230 ms |
22784 KB |
Output is correct |
2 |
Correct |
324 ms |
20528 KB |
Output is correct |
3 |
Correct |
198 ms |
19576 KB |
Output is correct |
4 |
Correct |
281 ms |
24552 KB |
Output is correct |
5 |
Correct |
268 ms |
21412 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
198 ms |
19652 KB |
Output is correct |
2 |
Correct |
237 ms |
25284 KB |
Output is correct |
3 |
Correct |
239 ms |
24452 KB |
Output is correct |
4 |
Correct |
325 ms |
28412 KB |
Output is correct |
5 |
Correct |
292 ms |
23996 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
247 ms |
25924 KB |
Output is correct |
2 |
Correct |
350 ms |
23472 KB |
Output is correct |
3 |
Correct |
223 ms |
22372 KB |
Output is correct |
4 |
Correct |
317 ms |
28272 KB |
Output is correct |
5 |
Correct |
281 ms |
24500 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
236 ms |
24644 KB |
Output is correct |
2 |
Correct |
294 ms |
31504 KB |
Output is correct |
3 |
Correct |
285 ms |
30544 KB |
Output is correct |
4 |
Correct |
394 ms |
35132 KB |
Output is correct |
5 |
Correct |
363 ms |
29540 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
293 ms |
32484 KB |
Output is correct |
2 |
Correct |
429 ms |
29204 KB |
Output is correct |
3 |
Correct |
296 ms |
28228 KB |
Output is correct |
4 |
Correct |
414 ms |
35416 KB |
Output is correct |
5 |
Correct |
361 ms |
30704 KB |
Output is correct |