# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
842338 |
2023-09-02T18:41:58 Z |
a5a7 |
Mobile (BOI12_mobile) |
C++14 |
|
500 ms |
35448 KB |
#include <bits/stdc++.h>
#define ALL(x) (x).begin(), (x).end()
#define REP(i, a, b) for (int i = (a); i < (b); i++)
#define READ(arr, n) for (int i = 0; i < (n); i++) cin >> arr[i];
#define ABS(a) (max((a), -(a)))
#define MOD 1000000007
using namespace std;
typedef long double ld;
typedef long long ll;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n; ll len;
cin >> n >> len;
ll x[n], y[n];
for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
double left = 1, right = 1.5e9;
while ((right-left)>1e-3){
double mid = (left+right)/2, curr = 0;
for (int i = 0; i < n; i++){
if (y[i]>mid) continue;
double sq = sqrt(mid*mid-y[i]*y[i]);
double l = x[i]-sq, r = x[i]+sq;
if (curr > l) curr = max(curr, r);
}
if (curr >= len){
right = mid;
}else{
left = mid;
}
}
cout << fixed << setprecision(4) << left << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
344 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
344 KB |
Output is correct |
2 |
Correct |
2 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
604 KB |
Output is correct |
5 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
21 ms |
1368 KB |
Output is correct |
2 |
Correct |
19 ms |
1624 KB |
Output is correct |
3 |
Correct |
12 ms |
1884 KB |
Output is correct |
4 |
Correct |
33 ms |
2652 KB |
Output is correct |
5 |
Correct |
12 ms |
1628 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
20 ms |
1624 KB |
Output is correct |
2 |
Correct |
27 ms |
1372 KB |
Output is correct |
3 |
Correct |
32 ms |
1628 KB |
Output is correct |
4 |
Correct |
36 ms |
2652 KB |
Output is correct |
5 |
Correct |
40 ms |
3072 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
1820 KB |
Output is correct |
2 |
Correct |
20 ms |
1624 KB |
Output is correct |
3 |
Correct |
19 ms |
2652 KB |
Output is correct |
4 |
Correct |
53 ms |
3924 KB |
Output is correct |
5 |
Correct |
29 ms |
2724 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
1880 KB |
Output is correct |
2 |
Correct |
25 ms |
3408 KB |
Output is correct |
3 |
Correct |
22 ms |
2908 KB |
Output is correct |
4 |
Correct |
51 ms |
3960 KB |
Output is correct |
5 |
Correct |
40 ms |
3164 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
1880 KB |
Output is correct |
2 |
Correct |
25 ms |
3412 KB |
Output is correct |
3 |
Correct |
22 ms |
2908 KB |
Output is correct |
4 |
Correct |
50 ms |
3924 KB |
Output is correct |
5 |
Correct |
42 ms |
3536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
114 ms |
8260 KB |
Output is correct |
2 |
Correct |
125 ms |
15956 KB |
Output is correct |
3 |
Correct |
123 ms |
15444 KB |
Output is correct |
4 |
Correct |
248 ms |
17748 KB |
Output is correct |
5 |
Correct |
211 ms |
15088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
124 ms |
8024 KB |
Output is correct |
2 |
Correct |
157 ms |
14864 KB |
Output is correct |
3 |
Correct |
113 ms |
13908 KB |
Output is correct |
4 |
Correct |
247 ms |
17492 KB |
Output is correct |
5 |
Correct |
216 ms |
15444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
141 ms |
10064 KB |
Output is correct |
2 |
Correct |
156 ms |
19028 KB |
Output is correct |
3 |
Correct |
156 ms |
18528 KB |
Output is correct |
4 |
Correct |
301 ms |
21588 KB |
Output is correct |
5 |
Correct |
261 ms |
18004 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
160 ms |
9820 KB |
Output is correct |
2 |
Correct |
191 ms |
17908 KB |
Output is correct |
3 |
Correct |
130 ms |
16468 KB |
Output is correct |
4 |
Correct |
303 ms |
21692 KB |
Output is correct |
5 |
Correct |
256 ms |
18524 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
153 ms |
11352 KB |
Output is correct |
2 |
Correct |
175 ms |
22100 KB |
Output is correct |
3 |
Correct |
208 ms |
21368 KB |
Output is correct |
4 |
Correct |
358 ms |
25172 KB |
Output is correct |
5 |
Correct |
274 ms |
20436 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
181 ms |
11380 KB |
Output is correct |
2 |
Correct |
218 ms |
20612 KB |
Output is correct |
3 |
Correct |
154 ms |
19540 KB |
Output is correct |
4 |
Correct |
345 ms |
24660 KB |
Output is correct |
5 |
Correct |
297 ms |
21532 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
177 ms |
12888 KB |
Output is correct |
2 |
Correct |
203 ms |
25364 KB |
Output is correct |
3 |
Correct |
199 ms |
24404 KB |
Output is correct |
4 |
Correct |
397 ms |
28500 KB |
Output is correct |
5 |
Correct |
331 ms |
23892 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
203 ms |
12952 KB |
Output is correct |
2 |
Correct |
237 ms |
23532 KB |
Output is correct |
3 |
Correct |
175 ms |
22356 KB |
Output is correct |
4 |
Correct |
399 ms |
28244 KB |
Output is correct |
5 |
Correct |
345 ms |
24548 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
222 ms |
16088 KB |
Output is correct |
2 |
Correct |
255 ms |
31572 KB |
Output is correct |
3 |
Correct |
251 ms |
30416 KB |
Output is correct |
4 |
Correct |
496 ms |
35308 KB |
Output is correct |
5 |
Correct |
406 ms |
29512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
262 ms |
16084 KB |
Output is correct |
2 |
Correct |
288 ms |
29144 KB |
Output is correct |
3 |
Correct |
226 ms |
28240 KB |
Output is correct |
4 |
Correct |
500 ms |
35448 KB |
Output is correct |
5 |
Correct |
452 ms |
30684 KB |
Output is correct |