# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1031424 |
2024-07-22T20:24:04 Z |
vjudge1 |
Mobile (BOI12_mobile) |
C++17 |
|
431 ms |
15964 KB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
#define vi vector<int>
#define ii pair<int,int>
#define x first
#define y second
#define fore(a, b, c) for(int a=b; a<c; ++a)
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define endl '\n'
#define dbg(x) cerr << #x << ": " << x << endl
#define raya cerr << "================" << endl;
double eps = 1e-4;
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, len;
cin >> n >> len;
vector<ii> p(n);
fore(i, 0, n){
cin >> p[i].x >> p[i].y;
}
double low = 0, high = 1e9+5;
while((high - low) > eps){
double mid = low + (high - low) / 2;
double mx = 0;
fore(i, 0, n){
double delta = (2*p[i].x)*(2*p[i].x)-4*(p[i].x*p[i].x+p[i].y*p[i].y-mid*mid);
double a = (2*p[i].x - sqrt(delta)) / 2;
double b = (2*p[i].x + sqrt(delta)) / 2;
if(a <= mx){
mx = max(mx, b);
}
}
if(mx >= len){
high = mid;
} else {
low = mid;
}
}
cout << fixed << setprecision(6) << high;
}
# |
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 |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 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 |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 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 |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
3 ms |
348 KB |
Output is correct |
# |
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 |
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 |
2 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 |
3 ms |
348 KB |
Output is correct |
5 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
35 ms |
1628 KB |
Output is correct |
2 |
Correct |
20 ms |
1628 KB |
Output is correct |
3 |
Correct |
16 ms |
1112 KB |
Output is correct |
4 |
Correct |
34 ms |
1624 KB |
Output is correct |
5 |
Correct |
19 ms |
1116 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
28 ms |
1624 KB |
Output is correct |
2 |
Correct |
35 ms |
1372 KB |
Output is correct |
3 |
Correct |
34 ms |
1624 KB |
Output is correct |
4 |
Correct |
35 ms |
1628 KB |
Output is correct |
5 |
Correct |
41 ms |
1628 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
21 ms |
1624 KB |
Output is correct |
2 |
Correct |
21 ms |
1628 KB |
Output is correct |
3 |
Correct |
26 ms |
1628 KB |
Output is correct |
4 |
Correct |
49 ms |
1884 KB |
Output is correct |
5 |
Correct |
34 ms |
1628 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
1884 KB |
Output is correct |
2 |
Correct |
26 ms |
1884 KB |
Output is correct |
3 |
Correct |
28 ms |
1884 KB |
Output is correct |
4 |
Correct |
49 ms |
1884 KB |
Output is correct |
5 |
Correct |
40 ms |
1880 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
29 ms |
1880 KB |
Output is correct |
2 |
Correct |
27 ms |
1880 KB |
Output is correct |
3 |
Correct |
29 ms |
1884 KB |
Output is correct |
4 |
Correct |
49 ms |
1884 KB |
Output is correct |
5 |
Correct |
42 ms |
1880 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
118 ms |
8280 KB |
Output is correct |
2 |
Correct |
127 ms |
8144 KB |
Output is correct |
3 |
Correct |
120 ms |
8280 KB |
Output is correct |
4 |
Correct |
252 ms |
8284 KB |
Output is correct |
5 |
Correct |
204 ms |
8284 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
130 ms |
8280 KB |
Output is correct |
2 |
Correct |
249 ms |
8284 KB |
Output is correct |
3 |
Correct |
137 ms |
8280 KB |
Output is correct |
4 |
Correct |
229 ms |
8284 KB |
Output is correct |
5 |
Correct |
201 ms |
8212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
138 ms |
9816 KB |
Output is correct |
2 |
Correct |
161 ms |
9820 KB |
Output is correct |
3 |
Correct |
161 ms |
9820 KB |
Output is correct |
4 |
Correct |
279 ms |
9820 KB |
Output is correct |
5 |
Correct |
256 ms |
9820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
147 ms |
9820 KB |
Output is correct |
2 |
Correct |
284 ms |
9816 KB |
Output is correct |
3 |
Correct |
175 ms |
9820 KB |
Output is correct |
4 |
Correct |
278 ms |
9820 KB |
Output is correct |
5 |
Correct |
245 ms |
9820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
170 ms |
11352 KB |
Output is correct |
2 |
Correct |
184 ms |
11352 KB |
Output is correct |
3 |
Correct |
168 ms |
11356 KB |
Output is correct |
4 |
Correct |
311 ms |
11352 KB |
Output is correct |
5 |
Correct |
277 ms |
11356 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
179 ms |
11356 KB |
Output is correct |
2 |
Correct |
349 ms |
11356 KB |
Output is correct |
3 |
Correct |
188 ms |
11352 KB |
Output is correct |
4 |
Correct |
329 ms |
11352 KB |
Output is correct |
5 |
Correct |
287 ms |
11356 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
188 ms |
12888 KB |
Output is correct |
2 |
Correct |
221 ms |
12892 KB |
Output is correct |
3 |
Correct |
216 ms |
12892 KB |
Output is correct |
4 |
Correct |
389 ms |
12892 KB |
Output is correct |
5 |
Correct |
318 ms |
12892 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
212 ms |
12888 KB |
Output is correct |
2 |
Correct |
382 ms |
12892 KB |
Output is correct |
3 |
Correct |
243 ms |
12888 KB |
Output is correct |
4 |
Correct |
362 ms |
12888 KB |
Output is correct |
5 |
Correct |
307 ms |
12888 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
242 ms |
15960 KB |
Output is correct |
2 |
Correct |
235 ms |
15960 KB |
Output is correct |
3 |
Correct |
263 ms |
15964 KB |
Output is correct |
4 |
Correct |
423 ms |
15960 KB |
Output is correct |
5 |
Correct |
420 ms |
15960 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
239 ms |
15964 KB |
Output is correct |
2 |
Correct |
431 ms |
15960 KB |
Output is correct |
3 |
Correct |
283 ms |
15960 KB |
Output is correct |
4 |
Correct |
427 ms |
15964 KB |
Output is correct |
5 |
Correct |
375 ms |
15964 KB |
Output is correct |