# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1095193 |
2024-10-01T14:18:58 Z |
Kodik |
Mobile (BOI12_mobile) |
C++17 |
|
1000 ms |
50776 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;
vector<pair<ld,ld>> bases(n);
for(int i = 0; i < n; ++i){
ld x, y;
cin >> x >> y;
bases[i] = {x,y};
}
ld left = 0, right = 2e9;
while(right-left>1e-4){
ld mid = left + (right-left)/2;
ld curr = 0;
for(auto &[x, y] : bases){
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 |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
456 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 |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
344 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
604 KB |
Output is correct |
3 |
Correct |
3 ms |
604 KB |
Output is correct |
4 |
Correct |
8 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
464 KB |
Output is correct |
3 |
Correct |
3 ms |
604 KB |
Output is correct |
4 |
Correct |
6 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
604 KB |
Output is correct |
3 |
Correct |
3 ms |
604 KB |
Output is correct |
4 |
Correct |
6 ms |
656 KB |
Output is correct |
5 |
Correct |
5 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
81 ms |
3416 KB |
Output is correct |
2 |
Correct |
41 ms |
3928 KB |
Output is correct |
3 |
Correct |
46 ms |
2652 KB |
Output is correct |
4 |
Correct |
89 ms |
3920 KB |
Output is correct |
5 |
Correct |
45 ms |
2392 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
77 ms |
3420 KB |
Output is correct |
2 |
Correct |
94 ms |
3420 KB |
Output is correct |
3 |
Correct |
95 ms |
3928 KB |
Output is correct |
4 |
Correct |
95 ms |
3928 KB |
Output is correct |
5 |
Correct |
106 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
3676 KB |
Output is correct |
2 |
Correct |
44 ms |
4188 KB |
Output is correct |
3 |
Correct |
60 ms |
4008 KB |
Output is correct |
4 |
Correct |
137 ms |
5488 KB |
Output is correct |
5 |
Correct |
92 ms |
4184 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
50 ms |
4956 KB |
Output is correct |
2 |
Correct |
58 ms |
4944 KB |
Output is correct |
3 |
Correct |
67 ms |
4444 KB |
Output is correct |
4 |
Correct |
132 ms |
5460 KB |
Output is correct |
5 |
Correct |
109 ms |
4700 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
60 ms |
4968 KB |
Output is correct |
2 |
Correct |
55 ms |
4984 KB |
Output is correct |
3 |
Correct |
63 ms |
4444 KB |
Output is correct |
4 |
Correct |
131 ms |
5468 KB |
Output is correct |
5 |
Correct |
109 ms |
4700 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
269 ms |
20304 KB |
Output is correct |
2 |
Correct |
259 ms |
23648 KB |
Output is correct |
3 |
Correct |
268 ms |
23272 KB |
Output is correct |
4 |
Correct |
709 ms |
25444 KB |
Output is correct |
5 |
Correct |
603 ms |
22892 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
303 ms |
24148 KB |
Output is correct |
2 |
Correct |
530 ms |
22512 KB |
Output is correct |
3 |
Correct |
379 ms |
21728 KB |
Output is correct |
4 |
Correct |
679 ms |
25332 KB |
Output is correct |
5 |
Correct |
629 ms |
23376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
350 ms |
24348 KB |
Output is correct |
2 |
Correct |
339 ms |
28440 KB |
Output is correct |
3 |
Correct |
359 ms |
27816 KB |
Output is correct |
4 |
Correct |
844 ms |
31064 KB |
Output is correct |
5 |
Correct |
700 ms |
27220 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
333 ms |
29076 KB |
Output is correct |
2 |
Correct |
648 ms |
27088 KB |
Output is correct |
3 |
Correct |
421 ms |
25940 KB |
Output is correct |
4 |
Correct |
845 ms |
30804 KB |
Output is correct |
5 |
Correct |
714 ms |
27812 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
381 ms |
28240 KB |
Output is correct |
2 |
Correct |
376 ms |
33104 KB |
Output is correct |
3 |
Correct |
369 ms |
32340 KB |
Output is correct |
4 |
Correct |
974 ms |
35680 KB |
Output is correct |
5 |
Correct |
790 ms |
31316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
377 ms |
33748 KB |
Output is correct |
2 |
Correct |
731 ms |
31572 KB |
Output is correct |
3 |
Correct |
477 ms |
30828 KB |
Output is correct |
4 |
Correct |
946 ms |
35564 KB |
Output is correct |
5 |
Correct |
860 ms |
32340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
447 ms |
32276 KB |
Output is correct |
2 |
Correct |
441 ms |
37716 KB |
Output is correct |
3 |
Correct |
446 ms |
37072 KB |
Output is correct |
4 |
Execution timed out |
1059 ms |
41044 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
429 ms |
38480 KB |
Output is correct |
2 |
Correct |
857 ms |
36000 KB |
Output is correct |
3 |
Correct |
589 ms |
34932 KB |
Output is correct |
4 |
Execution timed out |
1031 ms |
40784 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
574 ms |
40324 KB |
Output is correct |
2 |
Correct |
574 ms |
47112 KB |
Output is correct |
3 |
Correct |
524 ms |
46164 KB |
Output is correct |
4 |
Execution timed out |
1074 ms |
50776 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
546 ms |
48136 KB |
Output is correct |
2 |
Execution timed out |
1032 ms |
44880 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |