Submission #1087406

# Submission time Handle Problem Language Result Execution time Memory
1087406 2024-09-12T15:46:58 Z Octa_pe_info Mobile (BOI12_mobile) C++14
100 / 100
361 ms 35408 KB
#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;

pair<long long, long long> p[1000000];

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n, len;
	cin >> n >> len;
	for (int i = 0; i < n; i++) cin >> p[i].x >> p[i].y;

	double l = 1, r = 1.5e9;
	while (r - l > 1e-3) {
		double mid = (l + r) / 2, curr = 0;
		for (int i = 0; i < n; i++) {
			double delta = sqrt(mid * mid - p[i].y * p[i].y);
			double a = p[i].x - delta, b = p[i].x + delta;
			if (a <= curr) curr = max(curr, b);
		}

		if (curr >= len) r = mid;
		else l = mid;
	}

	cout << fixed << setprecision(4) << l;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 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 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 348 KB Output is correct
2 Correct 2 ms 604 KB Output is correct
3 Correct 2 ms 344 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 348 KB Output is correct
2 Correct 2 ms 604 KB Output is correct
3 Correct 2 ms 344 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 600 KB Output is correct
3 Correct 2 ms 472 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 3 ms 576 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 29 ms 2392 KB Output is correct
2 Correct 19 ms 2648 KB Output is correct
3 Correct 13 ms 1880 KB Output is correct
4 Correct 38 ms 2648 KB Output is correct
5 Correct 12 ms 1628 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 2396 KB Output is correct
2 Correct 32 ms 2140 KB Output is correct
3 Correct 30 ms 2732 KB Output is correct
4 Correct 24 ms 2652 KB Output is correct
5 Correct 28 ms 3164 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 2396 KB Output is correct
2 Correct 28 ms 2652 KB Output is correct
3 Correct 31 ms 2648 KB Output is correct
4 Correct 34 ms 3924 KB Output is correct
5 Correct 23 ms 2764 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 36 ms 3356 KB Output is correct
2 Correct 24 ms 3428 KB Output is correct
3 Correct 23 ms 3056 KB Output is correct
4 Correct 34 ms 3928 KB Output is correct
5 Correct 46 ms 3260 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 25 ms 3416 KB Output is correct
2 Correct 28 ms 3424 KB Output is correct
3 Correct 24 ms 3056 KB Output is correct
4 Correct 31 ms 3832 KB Output is correct
5 Correct 28 ms 3160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 108 ms 12388 KB Output is correct
2 Correct 124 ms 15952 KB Output is correct
3 Correct 120 ms 15440 KB Output is correct
4 Correct 156 ms 17784 KB Output is correct
5 Correct 169 ms 14932 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 125 ms 16444 KB Output is correct
2 Correct 185 ms 14744 KB Output is correct
3 Correct 115 ms 13980 KB Output is correct
4 Correct 150 ms 17492 KB Output is correct
5 Correct 143 ms 15444 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 128 ms 14796 KB Output is correct
2 Correct 154 ms 18936 KB Output is correct
3 Correct 145 ms 18376 KB Output is correct
4 Correct 186 ms 21844 KB Output is correct
5 Correct 183 ms 17744 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 146 ms 19668 KB Output is correct
2 Correct 221 ms 17740 KB Output is correct
3 Correct 164 ms 16588 KB Output is correct
4 Correct 187 ms 21332 KB Output is correct
5 Correct 171 ms 18512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 183 ms 17232 KB Output is correct
2 Correct 173 ms 22100 KB Output is correct
3 Correct 183 ms 21496 KB Output is correct
4 Correct 215 ms 24956 KB Output is correct
5 Correct 209 ms 20304 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 184 ms 22844 KB Output is correct
2 Correct 256 ms 20552 KB Output is correct
3 Correct 166 ms 19716 KB Output is correct
4 Correct 220 ms 24888 KB Output is correct
5 Correct 198 ms 21296 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 167 ms 19796 KB Output is correct
2 Correct 194 ms 25172 KB Output is correct
3 Correct 186 ms 24352 KB Output is correct
4 Correct 257 ms 28500 KB Output is correct
5 Correct 219 ms 24116 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 196 ms 25936 KB Output is correct
2 Correct 284 ms 23376 KB Output is correct
3 Correct 188 ms 22356 KB Output is correct
4 Correct 252 ms 28504 KB Output is correct
5 Correct 222 ms 24400 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 212 ms 24660 KB Output is correct
2 Correct 246 ms 31572 KB Output is correct
3 Correct 247 ms 30548 KB Output is correct
4 Correct 322 ms 35156 KB Output is correct
5 Correct 278 ms 29428 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 275 ms 32444 KB Output is correct
2 Correct 361 ms 29268 KB Output is correct
3 Correct 237 ms 28164 KB Output is correct
4 Correct 321 ms 35408 KB Output is correct
5 Correct 285 ms 30744 KB Output is correct