# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
979720 |
2024-05-11T10:20:51 Z |
12345678 |
Mobile (BOI12_mobile) |
C++17 |
|
552 ms |
35456 KB |
#include <bits/stdc++.h>
using namespace std;
const int nx=1e6+5;
int n, L;
pair<double, double> p[nx];
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin>>n>>L;
for (int i=1; i<=n; i++) cin>>p[i].first>>p[i].second;
double l=0, r=2e9;
while (r-l>1e-4)
{
double md=(l+r)/2, mx=0;
for (int i=1; i<=n; i++)
{
double x=md*md-p[i].second*p[i].second;
if (x<0) continue;
x=sqrt(x);
if (p[i].first-x<=mx) mx=max(mx, p[i].first+x);
}
if (mx>=L) r=md;
else l=md;
}
cout<<fixed<<setprecision(4)<<l;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
464 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
500 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 KB |
Output is correct |
2 |
Correct |
2 ms |
528 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
536 KB |
Output is correct |
2 |
Correct |
3 ms |
472 KB |
Output is correct |
3 |
Correct |
3 ms |
348 KB |
Output is correct |
4 |
Correct |
3 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
348 KB |
Output is correct |
2 |
Correct |
3 ms |
604 KB |
Output is correct |
3 |
Correct |
2 ms |
348 KB |
Output is correct |
4 |
Correct |
3 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
476 KB |
Output is correct |
2 |
Correct |
3 ms |
604 KB |
Output is correct |
3 |
Correct |
3 ms |
348 KB |
Output is correct |
4 |
Correct |
3 ms |
604 KB |
Output is correct |
5 |
Correct |
3 ms |
476 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
39 ms |
3332 KB |
Output is correct |
2 |
Correct |
37 ms |
3752 KB |
Output is correct |
3 |
Correct |
24 ms |
3156 KB |
Output is correct |
4 |
Correct |
36 ms |
3692 KB |
Output is correct |
5 |
Correct |
21 ms |
3084 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
35 ms |
3412 KB |
Output is correct |
2 |
Correct |
38 ms |
3484 KB |
Output is correct |
3 |
Correct |
46 ms |
3676 KB |
Output is correct |
4 |
Correct |
39 ms |
3880 KB |
Output is correct |
5 |
Correct |
59 ms |
3956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
3164 KB |
Output is correct |
2 |
Correct |
39 ms |
3672 KB |
Output is correct |
3 |
Correct |
37 ms |
3420 KB |
Output is correct |
4 |
Correct |
54 ms |
4576 KB |
Output is correct |
5 |
Correct |
39 ms |
3440 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
48 ms |
4196 KB |
Output is correct |
2 |
Correct |
57 ms |
3924 KB |
Output is correct |
3 |
Correct |
43 ms |
3664 KB |
Output is correct |
4 |
Correct |
50 ms |
4592 KB |
Output is correct |
5 |
Correct |
53 ms |
4068 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
53 ms |
4080 KB |
Output is correct |
2 |
Correct |
55 ms |
4080 KB |
Output is correct |
3 |
Correct |
48 ms |
3908 KB |
Output is correct |
4 |
Correct |
47 ms |
4436 KB |
Output is correct |
5 |
Correct |
46 ms |
3956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
224 ms |
13036 KB |
Output is correct |
2 |
Correct |
246 ms |
16356 KB |
Output is correct |
3 |
Correct |
258 ms |
15956 KB |
Output is correct |
4 |
Correct |
274 ms |
18332 KB |
Output is correct |
5 |
Correct |
243 ms |
15444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
257 ms |
17012 KB |
Output is correct |
2 |
Correct |
282 ms |
15440 KB |
Output is correct |
3 |
Correct |
226 ms |
14680 KB |
Output is correct |
4 |
Correct |
256 ms |
18024 KB |
Output is correct |
5 |
Correct |
254 ms |
15952 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
268 ms |
15984 KB |
Output is correct |
2 |
Correct |
292 ms |
19940 KB |
Output is correct |
3 |
Correct |
292 ms |
19580 KB |
Output is correct |
4 |
Correct |
319 ms |
22660 KB |
Output is correct |
5 |
Correct |
283 ms |
18812 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
290 ms |
20588 KB |
Output is correct |
2 |
Correct |
322 ms |
18824 KB |
Output is correct |
3 |
Correct |
263 ms |
17724 KB |
Output is correct |
4 |
Correct |
282 ms |
22512 KB |
Output is correct |
5 |
Correct |
276 ms |
19432 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
329 ms |
18988 KB |
Output is correct |
2 |
Correct |
341 ms |
24148 KB |
Output is correct |
3 |
Correct |
340 ms |
23024 KB |
Output is correct |
4 |
Correct |
365 ms |
26372 KB |
Output is correct |
5 |
Correct |
303 ms |
21980 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
345 ms |
24452 KB |
Output is correct |
2 |
Correct |
399 ms |
22192 KB |
Output is correct |
3 |
Correct |
341 ms |
21324 KB |
Output is correct |
4 |
Correct |
351 ms |
26092 KB |
Output is correct |
5 |
Correct |
362 ms |
23024 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
364 ms |
21740 KB |
Output is correct |
2 |
Correct |
427 ms |
27364 KB |
Output is correct |
3 |
Correct |
411 ms |
26624 KB |
Output is correct |
4 |
Correct |
399 ms |
30684 KB |
Output is correct |
5 |
Correct |
372 ms |
26356 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
394 ms |
28004 KB |
Output is correct |
2 |
Correct |
437 ms |
25560 KB |
Output is correct |
3 |
Correct |
417 ms |
24304 KB |
Output is correct |
4 |
Correct |
411 ms |
30288 KB |
Output is correct |
5 |
Correct |
385 ms |
26708 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
479 ms |
24660 KB |
Output is correct |
2 |
Correct |
515 ms |
31648 KB |
Output is correct |
3 |
Correct |
534 ms |
30660 KB |
Output is correct |
4 |
Correct |
492 ms |
35300 KB |
Output is correct |
5 |
Correct |
488 ms |
29564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
515 ms |
32492 KB |
Output is correct |
2 |
Correct |
552 ms |
29296 KB |
Output is correct |
3 |
Correct |
500 ms |
28284 KB |
Output is correct |
4 |
Correct |
522 ms |
35456 KB |
Output is correct |
5 |
Correct |
491 ms |
30736 KB |
Output is correct |