# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
920897 |
2024-02-03T07:29:35 Z |
Kams7 |
Mobile (BOI12_mobile) |
C++17 |
|
338 ms |
31164 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 |
344 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 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
344 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 |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
552 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
532 KB |
Output is correct |
4 |
Correct |
2 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
484 KB |
Output is correct |
5 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
2652 KB |
Output is correct |
2 |
Correct |
20 ms |
2652 KB |
Output is correct |
3 |
Correct |
14 ms |
3316 KB |
Output is correct |
4 |
Correct |
23 ms |
3672 KB |
Output is correct |
5 |
Correct |
12 ms |
2908 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
2652 KB |
Output is correct |
2 |
Correct |
20 ms |
2652 KB |
Output is correct |
3 |
Correct |
26 ms |
2652 KB |
Output is correct |
4 |
Correct |
25 ms |
3676 KB |
Output is correct |
5 |
Correct |
27 ms |
4156 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
21 ms |
2652 KB |
Output is correct |
2 |
Correct |
21 ms |
2652 KB |
Output is correct |
3 |
Correct |
21 ms |
3416 KB |
Output is correct |
4 |
Correct |
39 ms |
4664 KB |
Output is correct |
5 |
Correct |
24 ms |
3416 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
2648 KB |
Output is correct |
2 |
Correct |
24 ms |
3956 KB |
Output is correct |
3 |
Correct |
24 ms |
3676 KB |
Output is correct |
4 |
Correct |
34 ms |
4488 KB |
Output is correct |
5 |
Correct |
30 ms |
3932 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
2648 KB |
Output is correct |
2 |
Correct |
25 ms |
4092 KB |
Output is correct |
3 |
Correct |
23 ms |
3676 KB |
Output is correct |
4 |
Correct |
33 ms |
4480 KB |
Output is correct |
5 |
Correct |
28 ms |
3964 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
107 ms |
8788 KB |
Output is correct |
2 |
Correct |
125 ms |
14868 KB |
Output is correct |
3 |
Correct |
125 ms |
14676 KB |
Output is correct |
4 |
Correct |
161 ms |
16468 KB |
Output is correct |
5 |
Correct |
142 ms |
14160 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
124 ms |
8820 KB |
Output is correct |
2 |
Correct |
184 ms |
14184 KB |
Output is correct |
3 |
Correct |
121 ms |
13352 KB |
Output is correct |
4 |
Correct |
158 ms |
16100 KB |
Output is correct |
5 |
Correct |
142 ms |
14676 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
130 ms |
11128 KB |
Output is correct |
2 |
Correct |
158 ms |
18156 KB |
Output is correct |
3 |
Correct |
155 ms |
17792 KB |
Output is correct |
4 |
Correct |
198 ms |
20344 KB |
Output is correct |
5 |
Correct |
170 ms |
17232 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
146 ms |
10888 KB |
Output is correct |
2 |
Correct |
229 ms |
17140 KB |
Output is correct |
3 |
Correct |
142 ms |
16212 KB |
Output is correct |
4 |
Correct |
193 ms |
20100 KB |
Output is correct |
5 |
Correct |
173 ms |
17604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
147 ms |
12924 KB |
Output is correct |
2 |
Correct |
174 ms |
21804 KB |
Output is correct |
3 |
Correct |
173 ms |
20816 KB |
Output is correct |
4 |
Correct |
233 ms |
23532 KB |
Output is correct |
5 |
Correct |
194 ms |
20000 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
175 ms |
12880 KB |
Output is correct |
2 |
Correct |
247 ms |
20516 KB |
Output is correct |
3 |
Correct |
171 ms |
19488 KB |
Output is correct |
4 |
Correct |
224 ms |
23632 KB |
Output is correct |
5 |
Correct |
201 ms |
20816 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
167 ms |
14932 KB |
Output is correct |
2 |
Correct |
199 ms |
24636 KB |
Output is correct |
3 |
Correct |
192 ms |
24204 KB |
Output is correct |
4 |
Correct |
255 ms |
27224 KB |
Output is correct |
5 |
Correct |
228 ms |
23692 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
193 ms |
14984 KB |
Output is correct |
2 |
Correct |
273 ms |
23376 KB |
Output is correct |
3 |
Correct |
184 ms |
22660 KB |
Output is correct |
4 |
Correct |
255 ms |
26968 KB |
Output is correct |
5 |
Correct |
250 ms |
24148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
212 ms |
15968 KB |
Output is correct |
2 |
Correct |
243 ms |
27928 KB |
Output is correct |
3 |
Correct |
244 ms |
27500 KB |
Output is correct |
4 |
Correct |
318 ms |
30544 KB |
Output is correct |
5 |
Correct |
286 ms |
26452 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
240 ms |
15956 KB |
Output is correct |
2 |
Correct |
338 ms |
26192 KB |
Output is correct |
3 |
Correct |
233 ms |
25428 KB |
Output is correct |
4 |
Correct |
321 ms |
31164 KB |
Output is correct |
5 |
Correct |
292 ms |
27496 KB |
Output is correct |