# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
973118 |
2024-05-01T13:53:47 Z |
njoop |
Mobile (BOI12_mobile) |
C++17 |
|
1000 ms |
44228 KB |
#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define pi pair<double, double>
using namespace std;
double x, y, L, l=0, r=1e9, mid, de, cov;
pi arr[1000010];
vector<pi> in;
int n;
bool solve(double rad) {
in.clear();
cov = 0;
for(int i=1; i<=n; i++) {
de = pow(rad, 2) - pow(abs(arr[i].second), 2);
de = sqrt(de);
if(de < 0) continue;
in.push_back({arr[i].first-de, arr[i].first+de});
}
sort(in.begin(), in.end());
for(auto i: in) {
if(i.first > cov) return 0;
cov = max(cov, i.second);
if(cov >= L) return 1;
}
return 0;
}
int main() {
cin.tie(0)->sync_with_stdio(0);
cin >> n >> L;
for(int i=1; i<=n; i++) {
cin >> arr[i].first >> arr[i].second;
}
while(l+0.001 < r) {
mid = (l+r)/2;
if(solve(mid)) {
r = mid;
} else {
l = mid + 0.001;
}
}
cout << fixed << setprecision(6) << l;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
5 |
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 |
5 ms |
600 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
604 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
604 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
604 KB |
Output is correct |
2 |
Correct |
5 ms |
604 KB |
Output is correct |
3 |
Correct |
10 ms |
604 KB |
Output is correct |
4 |
Incorrect |
12 ms |
604 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
141 ms |
4824 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
175 ms |
4864 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
92 ms |
4812 KB |
Output is correct |
2 |
Correct |
173 ms |
4812 KB |
Output is correct |
3 |
Correct |
147 ms |
4812 KB |
Output is correct |
4 |
Incorrect |
297 ms |
4816 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
170 ms |
4836 KB |
Output is correct |
2 |
Correct |
231 ms |
4820 KB |
Output is correct |
3 |
Correct |
195 ms |
5072 KB |
Output is correct |
4 |
Incorrect |
299 ms |
4816 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
116 ms |
4860 KB |
Output is correct |
2 |
Correct |
228 ms |
4812 KB |
Output is correct |
3 |
Correct |
185 ms |
4816 KB |
Output is correct |
4 |
Incorrect |
235 ms |
4848 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
572 ms |
18928 KB |
Output is correct |
2 |
Execution timed out |
1022 ms |
19188 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1018 ms |
18672 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
640 ms |
29124 KB |
Output is correct |
2 |
Execution timed out |
1064 ms |
29412 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1051 ms |
28472 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
894 ms |
30176 KB |
Output is correct |
2 |
Execution timed out |
1061 ms |
40796 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1065 ms |
31208 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
996 ms |
32756 KB |
Output is correct |
2 |
Execution timed out |
1055 ms |
44228 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1035 ms |
33256 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1034 ms |
33252 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1045 ms |
33216 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |