# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
781095 |
2023-07-12T17:38:33 Z |
uped |
Mobile (BOI12_mobile) |
C++14 |
|
358 ms |
15956 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 = 1e10;
while (r - l > 1e-3) {
double radius = (l + r) / 2.0;
double mx = 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 <= mx) {
mx = max(x + a, mx);
}
}
if (mx >= len) {
r = radius;
} else {
l = radius;
}
}
cout << fixed << setprecision(4) << l;
return 0;
}
# |
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 |
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 |
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 |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
3 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
396 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 |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
29 ms |
1492 KB |
Output is correct |
2 |
Correct |
19 ms |
1492 KB |
Output is correct |
3 |
Correct |
14 ms |
1108 KB |
Output is correct |
4 |
Correct |
25 ms |
1492 KB |
Output is correct |
5 |
Correct |
13 ms |
1108 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
22 ms |
1492 KB |
Output is correct |
2 |
Correct |
21 ms |
1364 KB |
Output is correct |
3 |
Correct |
31 ms |
1512 KB |
Output is correct |
4 |
Correct |
25 ms |
1492 KB |
Output is correct |
5 |
Correct |
29 ms |
1620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
20 ms |
1620 KB |
Output is correct |
2 |
Correct |
21 ms |
1620 KB |
Output is correct |
3 |
Correct |
21 ms |
1620 KB |
Output is correct |
4 |
Correct |
43 ms |
1876 KB |
Output is correct |
5 |
Correct |
26 ms |
1620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
1876 KB |
Output is correct |
2 |
Correct |
25 ms |
1876 KB |
Output is correct |
3 |
Correct |
24 ms |
1876 KB |
Output is correct |
4 |
Correct |
35 ms |
1792 KB |
Output is correct |
5 |
Correct |
30 ms |
1876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
26 ms |
1876 KB |
Output is correct |
2 |
Correct |
25 ms |
1876 KB |
Output is correct |
3 |
Correct |
25 ms |
1876 KB |
Output is correct |
4 |
Correct |
38 ms |
1876 KB |
Output is correct |
5 |
Correct |
30 ms |
1876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
115 ms |
8148 KB |
Output is correct |
2 |
Correct |
131 ms |
8148 KB |
Output is correct |
3 |
Correct |
128 ms |
8148 KB |
Output is correct |
4 |
Correct |
172 ms |
8148 KB |
Output is correct |
5 |
Correct |
173 ms |
8148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
139 ms |
8148 KB |
Output is correct |
2 |
Correct |
200 ms |
8064 KB |
Output is correct |
3 |
Correct |
122 ms |
8148 KB |
Output is correct |
4 |
Correct |
176 ms |
8148 KB |
Output is correct |
5 |
Correct |
155 ms |
8148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
130 ms |
9684 KB |
Output is correct |
2 |
Correct |
150 ms |
9684 KB |
Output is correct |
3 |
Correct |
153 ms |
9684 KB |
Output is correct |
4 |
Correct |
209 ms |
9684 KB |
Output is correct |
5 |
Correct |
182 ms |
9684 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
158 ms |
9684 KB |
Output is correct |
2 |
Correct |
235 ms |
9684 KB |
Output is correct |
3 |
Correct |
144 ms |
9684 KB |
Output is correct |
4 |
Correct |
206 ms |
9684 KB |
Output is correct |
5 |
Correct |
197 ms |
9684 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
155 ms |
11220 KB |
Output is correct |
2 |
Correct |
175 ms |
11220 KB |
Output is correct |
3 |
Correct |
174 ms |
11220 KB |
Output is correct |
4 |
Correct |
242 ms |
11220 KB |
Output is correct |
5 |
Correct |
210 ms |
11220 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
177 ms |
11220 KB |
Output is correct |
2 |
Correct |
265 ms |
11220 KB |
Output is correct |
3 |
Correct |
176 ms |
11220 KB |
Output is correct |
4 |
Correct |
243 ms |
11220 KB |
Output is correct |
5 |
Correct |
259 ms |
11344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
175 ms |
12796 KB |
Output is correct |
2 |
Correct |
201 ms |
12756 KB |
Output is correct |
3 |
Correct |
213 ms |
12756 KB |
Output is correct |
4 |
Correct |
276 ms |
12756 KB |
Output is correct |
5 |
Correct |
269 ms |
12756 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
201 ms |
12756 KB |
Output is correct |
2 |
Correct |
290 ms |
12756 KB |
Output is correct |
3 |
Correct |
196 ms |
12756 KB |
Output is correct |
4 |
Correct |
277 ms |
12756 KB |
Output is correct |
5 |
Correct |
260 ms |
12756 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
216 ms |
15956 KB |
Output is correct |
2 |
Correct |
252 ms |
15956 KB |
Output is correct |
3 |
Correct |
245 ms |
15896 KB |
Output is correct |
4 |
Correct |
348 ms |
15956 KB |
Output is correct |
5 |
Correct |
308 ms |
15956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
253 ms |
15956 KB |
Output is correct |
2 |
Correct |
358 ms |
15956 KB |
Output is correct |
3 |
Correct |
248 ms |
15956 KB |
Output is correct |
4 |
Correct |
352 ms |
15956 KB |
Output is correct |
5 |
Correct |
310 ms |
15956 KB |
Output is correct |