# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
948284 |
2024-03-18T03:22:43 Z |
Amaarsaa |
Mobile (BOI12_mobile) |
C++14 |
|
643 ms |
31828 KB |
#include<bits/stdc++.h>
using namespace std;
using ll = long long ;
ll n, l;
ll x[1000005], y[1000005];
bool Can(double R) {
double D, x1, x2, mx = 0.0;
for (int j = 1; j <= n; j ++) {
D = (R - y[j]) * (R + y[j]);
D = sqrt(D);
x1 = x[j] - D;
x2 = x[j] + D;
if ( x1 > mx) return false;
mx = max(mx,x2);
}
if ( mx < l) return false;
return true;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
ll i;
double lo , hi, mid;
cin >> n >> l;
for (i = 1; i <= n; i ++) {
cin >> x[i] >> y[i];
}
lo = 0;
hi = 1e12;
for (i= 1; i <= 100;i ++) {
mid = (lo + hi)/2;
if (!Can(mid)) lo = mid;
else hi = mid;
}
printf("%.4lf", lo);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Incorrect |
0 ms |
2396 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
2396 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
2396 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2396 KB |
Output is correct |
3 |
Incorrect |
2 ms |
2396 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
2396 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
54 ms |
6776 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
32 ms |
7000 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
37 ms |
6996 KB |
Output is correct |
2 |
Incorrect |
20 ms |
6744 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
26 ms |
6748 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
42 ms |
6748 KB |
Output is correct |
2 |
Incorrect |
36 ms |
8028 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
205 ms |
10892 KB |
Output is correct |
2 |
Correct |
178 ms |
18604 KB |
Output is correct |
3 |
Correct |
172 ms |
18004 KB |
Output is correct |
4 |
Incorrect |
299 ms |
20468 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
180 ms |
10884 KB |
Output is correct |
2 |
Incorrect |
404 ms |
17748 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
238 ms |
14984 KB |
Output is correct |
2 |
Incorrect |
151 ms |
24044 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
159 ms |
15484 KB |
Output is correct |
2 |
Incorrect |
441 ms |
22912 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
282 ms |
14980 KB |
Output is correct |
2 |
Incorrect |
168 ms |
25684 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
169 ms |
14984 KB |
Output is correct |
2 |
Incorrect |
511 ms |
24664 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
319 ms |
14976 KB |
Output is correct |
2 |
Incorrect |
262 ms |
27256 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
302 ms |
14980 KB |
Output is correct |
2 |
Incorrect |
643 ms |
25684 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
401 ms |
16088 KB |
Output is correct |
2 |
Incorrect |
357 ms |
31828 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
355 ms |
16092 KB |
Output is correct |
2 |
Incorrect |
558 ms |
29264 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |