# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
781090 |
2023-07-12T17:30:56 Z |
uped |
Mobile (BOI12_mobile) |
C++14 |
|
425 ms |
23664 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<int, int>> 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;
for (int i = 0; i < 100; ++i) {
double radius = (l + r) / 2.0;
double cur = 0;
for (int j = 0; j < n; ++j) {
int x = v[j].first;
int 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 << setprecision(20) << r;
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 |
1 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 |
324 KB |
Output is correct |
4 |
Correct |
0 ms |
212 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 |
1 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 |
4 ms |
400 KB |
Output is correct |
4 |
Incorrect |
5 ms |
328 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
360 KB |
Output is correct |
2 |
Correct |
3 ms |
340 KB |
Output is correct |
3 |
Correct |
3 ms |
332 KB |
Output is correct |
4 |
Incorrect |
4 ms |
340 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
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 |
Incorrect |
4 ms |
432 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
64 ms |
852 KB |
Output is correct |
2 |
Incorrect |
31 ms |
2004 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
40 ms |
852 KB |
Output is correct |
2 |
Correct |
45 ms |
852 KB |
Output is correct |
3 |
Incorrect |
74 ms |
852 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
980 KB |
Output is correct |
2 |
Incorrect |
33 ms |
2132 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
42 ms |
1108 KB |
Output is correct |
2 |
Incorrect |
41 ms |
2508 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
40 ms |
1108 KB |
Output is correct |
2 |
Incorrect |
40 ms |
1108 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
190 ms |
4180 KB |
Output is correct |
2 |
Incorrect |
203 ms |
11896 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
205 ms |
4304 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
233 ms |
4948 KB |
Output is correct |
2 |
Incorrect |
244 ms |
14224 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
270 ms |
4948 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
264 ms |
5716 KB |
Output is correct |
2 |
Incorrect |
285 ms |
16544 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
293 ms |
5716 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
306 ms |
6484 KB |
Output is correct |
2 |
Incorrect |
357 ms |
18904 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
326 ms |
6484 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
375 ms |
8148 KB |
Output is correct |
2 |
Incorrect |
406 ms |
23664 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
425 ms |
8148 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |