# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1098730 |
2024-10-09T19:33:31 Z |
sano |
Mobile (BOI12_mobile) |
C++14 |
|
1000 ms |
35476 KB |
#include<iostream>
#include<vector>
#include<queue>
#include<deque>
#include<string>
#include<fstream>
#include<algorithm>
#include <iomanip>
#include<map>
#include <set>
#include <unordered_map>
#include <stack>
#include <unordered_set>
#include <cmath>
#define ll long long
#define For(i, n) for(int i = 0; i < (int)n; i++)
#define ffor(i, a, n) for(int i = (int)a; i < (int)n; i++)
#define rfor(i, n) for(int i = (int)n; i >= (int)0; i--)
#define rffor(i, a, n) for(int i = (int)n; i >= (int)a; i--)
#define vec vector
#define ff first
#define ss second
#define pb push_back
#define shit short int
#define pii pair<double, double>
#define NEK 2147483640
#define mod 1000000007
#define mod2 1000000009
#define rsz resize
#define prv1 43
#define prv2 47
#define D 8
using namespace std;
int main() {
double n, asd;
cin >> n >> asd;
vec<pii> p;
For(i, n) {
double x, y;
cin >> x >> y;
x *= 10000; y *= 10000;
if (p.size() > 0) {
if (x == p.back().ff && y > 0 && p.back().ss > 0) continue;
if (x == p.back().ff && y < 0) p.pop_back();
}
p.push_back({ x, y });
}
ll l = 0;
ll r = 14142135700000;
asd *= 10000;
while (l < r) {
double mid = (l + r) / 2;
double k = 0;
For(i, p.size()) {
double jeden = mid * mid;
double dva = p[i].second * p[i].second;
double tri = jeden - dva;
double d = sqrt(tri);
double s = p[i].ff - d;
double e = p[i].ff + d;
if (s > k) continue;
k = max(k, e);
}
if (k >= asd) r = mid;
else l = mid + 1;
}
cout << fixed << setprecision(4);
long double l2 = l;
l2 /= 10000;
cout << l2 << '\n';
return 0;
}
# |
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 |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
# |
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 |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
348 KB |
Output is correct |
2 |
Correct |
3 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
348 KB |
Output is correct |
2 |
Correct |
5 ms |
604 KB |
Output is correct |
3 |
Correct |
3 ms |
348 KB |
Output is correct |
4 |
Correct |
5 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
348 KB |
Output is correct |
2 |
Correct |
4 ms |
640 KB |
Output is correct |
3 |
Correct |
2 ms |
348 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 |
4 ms |
544 KB |
Output is correct |
3 |
Correct |
4 ms |
348 KB |
Output is correct |
4 |
Correct |
4 ms |
604 KB |
Output is correct |
5 |
Correct |
3 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
62 ms |
2604 KB |
Output is correct |
2 |
Correct |
71 ms |
1360 KB |
Output is correct |
3 |
Correct |
49 ms |
1740 KB |
Output is correct |
4 |
Correct |
60 ms |
2496 KB |
Output is correct |
5 |
Correct |
20 ms |
464 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
36 ms |
720 KB |
Output is correct |
2 |
Correct |
52 ms |
1580 KB |
Output is correct |
3 |
Correct |
62 ms |
2512 KB |
Output is correct |
4 |
Correct |
63 ms |
2592 KB |
Output is correct |
5 |
Correct |
85 ms |
2516 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
73 ms |
2508 KB |
Output is correct |
2 |
Correct |
60 ms |
1476 KB |
Output is correct |
3 |
Correct |
60 ms |
2784 KB |
Output is correct |
4 |
Correct |
90 ms |
2560 KB |
Output is correct |
5 |
Correct |
53 ms |
868 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
62 ms |
1484 KB |
Output is correct |
2 |
Correct |
63 ms |
1584 KB |
Output is correct |
3 |
Correct |
53 ms |
720 KB |
Output is correct |
4 |
Correct |
84 ms |
2512 KB |
Output is correct |
5 |
Correct |
82 ms |
2500 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
71 ms |
2504 KB |
Output is correct |
2 |
Correct |
59 ms |
1408 KB |
Output is correct |
3 |
Correct |
60 ms |
720 KB |
Output is correct |
4 |
Correct |
96 ms |
2504 KB |
Output is correct |
5 |
Correct |
86 ms |
2516 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
291 ms |
8632 KB |
Output is correct |
2 |
Correct |
291 ms |
728 KB |
Output is correct |
3 |
Correct |
275 ms |
696 KB |
Output is correct |
4 |
Correct |
477 ms |
8584 KB |
Output is correct |
5 |
Correct |
409 ms |
8620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
293 ms |
684 KB |
Output is correct |
2 |
Correct |
481 ms |
8628 KB |
Output is correct |
3 |
Correct |
249 ms |
2600 KB |
Output is correct |
4 |
Correct |
420 ms |
8584 KB |
Output is correct |
5 |
Correct |
434 ms |
8756 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
431 ms |
16928 KB |
Output is correct |
2 |
Correct |
357 ms |
592 KB |
Output is correct |
3 |
Correct |
389 ms |
452 KB |
Output is correct |
4 |
Correct |
559 ms |
16808 KB |
Output is correct |
5 |
Correct |
422 ms |
15048 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
368 ms |
516 KB |
Output is correct |
2 |
Correct |
492 ms |
16808 KB |
Output is correct |
3 |
Correct |
338 ms |
2588 KB |
Output is correct |
4 |
Correct |
510 ms |
16816 KB |
Output is correct |
5 |
Correct |
467 ms |
25156 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
435 ms |
16916 KB |
Output is correct |
2 |
Correct |
421 ms |
432 KB |
Output is correct |
3 |
Correct |
439 ms |
592 KB |
Output is correct |
4 |
Correct |
673 ms |
17036 KB |
Output is correct |
5 |
Correct |
461 ms |
15940 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
437 ms |
440 KB |
Output is correct |
2 |
Correct |
579 ms |
16776 KB |
Output is correct |
3 |
Correct |
359 ms |
2588 KB |
Output is correct |
4 |
Correct |
641 ms |
16944 KB |
Output is correct |
5 |
Correct |
527 ms |
25284 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
424 ms |
16812 KB |
Output is correct |
2 |
Correct |
437 ms |
440 KB |
Output is correct |
3 |
Correct |
428 ms |
848 KB |
Output is correct |
4 |
Correct |
724 ms |
16868 KB |
Output is correct |
5 |
Correct |
616 ms |
26376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
536 ms |
432 KB |
Output is correct |
2 |
Correct |
702 ms |
16808 KB |
Output is correct |
3 |
Correct |
453 ms |
2524 KB |
Output is correct |
4 |
Correct |
769 ms |
16804 KB |
Output is correct |
5 |
Correct |
709 ms |
25312 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
588 ms |
16740 KB |
Output is correct |
2 |
Correct |
694 ms |
428 KB |
Output is correct |
3 |
Correct |
589 ms |
432 KB |
Output is correct |
4 |
Correct |
866 ms |
16852 KB |
Output is correct |
5 |
Correct |
686 ms |
28248 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
648 ms |
504 KB |
Output is correct |
2 |
Correct |
901 ms |
17160 KB |
Output is correct |
3 |
Correct |
548 ms |
15232 KB |
Output is correct |
4 |
Execution timed out |
1027 ms |
35476 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |