#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long int n, L;
cin>>n>>L;
vector<pair<long double, long double>>v(n);
for(int i=0; i<n; i++)
{
cin>>v[i].first>>v[i].second;
}
long double l=1, r=1.2e9;
while(r-l>1e-3)
{
long double mid=(l+r)/2.0;
long double granica=0;
for(int i=0; i<n; i++)
{
long double opseg=sqrt(mid*mid-v[i].second*v[i].second);
long double minn=v[i].first-opseg;
long double maxx=v[i].first+opseg;
if(minn<=granica)
{
granica=max(granica, maxx);
}
}
if(granica<L)
{
l=mid;
}
else
r=mid;
}
cout<<fixed<<setprecision(4)<<l;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
344 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
348 KB |
Output is correct |
2 |
Correct |
3 ms |
468 KB |
Output is correct |
3 |
Correct |
2 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
600 KB |
Output is correct |
2 |
Correct |
3 ms |
604 KB |
Output is correct |
3 |
Correct |
3 ms |
604 KB |
Output is correct |
4 |
Correct |
6 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
600 KB |
Output is correct |
2 |
Correct |
3 ms |
604 KB |
Output is correct |
3 |
Correct |
3 ms |
604 KB |
Output is correct |
4 |
Correct |
6 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
472 KB |
Output is correct |
3 |
Correct |
3 ms |
604 KB |
Output is correct |
4 |
Correct |
6 ms |
604 KB |
Output is correct |
5 |
Correct |
4 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
63 ms |
3416 KB |
Output is correct |
2 |
Correct |
40 ms |
3676 KB |
Output is correct |
3 |
Correct |
33 ms |
2648 KB |
Output is correct |
4 |
Correct |
83 ms |
3844 KB |
Output is correct |
5 |
Correct |
41 ms |
2392 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
73 ms |
3416 KB |
Output is correct |
2 |
Correct |
68 ms |
3416 KB |
Output is correct |
3 |
Correct |
84 ms |
3928 KB |
Output is correct |
4 |
Correct |
90 ms |
3928 KB |
Output is correct |
5 |
Correct |
106 ms |
4580 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
46 ms |
3672 KB |
Output is correct |
2 |
Correct |
43 ms |
4184 KB |
Output is correct |
3 |
Correct |
56 ms |
3864 KB |
Output is correct |
4 |
Correct |
126 ms |
5488 KB |
Output is correct |
5 |
Correct |
78 ms |
4188 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
49 ms |
4944 KB |
Output is correct |
2 |
Correct |
54 ms |
4956 KB |
Output is correct |
3 |
Correct |
59 ms |
4440 KB |
Output is correct |
4 |
Correct |
119 ms |
5464 KB |
Output is correct |
5 |
Correct |
97 ms |
4700 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
58 ms |
4952 KB |
Output is correct |
2 |
Correct |
59 ms |
4948 KB |
Output is correct |
3 |
Correct |
59 ms |
4432 KB |
Output is correct |
4 |
Correct |
120 ms |
5456 KB |
Output is correct |
5 |
Correct |
104 ms |
4692 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
262 ms |
20304 KB |
Output is correct |
2 |
Correct |
253 ms |
23632 KB |
Output is correct |
3 |
Correct |
243 ms |
23120 KB |
Output is correct |
4 |
Correct |
570 ms |
25424 KB |
Output is correct |
5 |
Correct |
492 ms |
22868 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
239 ms |
24148 KB |
Output is correct |
2 |
Correct |
432 ms |
22612 KB |
Output is correct |
3 |
Correct |
312 ms |
21844 KB |
Output is correct |
4 |
Correct |
590 ms |
25276 KB |
Output is correct |
5 |
Correct |
523 ms |
23280 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
295 ms |
24400 KB |
Output is correct |
2 |
Correct |
302 ms |
28316 KB |
Output is correct |
3 |
Correct |
278 ms |
27732 KB |
Output is correct |
4 |
Correct |
719 ms |
31056 KB |
Output is correct |
5 |
Correct |
640 ms |
26964 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
290 ms |
29012 KB |
Output is correct |
2 |
Correct |
540 ms |
27048 KB |
Output is correct |
3 |
Correct |
353 ms |
25896 KB |
Output is correct |
4 |
Correct |
671 ms |
30800 KB |
Output is correct |
5 |
Correct |
622 ms |
27732 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
337 ms |
28372 KB |
Output is correct |
2 |
Correct |
326 ms |
33104 KB |
Output is correct |
3 |
Correct |
345 ms |
32340 KB |
Output is correct |
4 |
Correct |
799 ms |
35812 KB |
Output is correct |
5 |
Correct |
656 ms |
31316 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
335 ms |
33748 KB |
Output is correct |
2 |
Correct |
595 ms |
31568 KB |
Output is correct |
3 |
Correct |
414 ms |
30548 KB |
Output is correct |
4 |
Correct |
819 ms |
35664 KB |
Output is correct |
5 |
Correct |
682 ms |
32336 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
381 ms |
32340 KB |
Output is correct |
2 |
Correct |
383 ms |
37840 KB |
Output is correct |
3 |
Correct |
389 ms |
36948 KB |
Output is correct |
4 |
Correct |
929 ms |
41104 KB |
Output is correct |
5 |
Correct |
758 ms |
36432 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
397 ms |
38472 KB |
Output is correct |
2 |
Correct |
685 ms |
35920 KB |
Output is correct |
3 |
Correct |
461 ms |
34896 KB |
Output is correct |
4 |
Correct |
959 ms |
40784 KB |
Output is correct |
5 |
Correct |
787 ms |
36944 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
506 ms |
40320 KB |
Output is correct |
2 |
Correct |
509 ms |
47184 KB |
Output is correct |
3 |
Correct |
478 ms |
46164 KB |
Output is correct |
4 |
Execution timed out |
1057 ms |
50696 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
490 ms |
48132 KB |
Output is correct |
2 |
Correct |
851 ms |
44884 KB |
Output is correct |
3 |
Correct |
611 ms |
44116 KB |
Output is correct |
4 |
Execution timed out |
1032 ms |
50952 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |