# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1101169 |
2024-10-15T17:15:54 Z |
BLOBVISGOD |
Mobile (BOI12_mobile) |
C++17 |
|
467 ms |
35424 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 = 1.5e9;
rep(iter,0,46){
double mid = (lo+hi)/2, mid2 = mid*mid;
double r = 0;
rep(i,0,n) if (a[i][1] < mid2){
double d = sqrt(mid2 - a[i][1]);
if (a[i][0]-d <= r) r = max(r,a[i][0]+d);
}
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 |
456 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 |
2 ms |
336 KB |
Output is correct |
2 |
Correct |
2 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
2 ms |
336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
336 KB |
Output is correct |
2 |
Correct |
3 ms |
336 KB |
Output is correct |
3 |
Correct |
2 ms |
336 KB |
Output is correct |
4 |
Correct |
3 ms |
336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
336 KB |
Output is correct |
2 |
Correct |
3 ms |
336 KB |
Output is correct |
3 |
Correct |
2 ms |
336 KB |
Output is correct |
4 |
Correct |
2 ms |
336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
336 KB |
Output is correct |
2 |
Correct |
3 ms |
336 KB |
Output is correct |
3 |
Correct |
2 ms |
336 KB |
Output is correct |
4 |
Correct |
2 ms |
336 KB |
Output is correct |
5 |
Correct |
2 ms |
336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
38 ms |
1616 KB |
Output is correct |
2 |
Correct |
29 ms |
1616 KB |
Output is correct |
3 |
Correct |
20 ms |
1104 KB |
Output is correct |
4 |
Correct |
21 ms |
1616 KB |
Output is correct |
5 |
Correct |
22 ms |
1104 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
1616 KB |
Output is correct |
2 |
Correct |
25 ms |
1360 KB |
Output is correct |
3 |
Correct |
24 ms |
1616 KB |
Output is correct |
4 |
Correct |
34 ms |
1616 KB |
Output is correct |
5 |
Correct |
24 ms |
1616 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
45 ms |
1616 KB |
Output is correct |
2 |
Correct |
43 ms |
1616 KB |
Output is correct |
3 |
Correct |
32 ms |
1616 KB |
Output is correct |
4 |
Correct |
25 ms |
1872 KB |
Output is correct |
5 |
Correct |
39 ms |
1784 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
38 ms |
1872 KB |
Output is correct |
2 |
Correct |
54 ms |
1872 KB |
Output is correct |
3 |
Correct |
35 ms |
1872 KB |
Output is correct |
4 |
Correct |
26 ms |
1872 KB |
Output is correct |
5 |
Correct |
32 ms |
1872 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
47 ms |
1872 KB |
Output is correct |
2 |
Correct |
42 ms |
1872 KB |
Output is correct |
3 |
Correct |
36 ms |
1872 KB |
Output is correct |
4 |
Correct |
26 ms |
1872 KB |
Output is correct |
5 |
Correct |
34 ms |
1872 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
237 ms |
8272 KB |
Output is correct |
2 |
Correct |
199 ms |
15820 KB |
Output is correct |
3 |
Correct |
215 ms |
15312 KB |
Output is correct |
4 |
Correct |
122 ms |
17624 KB |
Output is correct |
5 |
Correct |
150 ms |
14928 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
206 ms |
8072 KB |
Output is correct |
2 |
Correct |
260 ms |
14664 KB |
Output is correct |
3 |
Correct |
177 ms |
14152 KB |
Output is correct |
4 |
Correct |
135 ms |
17496 KB |
Output is correct |
5 |
Correct |
143 ms |
15432 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
283 ms |
9808 KB |
Output is correct |
2 |
Correct |
248 ms |
19016 KB |
Output is correct |
3 |
Correct |
253 ms |
18416 KB |
Output is correct |
4 |
Correct |
159 ms |
21576 KB |
Output is correct |
5 |
Correct |
219 ms |
17736 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
240 ms |
9808 KB |
Output is correct |
2 |
Correct |
294 ms |
17636 KB |
Output is correct |
3 |
Correct |
235 ms |
16456 KB |
Output is correct |
4 |
Correct |
195 ms |
21484 KB |
Output is correct |
5 |
Correct |
162 ms |
18504 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
315 ms |
11344 KB |
Output is correct |
2 |
Correct |
267 ms |
22152 KB |
Output is correct |
3 |
Correct |
341 ms |
21384 KB |
Output is correct |
4 |
Correct |
167 ms |
24720 KB |
Output is correct |
5 |
Correct |
207 ms |
20376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
275 ms |
11344 KB |
Output is correct |
2 |
Correct |
335 ms |
20636 KB |
Output is correct |
3 |
Correct |
271 ms |
19728 KB |
Output is correct |
4 |
Correct |
174 ms |
24648 KB |
Output is correct |
5 |
Correct |
211 ms |
21320 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
374 ms |
12880 KB |
Output is correct |
2 |
Correct |
311 ms |
25160 KB |
Output is correct |
3 |
Correct |
349 ms |
24392 KB |
Output is correct |
4 |
Correct |
207 ms |
28496 KB |
Output is correct |
5 |
Correct |
276 ms |
24104 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
341 ms |
12880 KB |
Output is correct |
2 |
Correct |
377 ms |
23368 KB |
Output is correct |
3 |
Correct |
304 ms |
22444 KB |
Output is correct |
4 |
Correct |
248 ms |
28232 KB |
Output is correct |
5 |
Correct |
264 ms |
24392 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
467 ms |
15952 KB |
Output is correct |
2 |
Correct |
453 ms |
31460 KB |
Output is correct |
3 |
Correct |
430 ms |
30556 KB |
Output is correct |
4 |
Correct |
252 ms |
35292 KB |
Output is correct |
5 |
Correct |
311 ms |
29660 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
435 ms |
15952 KB |
Output is correct |
2 |
Correct |
452 ms |
29256 KB |
Output is correct |
3 |
Correct |
357 ms |
28260 KB |
Output is correct |
4 |
Correct |
281 ms |
35424 KB |
Output is correct |
5 |
Correct |
315 ms |
30792 KB |
Output is correct |