# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
768920 |
2023-06-28T21:51:26 Z |
orcslop |
Mobile (BOI12_mobile) |
C++17 |
|
1000 ms |
31716 KB |
#include <bits/stdc++.h>
using namespace std;
#define sz(x) (int)(x).size()
const int MAXN = 1e6;
int n;
double l;
pair<double, double> v[MAXN];
bool check(double rad){
vector<pair<double, double>> intervals(n);
for(int i = 0; i < n; i++){
intervals[i].first = max(v[i].first - sqrt(rad * rad - v[i].second * v[i].second), (double)0);
intervals[i].second = min(v[i].first + sqrt(rad * rad - v[i].second * v[i].second), l);
}
sort(intervals.begin(), intervals.end());
if(intervals[0].first != 0 || intervals[n-1].second != l) return false;
for(int i = 0; i < n-1; i++){
if(intervals[i].second < intervals[i + 1].first) return false;
}
return true;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
cin >> n >> l;
for(int i = 0; i < n; i++){
cin >> v[i].first >> v[i].second;
}
// cout << check(5.55);
double low = 0, high = (double)2e9;
while (low + 0.0001 < high) {
double mid = low + (high - low) / 2;
if (check(mid)) high = mid;
else low = mid;
}
cout << setprecision(15) << low << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
340 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
468 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
468 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
540 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
131 ms |
2908 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
178 ms |
3012 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
153 ms |
3256 KB |
Output is correct |
2 |
Correct |
197 ms |
3148 KB |
Output is correct |
3 |
Incorrect |
179 ms |
3904 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
193 ms |
3636 KB |
Output is correct |
2 |
Correct |
254 ms |
4852 KB |
Output is correct |
3 |
Incorrect |
224 ms |
4472 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
172 ms |
3680 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
985 ms |
16220 KB |
Output is correct |
2 |
Execution timed out |
1067 ms |
16204 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1079 ms |
16160 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1070 ms |
19408 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1051 ms |
19320 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1062 ms |
22476 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1058 ms |
22456 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1074 ms |
25740 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1052 ms |
25588 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1070 ms |
31716 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1083 ms |
31544 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |