# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1095198 |
2024-10-01T14:22:26 Z |
Kodik |
Mobile (BOI12_mobile) |
C++17 |
|
1000 ms |
31780 KB |
#include <bits/stdc++.h>
using namespace std;
#define ss second
#define ff first
typedef long long ll;
typedef long double ld;
#define int ll
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ld n, l;
cin >> n >> l;
pair<ld,ld> bases[1000000];
for(int i = 0; i < n; ++i){
cin >> bases[i].ff >> bases[i].ss;
}
ld left = 1, right = 2e9;
while(right-left>1e-4){
ld mid = left + (right-left)/2;
ld curr = 0;
for(int i = 0; i < n; ++i){
ld x = bases[i].ff;
ld y = bases[i].ss;
ld hi_range = sqrt(mid*mid-y*y);
ld start = x-hi_range, end = x+hi_range;
if(start<=curr) curr = max(curr, end);
}
if(curr>=l){
right = mid;
}else{
left = mid;
}
}
cout << fixed << setprecision(3) << right;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
31576 KB |
Output is correct |
2 |
Correct |
17 ms |
31552 KB |
Output is correct |
3 |
Correct |
23 ms |
31568 KB |
Output is correct |
4 |
Correct |
18 ms |
31580 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
31748 KB |
Output is correct |
2 |
Correct |
16 ms |
31580 KB |
Output is correct |
3 |
Correct |
17 ms |
31640 KB |
Output is correct |
4 |
Correct |
19 ms |
31580 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
31644 KB |
Output is correct |
2 |
Correct |
19 ms |
31580 KB |
Output is correct |
3 |
Correct |
19 ms |
31780 KB |
Output is correct |
4 |
Correct |
17 ms |
31580 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
21 ms |
31580 KB |
Output is correct |
2 |
Correct |
33 ms |
31580 KB |
Output is correct |
3 |
Correct |
26 ms |
31580 KB |
Output is correct |
4 |
Correct |
24 ms |
31580 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
31576 KB |
Output is correct |
2 |
Correct |
20 ms |
31576 KB |
Output is correct |
3 |
Correct |
20 ms |
31580 KB |
Output is correct |
4 |
Correct |
24 ms |
31664 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
31580 KB |
Output is correct |
2 |
Correct |
21 ms |
31580 KB |
Output is correct |
3 |
Correct |
19 ms |
31756 KB |
Output is correct |
4 |
Correct |
24 ms |
31580 KB |
Output is correct |
5 |
Correct |
22 ms |
31576 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
88 ms |
31580 KB |
Output is correct |
2 |
Correct |
61 ms |
31576 KB |
Output is correct |
3 |
Correct |
61 ms |
31580 KB |
Output is correct |
4 |
Correct |
120 ms |
31576 KB |
Output is correct |
5 |
Correct |
64 ms |
31576 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
102 ms |
31580 KB |
Output is correct |
2 |
Correct |
104 ms |
31576 KB |
Output is correct |
3 |
Correct |
116 ms |
31672 KB |
Output is correct |
4 |
Correct |
123 ms |
31752 KB |
Output is correct |
5 |
Correct |
139 ms |
31576 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
67 ms |
31580 KB |
Output is correct |
2 |
Correct |
56 ms |
31664 KB |
Output is correct |
3 |
Correct |
72 ms |
31576 KB |
Output is correct |
4 |
Correct |
169 ms |
31580 KB |
Output is correct |
5 |
Correct |
127 ms |
31764 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
65 ms |
31576 KB |
Output is correct |
2 |
Correct |
66 ms |
31576 KB |
Output is correct |
3 |
Correct |
83 ms |
31576 KB |
Output is correct |
4 |
Correct |
177 ms |
31756 KB |
Output is correct |
5 |
Correct |
138 ms |
31580 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
80 ms |
31576 KB |
Output is correct |
2 |
Correct |
68 ms |
31576 KB |
Output is correct |
3 |
Correct |
82 ms |
31756 KB |
Output is correct |
4 |
Correct |
168 ms |
31580 KB |
Output is correct |
5 |
Correct |
140 ms |
31580 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
260 ms |
31580 KB |
Output is correct |
2 |
Correct |
301 ms |
31568 KB |
Output is correct |
3 |
Correct |
266 ms |
31576 KB |
Output is correct |
4 |
Correct |
785 ms |
31580 KB |
Output is correct |
5 |
Correct |
674 ms |
31580 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
259 ms |
31580 KB |
Output is correct |
2 |
Correct |
548 ms |
31576 KB |
Output is correct |
3 |
Correct |
396 ms |
31748 KB |
Output is correct |
4 |
Correct |
774 ms |
31748 KB |
Output is correct |
5 |
Correct |
686 ms |
31752 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
313 ms |
31576 KB |
Output is correct |
2 |
Correct |
321 ms |
31580 KB |
Output is correct |
3 |
Correct |
313 ms |
31580 KB |
Output is correct |
4 |
Correct |
957 ms |
31748 KB |
Output is correct |
5 |
Correct |
821 ms |
31752 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
331 ms |
31608 KB |
Output is correct |
2 |
Correct |
675 ms |
31748 KB |
Output is correct |
3 |
Correct |
456 ms |
31576 KB |
Output is correct |
4 |
Correct |
961 ms |
31756 KB |
Output is correct |
5 |
Correct |
824 ms |
31724 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
378 ms |
31752 KB |
Output is correct |
2 |
Correct |
362 ms |
31748 KB |
Output is correct |
3 |
Correct |
374 ms |
31576 KB |
Output is correct |
4 |
Execution timed out |
1043 ms |
31576 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
354 ms |
31580 KB |
Output is correct |
2 |
Correct |
766 ms |
31752 KB |
Output is correct |
3 |
Correct |
507 ms |
31748 KB |
Output is correct |
4 |
Execution timed out |
1063 ms |
31580 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
414 ms |
31576 KB |
Output is correct |
2 |
Correct |
438 ms |
31756 KB |
Output is correct |
3 |
Correct |
428 ms |
31756 KB |
Output is correct |
4 |
Execution timed out |
1042 ms |
31576 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
422 ms |
31580 KB |
Output is correct |
2 |
Correct |
959 ms |
31748 KB |
Output is correct |
3 |
Correct |
578 ms |
31564 KB |
Output is correct |
4 |
Execution timed out |
1046 ms |
31580 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
519 ms |
31576 KB |
Output is correct |
2 |
Correct |
536 ms |
31588 KB |
Output is correct |
3 |
Correct |
521 ms |
31576 KB |
Output is correct |
4 |
Execution timed out |
1055 ms |
31580 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
503 ms |
31576 KB |
Output is correct |
2 |
Execution timed out |
1033 ms |
31576 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |