# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1059388 |
2024-08-14T22:18:07 Z |
ssitaram |
Mobile (BOI12_mobile) |
C++17 |
|
555 ms |
50696 KB |
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
int main() {
ios::sync_with_stdio(0);
cin.tie(nullptr);
int n; cin >> n;
ld l; cin >> l;
ld lo = 0, hi = 1e12;
vector<pair<ld, ld>> poi(n);
for (int i = 0; i < n; ++i) cin >> poi[i].first >> poi[i].second;
while (hi - lo > 1e-4) {
ld mi = (lo + hi) / 2;
ld till = 0;
for (int i = 0; i < n; ++i) {
if (mi * mi - poi[i].second * poi[i].second < 0) continue;
ld sq = sqrt(mi * mi - poi[i].second * poi[i].second);
ld h = sq + poi[i].first;
ld l = - sq + poi[i].first;
if (l <= till) {
till = h;
}
}
if (till >= l) {
hi = mi;
} else {
lo = mi;
}
}
cout << fixed << setprecision(4) << lo << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
348 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
604 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
600 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
604 KB |
Output is correct |
2 |
Correct |
2 ms |
604 KB |
Output is correct |
3 |
Correct |
2 ms |
476 KB |
Output is correct |
4 |
Incorrect |
2 ms |
604 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
48 ms |
3536 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
38 ms |
3420 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
39 ms |
3676 KB |
Output is correct |
2 |
Correct |
38 ms |
4184 KB |
Output is correct |
3 |
Correct |
35 ms |
4004 KB |
Output is correct |
4 |
Incorrect |
47 ms |
5460 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
46 ms |
4952 KB |
Output is correct |
2 |
Correct |
47 ms |
4952 KB |
Output is correct |
3 |
Correct |
47 ms |
4440 KB |
Output is correct |
4 |
Incorrect |
45 ms |
5468 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
47 ms |
4948 KB |
Output is correct |
2 |
Correct |
46 ms |
4956 KB |
Output is correct |
3 |
Correct |
42 ms |
4444 KB |
Output is correct |
4 |
Incorrect |
45 ms |
5460 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
227 ms |
20188 KB |
Output is correct |
2 |
Correct |
238 ms |
23636 KB |
Output is correct |
3 |
Correct |
282 ms |
23136 KB |
Output is correct |
4 |
Incorrect |
225 ms |
25436 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
232 ms |
24148 KB |
Output is correct |
2 |
Incorrect |
298 ms |
22612 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
264 ms |
24148 KB |
Output is correct |
2 |
Correct |
281 ms |
28500 KB |
Output is correct |
3 |
Correct |
270 ms |
27808 KB |
Output is correct |
4 |
Incorrect |
267 ms |
31060 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
307 ms |
29012 KB |
Output is correct |
2 |
Incorrect |
358 ms |
27220 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
318 ms |
28240 KB |
Output is correct |
2 |
Correct |
325 ms |
32984 KB |
Output is correct |
3 |
Correct |
324 ms |
32340 KB |
Output is correct |
4 |
Incorrect |
305 ms |
35668 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
322 ms |
33872 KB |
Output is correct |
2 |
Incorrect |
443 ms |
31568 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
360 ms |
32336 KB |
Output is correct |
2 |
Correct |
378 ms |
37780 KB |
Output is correct |
3 |
Correct |
379 ms |
37024 KB |
Output is correct |
4 |
Incorrect |
356 ms |
40992 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
382 ms |
38676 KB |
Output is correct |
2 |
Incorrect |
463 ms |
35996 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
443 ms |
40272 KB |
Output is correct |
2 |
Correct |
461 ms |
47124 KB |
Output is correct |
3 |
Correct |
455 ms |
46164 KB |
Output is correct |
4 |
Incorrect |
454 ms |
50696 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
541 ms |
48208 KB |
Output is correct |
2 |
Incorrect |
555 ms |
44880 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |