# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
781094 |
2023-07-12T17:37:05 Z |
uped |
Mobile (BOI12_mobile) |
C++14 |
|
367 ms |
35300 KB |
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
void fastio() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
}
int main() {
fastio();
int n, len;
cin >> n >> len;
vector<pair<ll, ll>> v(n);
for (int i = 0; i < n; ++i) {
int a, b;
cin >> a >> b;
v[i] = {a, b};
}
double l = 0.0, r = 1.5e9;
while (r - l > 1e-3) {
double radius = (l + r) / 2.0;
double cur = 0;
for (int j = 0; j < n; ++j) {
ll x = v[j].first;
ll y = v[j].second;
double a = sqrt( radius * radius - y * y);
if (x - a <= cur) cur = max(x + a, cur);
}
if (cur >= len) {
r = radius;
} else {
l = radius;
}
}
cout << fixed << setprecision(4) << l;
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 |
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 |
340 KB |
Output is correct |
2 |
Correct |
2 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 |
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 |
3 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 |
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 |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
2 ms |
340 KB |
Output is correct |
5 |
Correct |
2 ms |
440 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
1492 KB |
Output is correct |
2 |
Correct |
21 ms |
1492 KB |
Output is correct |
3 |
Correct |
13 ms |
1664 KB |
Output is correct |
4 |
Correct |
25 ms |
2644 KB |
Output is correct |
5 |
Correct |
13 ms |
1480 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
1492 KB |
Output is correct |
2 |
Correct |
21 ms |
1364 KB |
Output is correct |
3 |
Correct |
24 ms |
1492 KB |
Output is correct |
4 |
Correct |
26 ms |
2772 KB |
Output is correct |
5 |
Correct |
30 ms |
3084 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
1620 KB |
Output is correct |
2 |
Correct |
20 ms |
1620 KB |
Output is correct |
3 |
Correct |
21 ms |
2536 KB |
Output is correct |
4 |
Correct |
35 ms |
3800 KB |
Output is correct |
5 |
Correct |
25 ms |
2644 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
1876 KB |
Output is correct |
2 |
Correct |
24 ms |
1876 KB |
Output is correct |
3 |
Correct |
24 ms |
2908 KB |
Output is correct |
4 |
Correct |
36 ms |
3808 KB |
Output is correct |
5 |
Correct |
30 ms |
3032 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
1876 KB |
Output is correct |
2 |
Correct |
24 ms |
1876 KB |
Output is correct |
3 |
Correct |
24 ms |
2908 KB |
Output is correct |
4 |
Correct |
40 ms |
3788 KB |
Output is correct |
5 |
Correct |
33 ms |
3156 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
107 ms |
8148 KB |
Output is correct |
2 |
Correct |
126 ms |
8076 KB |
Output is correct |
3 |
Correct |
124 ms |
15304 KB |
Output is correct |
4 |
Correct |
209 ms |
17608 KB |
Output is correct |
5 |
Correct |
150 ms |
14928 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
126 ms |
8148 KB |
Output is correct |
2 |
Correct |
215 ms |
14664 KB |
Output is correct |
3 |
Correct |
124 ms |
13892 KB |
Output is correct |
4 |
Correct |
171 ms |
17364 KB |
Output is correct |
5 |
Correct |
153 ms |
15428 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
125 ms |
9684 KB |
Output is correct |
2 |
Correct |
145 ms |
9684 KB |
Output is correct |
3 |
Correct |
156 ms |
18408 KB |
Output is correct |
4 |
Correct |
215 ms |
21480 KB |
Output is correct |
5 |
Correct |
182 ms |
17640 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
166 ms |
9684 KB |
Output is correct |
2 |
Correct |
234 ms |
17636 KB |
Output is correct |
3 |
Correct |
145 ms |
16484 KB |
Output is correct |
4 |
Correct |
212 ms |
21324 KB |
Output is correct |
5 |
Correct |
184 ms |
18412 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
148 ms |
11264 KB |
Output is correct |
2 |
Correct |
175 ms |
11220 KB |
Output is correct |
3 |
Correct |
170 ms |
21384 KB |
Output is correct |
4 |
Correct |
286 ms |
24780 KB |
Output is correct |
5 |
Correct |
217 ms |
20200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
172 ms |
11220 KB |
Output is correct |
2 |
Correct |
261 ms |
20484 KB |
Output is correct |
3 |
Correct |
203 ms |
19532 KB |
Output is correct |
4 |
Correct |
240 ms |
24596 KB |
Output is correct |
5 |
Correct |
220 ms |
21324 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
172 ms |
12756 KB |
Output is correct |
2 |
Correct |
225 ms |
12756 KB |
Output is correct |
3 |
Correct |
196 ms |
24360 KB |
Output is correct |
4 |
Correct |
287 ms |
28452 KB |
Output is correct |
5 |
Correct |
246 ms |
23984 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
201 ms |
12756 KB |
Output is correct |
2 |
Correct |
316 ms |
23324 KB |
Output is correct |
3 |
Correct |
194 ms |
22308 KB |
Output is correct |
4 |
Correct |
284 ms |
28328 KB |
Output is correct |
5 |
Correct |
250 ms |
24380 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
210 ms |
15956 KB |
Output is correct |
2 |
Correct |
280 ms |
15956 KB |
Output is correct |
3 |
Correct |
242 ms |
30452 KB |
Output is correct |
4 |
Correct |
367 ms |
35164 KB |
Output is correct |
5 |
Correct |
303 ms |
29532 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
245 ms |
15892 KB |
Output is correct |
2 |
Correct |
362 ms |
29276 KB |
Output is correct |
3 |
Correct |
243 ms |
28252 KB |
Output is correct |
4 |
Correct |
352 ms |
35300 KB |
Output is correct |
5 |
Correct |
310 ms |
30684 KB |
Output is correct |