# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
958947 |
2024-04-07T09:10:39 Z |
biximo |
Mobile (BOI12_mobile) |
C++17 |
|
355 ms |
23888 KB |
#include <bits/stdc++.h>
#define N 1000005
using namespace std;
typedef long long ll;
typedef array<int, 2> p2;
typedef long double ld;
int n, L;
p2 seq[N];
bool check(ld d) {
ld r = 0;
for(int i = 0; i < n; i ++) {
auto[h,k] = seq[i];
if(d*d-k*k < 0) return false;
if(h-sqrt(d*d-k*k) <= r) r = max(r,h+sqrt(d*d-k*k));
}
return r >= L;
}
int main() {
cin.tie(0)->sync_with_stdio(0);
cin >> n >> L;
for(int i = 0; i < n; i ++) {
cin >> seq[i][0] >> seq[i][1];
}
ld l=1,h=2e9,ans;
while(h-l>1e-5) {
ld m=(l+h)/2;
if(check(m)) {
ans = m;
h = m;
} else {
l = m;
}
}
cout << setprecision(15) << ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
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 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
23 ms |
2680 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
23 ms |
2688 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
28 ms |
2652 KB |
Output is correct |
2 |
Incorrect |
27 ms |
3700 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
37 ms |
2652 KB |
Output is correct |
2 |
Incorrect |
33 ms |
4080 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
2652 KB |
Output is correct |
2 |
Incorrect |
33 ms |
3956 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
161 ms |
4720 KB |
Output is correct |
2 |
Incorrect |
184 ms |
12256 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
160 ms |
4688 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
185 ms |
6776 KB |
Output is correct |
2 |
Incorrect |
197 ms |
15952 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
196 ms |
6768 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
231 ms |
6996 KB |
Output is correct |
2 |
Incorrect |
227 ms |
17500 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
252 ms |
6740 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
250 ms |
6740 KB |
Output is correct |
2 |
Incorrect |
264 ms |
19024 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
274 ms |
6992 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
317 ms |
8280 KB |
Output is correct |
2 |
Incorrect |
355 ms |
23888 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
314 ms |
8020 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |