# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
467892 |
2021-08-25T13:42:18 Z |
kaxzert |
Mobile (BOI12_mobile) |
C++17 |
|
547 ms |
35128 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 |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
324 KB |
Output is correct |
4 |
Correct |
0 ms |
316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
332 KB |
Output is correct |
2 |
Correct |
2 ms |
332 KB |
Output is correct |
3 |
Correct |
2 ms |
332 KB |
Output is correct |
4 |
Correct |
2 ms |
336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
332 KB |
Output is correct |
2 |
Correct |
3 ms |
460 KB |
Output is correct |
3 |
Correct |
3 ms |
332 KB |
Output is correct |
4 |
Correct |
3 ms |
460 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 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 |
3 ms |
460 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
332 KB |
Output is correct |
2 |
Correct |
3 ms |
332 KB |
Output is correct |
3 |
Correct |
2 ms |
332 KB |
Output is correct |
4 |
Correct |
3 ms |
332 KB |
Output is correct |
5 |
Correct |
3 ms |
432 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
37 ms |
1484 KB |
Output is correct |
2 |
Correct |
31 ms |
2484 KB |
Output is correct |
3 |
Correct |
22 ms |
1740 KB |
Output is correct |
4 |
Correct |
38 ms |
2652 KB |
Output is correct |
5 |
Correct |
22 ms |
1376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
1484 KB |
Output is correct |
2 |
Correct |
32 ms |
2232 KB |
Output is correct |
3 |
Correct |
38 ms |
2596 KB |
Output is correct |
4 |
Correct |
38 ms |
2752 KB |
Output is correct |
5 |
Correct |
46 ms |
3108 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
32 ms |
1732 KB |
Output is correct |
2 |
Correct |
35 ms |
1516 KB |
Output is correct |
3 |
Correct |
35 ms |
1552 KB |
Output is correct |
4 |
Correct |
54 ms |
1836 KB |
Output is correct |
5 |
Correct |
40 ms |
2512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
41 ms |
1868 KB |
Output is correct |
2 |
Correct |
40 ms |
1868 KB |
Output is correct |
3 |
Correct |
39 ms |
1860 KB |
Output is correct |
4 |
Correct |
52 ms |
1868 KB |
Output is correct |
5 |
Correct |
47 ms |
3084 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
41 ms |
1832 KB |
Output is correct |
2 |
Correct |
42 ms |
1764 KB |
Output is correct |
3 |
Correct |
40 ms |
1864 KB |
Output is correct |
4 |
Correct |
53 ms |
1864 KB |
Output is correct |
5 |
Correct |
46 ms |
3136 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
212 ms |
11508 KB |
Output is correct |
2 |
Correct |
209 ms |
15836 KB |
Output is correct |
3 |
Correct |
202 ms |
15340 KB |
Output is correct |
4 |
Correct |
260 ms |
17684 KB |
Output is correct |
5 |
Correct |
235 ms |
15044 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
216 ms |
14420 KB |
Output is correct |
2 |
Correct |
290 ms |
14768 KB |
Output is correct |
3 |
Correct |
198 ms |
13888 KB |
Output is correct |
4 |
Correct |
259 ms |
17368 KB |
Output is correct |
5 |
Correct |
255 ms |
15416 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
220 ms |
13856 KB |
Output is correct |
2 |
Correct |
253 ms |
18964 KB |
Output is correct |
3 |
Correct |
249 ms |
18384 KB |
Output is correct |
4 |
Correct |
328 ms |
21572 KB |
Output is correct |
5 |
Correct |
287 ms |
17620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
259 ms |
17648 KB |
Output is correct |
2 |
Correct |
329 ms |
17620 KB |
Output is correct |
3 |
Correct |
259 ms |
16528 KB |
Output is correct |
4 |
Correct |
318 ms |
21504 KB |
Output is correct |
5 |
Correct |
285 ms |
18364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
257 ms |
16432 KB |
Output is correct |
2 |
Correct |
297 ms |
22088 KB |
Output is correct |
3 |
Correct |
297 ms |
21404 KB |
Output is correct |
4 |
Correct |
373 ms |
24780 KB |
Output is correct |
5 |
Correct |
326 ms |
20292 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
301 ms |
21296 KB |
Output is correct |
2 |
Correct |
393 ms |
20504 KB |
Output is correct |
3 |
Correct |
280 ms |
19688 KB |
Output is correct |
4 |
Correct |
364 ms |
24524 KB |
Output is correct |
5 |
Correct |
336 ms |
21476 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
308 ms |
19388 KB |
Output is correct |
2 |
Correct |
372 ms |
25140 KB |
Output is correct |
3 |
Correct |
348 ms |
24420 KB |
Output is correct |
4 |
Correct |
440 ms |
28452 KB |
Output is correct |
5 |
Correct |
484 ms |
24116 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
337 ms |
24908 KB |
Output is correct |
2 |
Correct |
454 ms |
23364 KB |
Output is correct |
3 |
Correct |
347 ms |
22328 KB |
Output is correct |
4 |
Correct |
452 ms |
28336 KB |
Output is correct |
5 |
Correct |
414 ms |
24396 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
387 ms |
24632 KB |
Output is correct |
2 |
Correct |
430 ms |
31524 KB |
Output is correct |
3 |
Correct |
438 ms |
30380 KB |
Output is correct |
4 |
Correct |
538 ms |
35128 KB |
Output is correct |
5 |
Correct |
503 ms |
29492 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
419 ms |
31936 KB |
Output is correct |
2 |
Correct |
534 ms |
29188 KB |
Output is correct |
3 |
Correct |
419 ms |
28220 KB |
Output is correct |
4 |
Correct |
547 ms |
17936 KB |
Output is correct |
5 |
Correct |
517 ms |
30680 KB |
Output is correct |