답안 #951912

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
951912 2024-03-23T00:45:04 Z chuongdan Mobile (BOI12_mobile) C++14
100 / 100
381 ms 35172 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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 600 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 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 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 344 KB Output is correct
2 Correct 2 ms 604 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 2 ms 604 KB Output is correct
3 Correct 2 ms 348 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 2 ms 488 KB Output is correct
3 Correct 2 ms 472 KB Output is correct
4 Correct 3 ms 604 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 3416 KB Output is correct
2 Correct 20 ms 3768 KB Output is correct
3 Correct 17 ms 3160 KB Output is correct
4 Correct 23 ms 3676 KB Output is correct
5 Correct 13 ms 2908 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 3420 KB Output is correct
2 Correct 22 ms 3420 KB Output is correct
3 Correct 25 ms 3672 KB Output is correct
4 Correct 24 ms 3676 KB Output is correct
5 Correct 28 ms 3932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 3348 KB Output is correct
2 Correct 21 ms 3676 KB Output is correct
3 Correct 24 ms 3632 KB Output is correct
4 Correct 33 ms 4440 KB Output is correct
5 Correct 24 ms 3420 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 4208 KB Output is correct
2 Correct 26 ms 3928 KB Output is correct
3 Correct 24 ms 3676 KB Output is correct
4 Correct 32 ms 4444 KB Output is correct
5 Correct 28 ms 3932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 3956 KB Output is correct
2 Correct 25 ms 3932 KB Output is correct
3 Correct 23 ms 3676 KB Output is correct
4 Correct 33 ms 4436 KB Output is correct
5 Correct 30 ms 4192 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 106 ms 12884 KB Output is correct
2 Correct 124 ms 16492 KB Output is correct
3 Correct 119 ms 16040 KB Output is correct
4 Correct 163 ms 18400 KB Output is correct
5 Correct 142 ms 15640 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 125 ms 16976 KB Output is correct
2 Correct 182 ms 15432 KB Output is correct
3 Correct 115 ms 14420 KB Output is correct
4 Correct 163 ms 18156 KB Output is correct
5 Correct 147 ms 16100 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 131 ms 16208 KB Output is correct
2 Correct 146 ms 20072 KB Output is correct
3 Correct 147 ms 19544 KB Output is correct
4 Correct 196 ms 22988 KB Output is correct
5 Correct 170 ms 18768 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 161 ms 20732 KB Output is correct
2 Correct 218 ms 18796 KB Output is correct
3 Correct 139 ms 17492 KB Output is correct
4 Correct 199 ms 22352 KB Output is correct
5 Correct 178 ms 19588 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 148 ms 18772 KB Output is correct
2 Correct 169 ms 23764 KB Output is correct
3 Correct 173 ms 23152 KB Output is correct
4 Correct 223 ms 26340 KB Output is correct
5 Correct 205 ms 21840 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 183 ms 24556 KB Output is correct
2 Correct 245 ms 22100 KB Output is correct
3 Correct 165 ms 21108 KB Output is correct
4 Correct 230 ms 26208 KB Output is correct
5 Correct 209 ms 22864 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 175 ms 21844 KB Output is correct
2 Correct 193 ms 27220 KB Output is correct
3 Correct 194 ms 26452 KB Output is correct
4 Correct 282 ms 30612 KB Output is correct
5 Correct 239 ms 25964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 218 ms 28160 KB Output is correct
2 Correct 286 ms 25536 KB Output is correct
3 Correct 231 ms 24400 KB Output is correct
4 Correct 284 ms 30300 KB Output is correct
5 Correct 228 ms 26552 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 227 ms 24772 KB Output is correct
2 Correct 242 ms 31472 KB Output is correct
3 Correct 246 ms 30544 KB Output is correct
4 Correct 381 ms 35168 KB Output is correct
5 Correct 319 ms 29652 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 273 ms 32584 KB Output is correct
2 Correct 334 ms 29268 KB Output is correct
3 Correct 278 ms 28368 KB Output is correct
4 Correct 373 ms 35172 KB Output is correct
5 Correct 368 ms 30916 KB Output is correct