#include<bits/stdc++.h>
#define ll long long
#define x first
#define y second
using namespace std;
pair<ll, ll> p[1'000'000];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, len;
cin >> n >> len;
for(int i=0; i<n; i++){
cin >> p[i].x >> p[i].y;
}
double l=1, r=1.5e9;
while(r-l>1e-3){
double m=(l+r)/2, cur=0;
for(int i=0; i<n; i++){
double delta=sqrt(m*m-p[i].y*p[i].y);
double a=p[i].x-delta, b=p[i].x+delta;
if(a<=cur){
cur=max(cur, b);
}
}
if(cur>=len){
r=m;
}
else{
l=m;
}
}
cout << fixed << setprecision(4) << l;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
316 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 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 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
332 KB |
Output is correct |
2 |
Correct |
1 ms |
328 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 |
328 KB |
Output is correct |
4 |
Correct |
3 ms |
456 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
332 KB |
Output is correct |
2 |
Correct |
3 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 |
332 KB |
Output is correct |
3 |
Correct |
1 ms |
332 KB |
Output is correct |
4 |
Correct |
2 ms |
332 KB |
Output is correct |
5 |
Correct |
2 ms |
332 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
29 ms |
1484 KB |
Output is correct |
2 |
Correct |
22 ms |
1472 KB |
Output is correct |
3 |
Correct |
16 ms |
1080 KB |
Output is correct |
4 |
Correct |
33 ms |
1484 KB |
Output is correct |
5 |
Correct |
14 ms |
1492 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
35 ms |
1524 KB |
Output is correct |
2 |
Correct |
24 ms |
2228 KB |
Output is correct |
3 |
Correct |
27 ms |
2508 KB |
Output is correct |
4 |
Correct |
27 ms |
2712 KB |
Output is correct |
5 |
Correct |
32 ms |
2824 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
27 ms |
1692 KB |
Output is correct |
2 |
Correct |
24 ms |
1484 KB |
Output is correct |
3 |
Correct |
24 ms |
1624 KB |
Output is correct |
4 |
Correct |
38 ms |
1824 KB |
Output is correct |
5 |
Correct |
26 ms |
2520 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
28 ms |
1808 KB |
Output is correct |
2 |
Correct |
29 ms |
1868 KB |
Output is correct |
3 |
Correct |
27 ms |
1880 KB |
Output is correct |
4 |
Correct |
40 ms |
1868 KB |
Output is correct |
5 |
Correct |
50 ms |
3084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
31 ms |
1868 KB |
Output is correct |
2 |
Correct |
33 ms |
1868 KB |
Output is correct |
3 |
Correct |
28 ms |
1888 KB |
Output is correct |
4 |
Correct |
36 ms |
1864 KB |
Output is correct |
5 |
Correct |
32 ms |
3040 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
120 ms |
8132 KB |
Output is correct |
2 |
Correct |
138 ms |
8016 KB |
Output is correct |
3 |
Correct |
138 ms |
8100 KB |
Output is correct |
4 |
Correct |
194 ms |
8132 KB |
Output is correct |
5 |
Correct |
157 ms |
9312 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
144 ms |
8128 KB |
Output is correct |
2 |
Correct |
218 ms |
8040 KB |
Output is correct |
3 |
Correct |
146 ms |
8128 KB |
Output is correct |
4 |
Correct |
183 ms |
8012 KB |
Output is correct |
5 |
Correct |
166 ms |
9444 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
165 ms |
9696 KB |
Output is correct |
2 |
Correct |
177 ms |
9668 KB |
Output is correct |
3 |
Correct |
168 ms |
9692 KB |
Output is correct |
4 |
Correct |
234 ms |
9624 KB |
Output is correct |
5 |
Correct |
195 ms |
11076 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
167 ms |
9584 KB |
Output is correct |
2 |
Correct |
269 ms |
9688 KB |
Output is correct |
3 |
Correct |
165 ms |
10404 KB |
Output is correct |
4 |
Correct |
221 ms |
10264 KB |
Output is correct |
5 |
Correct |
217 ms |
10904 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
176 ms |
11204 KB |
Output is correct |
2 |
Correct |
201 ms |
11176 KB |
Output is correct |
3 |
Correct |
211 ms |
11256 KB |
Output is correct |
4 |
Correct |
279 ms |
11236 KB |
Output is correct |
5 |
Correct |
229 ms |
12528 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
222 ms |
11264 KB |
Output is correct |
2 |
Correct |
281 ms |
12104 KB |
Output is correct |
3 |
Correct |
189 ms |
11860 KB |
Output is correct |
4 |
Correct |
283 ms |
12396 KB |
Output is correct |
5 |
Correct |
225 ms |
12640 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
214 ms |
12948 KB |
Output is correct |
2 |
Correct |
244 ms |
12828 KB |
Output is correct |
3 |
Correct |
229 ms |
13484 KB |
Output is correct |
4 |
Correct |
328 ms |
13764 KB |
Output is correct |
5 |
Correct |
262 ms |
14020 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
229 ms |
12832 KB |
Output is correct |
2 |
Correct |
367 ms |
13536 KB |
Output is correct |
3 |
Correct |
209 ms |
13460 KB |
Output is correct |
4 |
Correct |
302 ms |
13696 KB |
Output is correct |
5 |
Correct |
273 ms |
14116 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
232 ms |
15944 KB |
Output is correct |
2 |
Correct |
309 ms |
16812 KB |
Output is correct |
3 |
Correct |
279 ms |
18148 KB |
Output is correct |
4 |
Correct |
428 ms |
16604 KB |
Output is correct |
5 |
Correct |
336 ms |
17712 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
316 ms |
15952 KB |
Output is correct |
2 |
Correct |
422 ms |
18112 KB |
Output is correct |
3 |
Correct |
285 ms |
18136 KB |
Output is correct |
4 |
Correct |
383 ms |
16548 KB |
Output is correct |
5 |
Correct |
347 ms |
17748 KB |
Output is correct |