# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
732535 |
2023-04-29T05:29:48 Z |
uy842003 |
Mobile (BOI12_mobile) |
C++17 |
|
471 ms |
35272 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 |
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 |
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 |
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 |
6 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 |
3 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 |
4 ms |
336 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 |
28 ms |
1500 KB |
Output is correct |
2 |
Correct |
23 ms |
1532 KB |
Output is correct |
3 |
Correct |
15 ms |
1168 KB |
Output is correct |
4 |
Correct |
31 ms |
1480 KB |
Output is correct |
5 |
Correct |
22 ms |
1112 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
28 ms |
1524 KB |
Output is correct |
2 |
Correct |
23 ms |
1364 KB |
Output is correct |
3 |
Correct |
27 ms |
1604 KB |
Output is correct |
4 |
Correct |
29 ms |
1544 KB |
Output is correct |
5 |
Correct |
31 ms |
1656 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
1700 KB |
Output is correct |
2 |
Correct |
26 ms |
1544 KB |
Output is correct |
3 |
Correct |
27 ms |
1644 KB |
Output is correct |
4 |
Correct |
54 ms |
1860 KB |
Output is correct |
5 |
Correct |
37 ms |
1700 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
1812 KB |
Output is correct |
2 |
Correct |
51 ms |
1800 KB |
Output is correct |
3 |
Correct |
32 ms |
1876 KB |
Output is correct |
4 |
Correct |
40 ms |
1872 KB |
Output is correct |
5 |
Correct |
32 ms |
1876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
32 ms |
1864 KB |
Output is correct |
2 |
Correct |
28 ms |
1892 KB |
Output is correct |
3 |
Correct |
28 ms |
1872 KB |
Output is correct |
4 |
Correct |
40 ms |
1876 KB |
Output is correct |
5 |
Correct |
32 ms |
1876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
125 ms |
8140 KB |
Output is correct |
2 |
Correct |
151 ms |
8136 KB |
Output is correct |
3 |
Correct |
161 ms |
8136 KB |
Output is correct |
4 |
Correct |
181 ms |
8140 KB |
Output is correct |
5 |
Correct |
174 ms |
8132 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
148 ms |
8128 KB |
Output is correct |
2 |
Correct |
232 ms |
8104 KB |
Output is correct |
3 |
Correct |
147 ms |
8224 KB |
Output is correct |
4 |
Correct |
176 ms |
8132 KB |
Output is correct |
5 |
Correct |
183 ms |
8140 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
162 ms |
9676 KB |
Output is correct |
2 |
Correct |
195 ms |
9704 KB |
Output is correct |
3 |
Correct |
191 ms |
9700 KB |
Output is correct |
4 |
Correct |
245 ms |
9704 KB |
Output is correct |
5 |
Correct |
279 ms |
9704 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
207 ms |
9732 KB |
Output is correct |
2 |
Correct |
309 ms |
9700 KB |
Output is correct |
3 |
Correct |
200 ms |
9744 KB |
Output is correct |
4 |
Correct |
241 ms |
9804 KB |
Output is correct |
5 |
Correct |
205 ms |
9588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
173 ms |
11212 KB |
Output is correct |
2 |
Correct |
241 ms |
11268 KB |
Output is correct |
3 |
Correct |
207 ms |
11204 KB |
Output is correct |
4 |
Correct |
300 ms |
11268 KB |
Output is correct |
5 |
Correct |
236 ms |
11268 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
228 ms |
11264 KB |
Output is correct |
2 |
Correct |
292 ms |
11256 KB |
Output is correct |
3 |
Correct |
205 ms |
11316 KB |
Output is correct |
4 |
Correct |
431 ms |
11240 KB |
Output is correct |
5 |
Correct |
239 ms |
11180 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
190 ms |
12836 KB |
Output is correct |
2 |
Correct |
234 ms |
12764 KB |
Output is correct |
3 |
Correct |
236 ms |
12848 KB |
Output is correct |
4 |
Correct |
304 ms |
12780 KB |
Output is correct |
5 |
Correct |
335 ms |
24088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
250 ms |
12836 KB |
Output is correct |
2 |
Correct |
328 ms |
12812 KB |
Output is correct |
3 |
Correct |
282 ms |
12748 KB |
Output is correct |
4 |
Correct |
301 ms |
12832 KB |
Output is correct |
5 |
Correct |
302 ms |
24404 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
342 ms |
15956 KB |
Output is correct |
2 |
Correct |
375 ms |
15948 KB |
Output is correct |
3 |
Correct |
356 ms |
30512 KB |
Output is correct |
4 |
Correct |
471 ms |
35132 KB |
Output is correct |
5 |
Correct |
358 ms |
29520 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
324 ms |
15956 KB |
Output is correct |
2 |
Correct |
428 ms |
29148 KB |
Output is correct |
3 |
Correct |
305 ms |
28252 KB |
Output is correct |
4 |
Correct |
408 ms |
35272 KB |
Output is correct |
5 |
Correct |
429 ms |
30668 KB |
Output is correct |