#include <bits/stdc++.h>
using namespace std;
#define N 1000005
#define ld long double
#define int long long
int n, x[N], y[N], len;
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 = 0, r = 2e9;
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(6) << l;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
0 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
0 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
0 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
2 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
2392 KB |
Output is correct |
2 |
Correct |
2 ms |
2396 KB |
Output is correct |
3 |
Correct |
3 ms |
2552 KB |
Output is correct |
4 |
Correct |
5 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
2392 KB |
Output is correct |
2 |
Correct |
2 ms |
2396 KB |
Output is correct |
3 |
Correct |
3 ms |
2396 KB |
Output is correct |
4 |
Correct |
5 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2396 KB |
Output is correct |
3 |
Correct |
3 ms |
2396 KB |
Output is correct |
4 |
Correct |
5 ms |
2396 KB |
Output is correct |
5 |
Correct |
4 ms |
2396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
54 ms |
6748 KB |
Output is correct |
2 |
Correct |
29 ms |
6744 KB |
Output is correct |
3 |
Correct |
26 ms |
4700 KB |
Output is correct |
4 |
Correct |
77 ms |
6748 KB |
Output is correct |
5 |
Correct |
35 ms |
4696 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
60 ms |
6748 KB |
Output is correct |
2 |
Correct |
63 ms |
4720 KB |
Output is correct |
3 |
Correct |
75 ms |
6748 KB |
Output is correct |
4 |
Correct |
80 ms |
6748 KB |
Output is correct |
5 |
Correct |
98 ms |
6748 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
6744 KB |
Output is correct |
2 |
Correct |
27 ms |
6796 KB |
Output is correct |
3 |
Correct |
44 ms |
6748 KB |
Output is correct |
4 |
Correct |
118 ms |
6744 KB |
Output is correct |
5 |
Correct |
78 ms |
6748 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
6748 KB |
Output is correct |
2 |
Correct |
32 ms |
6748 KB |
Output is correct |
3 |
Correct |
46 ms |
6748 KB |
Output is correct |
4 |
Correct |
122 ms |
6772 KB |
Output is correct |
5 |
Correct |
93 ms |
6744 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
36 ms |
6744 KB |
Output is correct |
2 |
Correct |
31 ms |
6748 KB |
Output is correct |
3 |
Correct |
46 ms |
6744 KB |
Output is correct |
4 |
Correct |
122 ms |
6780 KB |
Output is correct |
5 |
Correct |
97 ms |
7000 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
168 ms |
10840 KB |
Output is correct |
2 |
Correct |
161 ms |
10844 KB |
Output is correct |
3 |
Correct |
162 ms |
10632 KB |
Output is correct |
4 |
Correct |
573 ms |
11088 KB |
Output is correct |
5 |
Correct |
484 ms |
10832 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
145 ms |
10844 KB |
Output is correct |
2 |
Correct |
414 ms |
10880 KB |
Output is correct |
3 |
Correct |
235 ms |
10876 KB |
Output is correct |
4 |
Correct |
616 ms |
10880 KB |
Output is correct |
5 |
Correct |
510 ms |
10832 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
204 ms |
14928 KB |
Output is correct |
2 |
Correct |
193 ms |
14932 KB |
Output is correct |
3 |
Correct |
202 ms |
14928 KB |
Output is correct |
4 |
Correct |
716 ms |
14980 KB |
Output is correct |
5 |
Correct |
553 ms |
14932 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
173 ms |
14976 KB |
Output is correct |
2 |
Correct |
471 ms |
14972 KB |
Output is correct |
3 |
Correct |
308 ms |
14932 KB |
Output is correct |
4 |
Correct |
701 ms |
14980 KB |
Output is correct |
5 |
Correct |
596 ms |
14972 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
235 ms |
14984 KB |
Output is correct |
2 |
Correct |
217 ms |
14976 KB |
Output is correct |
3 |
Correct |
223 ms |
14972 KB |
Output is correct |
4 |
Correct |
824 ms |
14932 KB |
Output is correct |
5 |
Correct |
645 ms |
14976 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
209 ms |
14976 KB |
Output is correct |
2 |
Correct |
544 ms |
14984 KB |
Output is correct |
3 |
Correct |
343 ms |
14932 KB |
Output is correct |
4 |
Correct |
806 ms |
14972 KB |
Output is correct |
5 |
Correct |
691 ms |
14928 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
261 ms |
14740 KB |
Output is correct |
2 |
Correct |
250 ms |
14928 KB |
Output is correct |
3 |
Correct |
261 ms |
14928 KB |
Output is correct |
4 |
Correct |
979 ms |
14980 KB |
Output is correct |
5 |
Correct |
768 ms |
15184 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
234 ms |
14928 KB |
Output is correct |
2 |
Correct |
619 ms |
14988 KB |
Output is correct |
3 |
Correct |
395 ms |
14932 KB |
Output is correct |
4 |
Correct |
941 ms |
14984 KB |
Output is correct |
5 |
Correct |
813 ms |
14932 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
359 ms |
15956 KB |
Output is correct |
2 |
Correct |
335 ms |
15956 KB |
Output is correct |
3 |
Correct |
308 ms |
16088 KB |
Output is correct |
4 |
Execution timed out |
1054 ms |
16208 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
294 ms |
16004 KB |
Output is correct |
2 |
Correct |
787 ms |
15952 KB |
Output is correct |
3 |
Correct |
492 ms |
15956 KB |
Output is correct |
4 |
Execution timed out |
1018 ms |
16004 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |