# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
549476 |
2022-04-15T21:33:01 Z |
aidan0626 |
Mobile (BOI12_mobile) |
C++14 |
|
424 ms |
35316 KB |
#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
pair<long long, long long> p[1000000];
int main() {
ios_base::sync_with_stdio(0);
cin.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 mid = (l + r) / 2, curr = 0;
for (int i = 0; i < n; i++) {
double delta = sqrt(mid * mid - p[i].y * p[i].y);
double a = p[i].x - delta, b = p[i].x + delta;
if (a <= curr) curr = max(curr, b);
}
if (curr >= len) r = mid;
else l = mid;
}
cout << fixed << setprecision(4) << l;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
332 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
328 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
340 KB |
Output is correct |
2 |
Correct |
2 ms |
468 KB |
Output is correct |
3 |
Correct |
2 ms |
340 KB |
Output is correct |
4 |
Correct |
2 ms |
468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
340 KB |
Output is correct |
2 |
Correct |
2 ms |
468 KB |
Output is correct |
3 |
Correct |
2 ms |
340 KB |
Output is correct |
4 |
Correct |
2 ms |
468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
340 KB |
Output is correct |
2 |
Correct |
2 ms |
472 KB |
Output is correct |
3 |
Correct |
2 ms |
340 KB |
Output is correct |
4 |
Correct |
4 ms |
420 KB |
Output is correct |
5 |
Correct |
3 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
2260 KB |
Output is correct |
2 |
Correct |
23 ms |
2528 KB |
Output is correct |
3 |
Correct |
15 ms |
1796 KB |
Output is correct |
4 |
Correct |
27 ms |
2656 KB |
Output is correct |
5 |
Correct |
13 ms |
1492 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
2256 KB |
Output is correct |
2 |
Correct |
26 ms |
2208 KB |
Output is correct |
3 |
Correct |
29 ms |
2516 KB |
Output is correct |
4 |
Correct |
31 ms |
2748 KB |
Output is correct |
5 |
Correct |
30 ms |
3048 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
20 ms |
2264 KB |
Output is correct |
2 |
Correct |
23 ms |
2780 KB |
Output is correct |
3 |
Correct |
22 ms |
2516 KB |
Output is correct |
4 |
Correct |
39 ms |
3812 KB |
Output is correct |
5 |
Correct |
29 ms |
2644 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
3408 KB |
Output is correct |
2 |
Correct |
33 ms |
3252 KB |
Output is correct |
3 |
Correct |
27 ms |
2860 KB |
Output is correct |
4 |
Correct |
39 ms |
3836 KB |
Output is correct |
5 |
Correct |
32 ms |
3016 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
3332 KB |
Output is correct |
2 |
Correct |
37 ms |
3188 KB |
Output is correct |
3 |
Correct |
32 ms |
2804 KB |
Output is correct |
4 |
Correct |
39 ms |
3924 KB |
Output is correct |
5 |
Correct |
32 ms |
3036 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
121 ms |
12436 KB |
Output is correct |
2 |
Correct |
159 ms |
15848 KB |
Output is correct |
3 |
Correct |
162 ms |
15308 KB |
Output is correct |
4 |
Correct |
188 ms |
17672 KB |
Output is correct |
5 |
Correct |
230 ms |
14964 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
155 ms |
16348 KB |
Output is correct |
2 |
Correct |
213 ms |
14668 KB |
Output is correct |
3 |
Correct |
170 ms |
13844 KB |
Output is correct |
4 |
Correct |
183 ms |
17480 KB |
Output is correct |
5 |
Correct |
164 ms |
15436 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
158 ms |
14884 KB |
Output is correct |
2 |
Correct |
182 ms |
18956 KB |
Output is correct |
3 |
Correct |
172 ms |
18400 KB |
Output is correct |
4 |
Correct |
247 ms |
21648 KB |
Output is correct |
5 |
Correct |
196 ms |
17812 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
183 ms |
19548 KB |
Output is correct |
2 |
Correct |
274 ms |
17616 KB |
Output is correct |
3 |
Correct |
166 ms |
16632 KB |
Output is correct |
4 |
Correct |
267 ms |
21340 KB |
Output is correct |
5 |
Correct |
205 ms |
18372 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
172 ms |
17308 KB |
Output is correct |
2 |
Correct |
212 ms |
22080 KB |
Output is correct |
3 |
Correct |
213 ms |
21460 KB |
Output is correct |
4 |
Correct |
306 ms |
24784 KB |
Output is correct |
5 |
Correct |
230 ms |
20312 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
231 ms |
22732 KB |
Output is correct |
2 |
Correct |
288 ms |
20424 KB |
Output is correct |
3 |
Correct |
216 ms |
19548 KB |
Output is correct |
4 |
Correct |
266 ms |
24576 KB |
Output is correct |
5 |
Correct |
252 ms |
21412 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
214 ms |
19772 KB |
Output is correct |
2 |
Correct |
237 ms |
25252 KB |
Output is correct |
3 |
Correct |
261 ms |
24484 KB |
Output is correct |
4 |
Correct |
298 ms |
28496 KB |
Output is correct |
5 |
Correct |
290 ms |
24092 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
271 ms |
26040 KB |
Output is correct |
2 |
Correct |
326 ms |
23428 KB |
Output is correct |
3 |
Correct |
263 ms |
22368 KB |
Output is correct |
4 |
Correct |
302 ms |
28320 KB |
Output is correct |
5 |
Correct |
301 ms |
24436 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
237 ms |
24656 KB |
Output is correct |
2 |
Correct |
327 ms |
31512 KB |
Output is correct |
3 |
Correct |
293 ms |
30532 KB |
Output is correct |
4 |
Correct |
404 ms |
35164 KB |
Output is correct |
5 |
Correct |
357 ms |
29444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
315 ms |
32492 KB |
Output is correct |
2 |
Correct |
424 ms |
29184 KB |
Output is correct |
3 |
Correct |
318 ms |
28252 KB |
Output is correct |
4 |
Correct |
392 ms |
35316 KB |
Output is correct |
5 |
Correct |
353 ms |
30716 KB |
Output is correct |