# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1101163 |
2024-10-15T17:12:03 Z |
BLOBVISGOD |
Mobile (BOI12_mobile) |
C++17 |
|
1000 ms |
49036 KB |
#include "bits/stdc++.h"
#pragma GCC optimize("Ofast")
using namespace std;
#define rep(i,a,b) for(int i=(a); i<(b); ++i)
#define all(x) x.begin(),x.end()
#define sz(x) int(x.size())
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
int main(){
cin.tie(NULL),cin.sync_with_stdio(false);
int n,l; cin >> n >> l;
vector<array<ll,2>> a(n);
rep(i,0,n) rep(j,0,2) cin >> a[i][j];
rep(i,0,n) a[i][1] = a[i][1]*a[i][1];
sort(all(a));
double lo = 0, hi = 2e9;
rep(iter,0,72){
double mid = (lo+hi)/2, mid2 = mid*mid;
vector<array<double,2>> segs;
rep(i,0,n) if (a[i][1] < mid2){
double d = sqrt(mid2 - a[i][1]);
segs.push_back({a[i][0]-d,a[i][0]+d});
}
// sort(all(segs), [&](auto l, auto r){
// return l[1] < r[1];
// });
double r = 0;
for(auto [L,R] : segs){
if (L <= r) r = max(r,R);
}
if (r < l) lo = mid;
else hi = mid;
}
cout << setprecision(15) << lo << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
592 KB |
Output is correct |
2 |
Correct |
7 ms |
592 KB |
Output is correct |
3 |
Correct |
2 ms |
336 KB |
Output is correct |
4 |
Correct |
5 ms |
592 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
736 KB |
Output is correct |
2 |
Correct |
12 ms |
752 KB |
Output is correct |
3 |
Correct |
8 ms |
736 KB |
Output is correct |
4 |
Correct |
4 ms |
736 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
736 KB |
Output is correct |
2 |
Correct |
14 ms |
748 KB |
Output is correct |
3 |
Correct |
8 ms |
736 KB |
Output is correct |
4 |
Correct |
5 ms |
736 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
752 KB |
Output is correct |
2 |
Correct |
13 ms |
916 KB |
Output is correct |
3 |
Correct |
8 ms |
736 KB |
Output is correct |
4 |
Correct |
4 ms |
728 KB |
Output is correct |
5 |
Correct |
6 ms |
736 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
134 ms |
4900 KB |
Output is correct |
2 |
Correct |
238 ms |
5004 KB |
Output is correct |
3 |
Correct |
129 ms |
3200 KB |
Output is correct |
4 |
Correct |
52 ms |
5832 KB |
Output is correct |
5 |
Correct |
55 ms |
3108 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
84 ms |
5776 KB |
Output is correct |
2 |
Correct |
78 ms |
4740 KB |
Output is correct |
3 |
Correct |
77 ms |
5064 KB |
Output is correct |
4 |
Correct |
61 ms |
5008 KB |
Output is correct |
5 |
Correct |
60 ms |
5224 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
298 ms |
5340 KB |
Output is correct |
2 |
Correct |
268 ms |
5148 KB |
Output is correct |
3 |
Correct |
136 ms |
5168 KB |
Output is correct |
4 |
Correct |
39 ms |
5568 KB |
Output is correct |
5 |
Correct |
101 ms |
5236 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
296 ms |
5700 KB |
Output is correct |
2 |
Correct |
290 ms |
5740 KB |
Output is correct |
3 |
Correct |
276 ms |
5688 KB |
Output is correct |
4 |
Correct |
46 ms |
5568 KB |
Output is correct |
5 |
Correct |
90 ms |
5744 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
316 ms |
5728 KB |
Output is correct |
2 |
Correct |
258 ms |
6156 KB |
Output is correct |
3 |
Correct |
272 ms |
5676 KB |
Output is correct |
4 |
Correct |
46 ms |
5576 KB |
Output is correct |
5 |
Correct |
84 ms |
5656 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1074 ms |
24556 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1066 ms |
24364 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1063 ms |
36328 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1059 ms |
36164 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1065 ms |
38980 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1042 ms |
39700 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1063 ms |
42788 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1064 ms |
42780 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1053 ms |
49036 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1056 ms |
48708 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |