# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
589127 |
2022-07-04T09:33:56 Z |
jakubd |
Mobile (BOI12_mobile) |
C++17 |
|
691 ms |
35344 KB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false); cin.tie(0);
int n, l; cin >> n >> l;
vector<long long> x(n), y(n);
for (int i = 0; i < n; i++) {
cin >> x[i] >> y[i];
}
double left = 0, right = 1e9;
for (int it = 0; it < 60; it++) {
double mid = (left + right) / 2, cur = 0;
for (int i = 0; i < n; i++) {
double dx = sqrt(mid * mid - y[i] * y[i]);
if (x[i] - dx <= cur) cur = max(cur, x[i] + dx);
}
(cur >= l ? right : left) = mid;
}
cout << fixed << setprecision(6) << left << "\n";
return 0;
};
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 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 |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
272 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 |
2 ms |
340 KB |
Output is correct |
4 |
Correct |
2 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 |
340 KB |
Output is correct |
3 |
Correct |
2 ms |
340 KB |
Output is correct |
4 |
Correct |
4 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
340 KB |
Output is correct |
2 |
Correct |
3 ms |
340 KB |
Output is correct |
3 |
Correct |
2 ms |
340 KB |
Output is correct |
4 |
Correct |
3 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
340 KB |
Output is correct |
2 |
Correct |
4 ms |
396 KB |
Output is correct |
3 |
Correct |
2 ms |
340 KB |
Output is correct |
4 |
Correct |
3 ms |
340 KB |
Output is correct |
5 |
Correct |
4 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
47 ms |
1492 KB |
Output is correct |
2 |
Correct |
26 ms |
1492 KB |
Output is correct |
3 |
Correct |
27 ms |
1108 KB |
Output is correct |
4 |
Correct |
42 ms |
1492 KB |
Output is correct |
5 |
Correct |
23 ms |
1108 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
1540 KB |
Output is correct |
2 |
Correct |
36 ms |
1364 KB |
Output is correct |
3 |
Correct |
40 ms |
1584 KB |
Output is correct |
4 |
Correct |
39 ms |
1492 KB |
Output is correct |
5 |
Correct |
44 ms |
1620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
1692 KB |
Output is correct |
2 |
Correct |
37 ms |
1620 KB |
Output is correct |
3 |
Correct |
31 ms |
1620 KB |
Output is correct |
4 |
Correct |
55 ms |
1876 KB |
Output is correct |
5 |
Correct |
41 ms |
1620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
1876 KB |
Output is correct |
2 |
Correct |
36 ms |
1880 KB |
Output is correct |
3 |
Correct |
35 ms |
1876 KB |
Output is correct |
4 |
Correct |
57 ms |
1880 KB |
Output is correct |
5 |
Correct |
49 ms |
1884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
35 ms |
1876 KB |
Output is correct |
2 |
Correct |
39 ms |
1876 KB |
Output is correct |
3 |
Correct |
38 ms |
1876 KB |
Output is correct |
4 |
Correct |
57 ms |
1876 KB |
Output is correct |
5 |
Correct |
47 ms |
1876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
231 ms |
8148 KB |
Output is correct |
2 |
Correct |
240 ms |
8192 KB |
Output is correct |
3 |
Correct |
180 ms |
8148 KB |
Output is correct |
4 |
Correct |
268 ms |
8148 KB |
Output is correct |
5 |
Correct |
263 ms |
8148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
195 ms |
8032 KB |
Output is correct |
2 |
Correct |
384 ms |
8196 KB |
Output is correct |
3 |
Correct |
195 ms |
8140 KB |
Output is correct |
4 |
Correct |
318 ms |
8148 KB |
Output is correct |
5 |
Correct |
335 ms |
8148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
243 ms |
9700 KB |
Output is correct |
2 |
Correct |
234 ms |
9704 KB |
Output is correct |
3 |
Correct |
300 ms |
9704 KB |
Output is correct |
4 |
Correct |
406 ms |
9700 KB |
Output is correct |
5 |
Correct |
348 ms |
9708 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
236 ms |
9712 KB |
Output is correct |
2 |
Correct |
461 ms |
9700 KB |
Output is correct |
3 |
Correct |
359 ms |
9704 KB |
Output is correct |
4 |
Correct |
382 ms |
9712 KB |
Output is correct |
5 |
Correct |
406 ms |
9704 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
300 ms |
11272 KB |
Output is correct |
2 |
Correct |
284 ms |
11276 KB |
Output is correct |
3 |
Correct |
339 ms |
11280 KB |
Output is correct |
4 |
Correct |
445 ms |
11276 KB |
Output is correct |
5 |
Correct |
476 ms |
20368 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
292 ms |
11280 KB |
Output is correct |
2 |
Correct |
588 ms |
11276 KB |
Output is correct |
3 |
Correct |
271 ms |
19668 KB |
Output is correct |
4 |
Correct |
402 ms |
24672 KB |
Output is correct |
5 |
Correct |
368 ms |
21428 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
252 ms |
12836 KB |
Output is correct |
2 |
Correct |
272 ms |
12844 KB |
Output is correct |
3 |
Correct |
311 ms |
12840 KB |
Output is correct |
4 |
Correct |
462 ms |
12756 KB |
Output is correct |
5 |
Correct |
392 ms |
24008 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
378 ms |
12844 KB |
Output is correct |
2 |
Correct |
497 ms |
12840 KB |
Output is correct |
3 |
Correct |
359 ms |
22368 KB |
Output is correct |
4 |
Correct |
450 ms |
28328 KB |
Output is correct |
5 |
Correct |
445 ms |
24356 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
307 ms |
15972 KB |
Output is correct |
2 |
Correct |
388 ms |
15972 KB |
Output is correct |
3 |
Correct |
346 ms |
15976 KB |
Output is correct |
4 |
Correct |
588 ms |
15972 KB |
Output is correct |
5 |
Correct |
516 ms |
29568 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
347 ms |
15972 KB |
Output is correct |
2 |
Correct |
691 ms |
15976 KB |
Output is correct |
3 |
Correct |
386 ms |
28280 KB |
Output is correct |
4 |
Correct |
586 ms |
35344 KB |
Output is correct |
5 |
Correct |
626 ms |
30732 KB |
Output is correct |