#include <bits/stdc++.h>
using namespace std;
#define N 1000005
#define ld double
int n, len;
long long x[N], y[N];
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(NULL);
cin >> n >> len;
for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
ld l = 1, r = 1.5e9;
while (r - l > 1e-3){
ld mid = (l + r) / 2.0;
ld cur = 0;
for (int i = 1; i <= n; i++){
ld denta = sqrt(mid * mid - y[i] * y[i]);
ld a = x[i] - denta;
ld b = x[i] + denta;
if (a <= cur) cur = max(cur, b);
}
if (cur >= len) r = mid;
else l = mid;
}
cout << fixed << setprecision(4) << l;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
0 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2392 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
0 ms |
2392 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2392 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
2 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2392 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
2 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2532 KB |
Output is correct |
3 |
Correct |
1 ms |
2532 KB |
Output is correct |
4 |
Correct |
2 ms |
2396 KB |
Output is correct |
5 |
Correct |
2 ms |
2392 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
6748 KB |
Output is correct |
2 |
Correct |
18 ms |
6800 KB |
Output is correct |
3 |
Correct |
16 ms |
5468 KB |
Output is correct |
4 |
Correct |
23 ms |
7800 KB |
Output is correct |
5 |
Correct |
12 ms |
5136 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
19 ms |
6748 KB |
Output is correct |
2 |
Correct |
19 ms |
4700 KB |
Output is correct |
3 |
Correct |
22 ms |
6744 KB |
Output is correct |
4 |
Correct |
24 ms |
7772 KB |
Output is correct |
5 |
Correct |
32 ms |
8024 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
21 ms |
6756 KB |
Output is correct |
2 |
Correct |
19 ms |
6748 KB |
Output is correct |
3 |
Correct |
20 ms |
7516 KB |
Output is correct |
4 |
Correct |
34 ms |
8568 KB |
Output is correct |
5 |
Correct |
24 ms |
7512 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
6748 KB |
Output is correct |
2 |
Correct |
23 ms |
6748 KB |
Output is correct |
3 |
Correct |
22 ms |
7772 KB |
Output is correct |
4 |
Correct |
32 ms |
8540 KB |
Output is correct |
5 |
Correct |
35 ms |
8028 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
23 ms |
6796 KB |
Output is correct |
2 |
Correct |
23 ms |
6748 KB |
Output is correct |
3 |
Correct |
22 ms |
7832 KB |
Output is correct |
4 |
Correct |
34 ms |
8704 KB |
Output is correct |
5 |
Correct |
28 ms |
8072 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
102 ms |
10892 KB |
Output is correct |
2 |
Correct |
115 ms |
10836 KB |
Output is correct |
3 |
Correct |
120 ms |
18004 KB |
Output is correct |
4 |
Correct |
158 ms |
20304 KB |
Output is correct |
5 |
Correct |
140 ms |
17532 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
116 ms |
10872 KB |
Output is correct |
2 |
Correct |
198 ms |
17532 KB |
Output is correct |
3 |
Correct |
112 ms |
16468 KB |
Output is correct |
4 |
Correct |
153 ms |
20048 KB |
Output is correct |
5 |
Correct |
152 ms |
18000 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
121 ms |
14932 KB |
Output is correct |
2 |
Correct |
142 ms |
14980 KB |
Output is correct |
3 |
Correct |
138 ms |
23680 KB |
Output is correct |
4 |
Correct |
191 ms |
26928 KB |
Output is correct |
5 |
Correct |
198 ms |
22868 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
159 ms |
14968 KB |
Output is correct |
2 |
Correct |
223 ms |
22864 KB |
Output is correct |
3 |
Correct |
134 ms |
21624 KB |
Output is correct |
4 |
Correct |
212 ms |
26704 KB |
Output is correct |
5 |
Correct |
170 ms |
23640 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
140 ms |
14984 KB |
Output is correct |
2 |
Correct |
166 ms |
14928 KB |
Output is correct |
3 |
Correct |
163 ms |
24912 KB |
Output is correct |
4 |
Correct |
232 ms |
28752 KB |
Output is correct |
5 |
Correct |
196 ms |
23932 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
170 ms |
14984 KB |
Output is correct |
2 |
Correct |
279 ms |
24436 KB |
Output is correct |
3 |
Correct |
161 ms |
23120 KB |
Output is correct |
4 |
Correct |
217 ms |
28248 KB |
Output is correct |
5 |
Correct |
201 ms |
25084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
182 ms |
14988 KB |
Output is correct |
2 |
Correct |
185 ms |
14984 KB |
Output is correct |
3 |
Correct |
184 ms |
26484 KB |
Output is correct |
4 |
Correct |
274 ms |
30548 KB |
Output is correct |
5 |
Correct |
234 ms |
26192 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
187 ms |
14928 KB |
Output is correct |
2 |
Correct |
285 ms |
25336 KB |
Output is correct |
3 |
Correct |
181 ms |
24400 KB |
Output is correct |
4 |
Correct |
295 ms |
30324 KB |
Output is correct |
5 |
Correct |
228 ms |
26580 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
199 ms |
15956 KB |
Output is correct |
2 |
Correct |
264 ms |
15996 KB |
Output is correct |
3 |
Correct |
234 ms |
30840 KB |
Output is correct |
4 |
Correct |
355 ms |
35156 KB |
Output is correct |
5 |
Correct |
274 ms |
29524 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
264 ms |
15956 KB |
Output is correct |
2 |
Correct |
335 ms |
29268 KB |
Output is correct |
3 |
Correct |
230 ms |
28388 KB |
Output is correct |
4 |
Correct |
319 ms |
35412 KB |
Output is correct |
5 |
Correct |
318 ms |
30804 KB |
Output is correct |