답안 #1012080

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1012080 2024-07-01T15:35:15 Z tkvinhtruongquang Mobile (BOI12_mobile) C++14
100 / 100
323 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;
}
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 460 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 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 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 476 KB Output is correct
2 Correct 2 ms 600 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 472 KB Output is correct
2 Correct 1 ms 604 KB Output is correct
3 Correct 2 ms 600 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 600 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 600 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 2420 KB Output is correct
2 Correct 18 ms 2652 KB Output is correct
3 Correct 12 ms 1884 KB Output is correct
4 Correct 27 ms 2908 KB Output is correct
5 Correct 12 ms 1544 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 2204 KB Output is correct
2 Correct 20 ms 2140 KB Output is correct
3 Correct 22 ms 2904 KB Output is correct
4 Correct 24 ms 2824 KB Output is correct
5 Correct 26 ms 3160 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 18 ms 2396 KB Output is correct
2 Correct 23 ms 2868 KB Output is correct
3 Correct 20 ms 2656 KB Output is correct
4 Correct 33 ms 3932 KB Output is correct
5 Correct 23 ms 2652 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 3420 KB Output is correct
2 Correct 24 ms 3416 KB Output is correct
3 Correct 22 ms 2908 KB Output is correct
4 Correct 31 ms 3928 KB Output is correct
5 Correct 27 ms 3164 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 3416 KB Output is correct
2 Correct 24 ms 3420 KB Output is correct
3 Correct 26 ms 2904 KB Output is correct
4 Correct 31 ms 3928 KB Output is correct
5 Correct 27 ms 3164 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 109 ms 12628 KB Output is correct
2 Correct 132 ms 15884 KB Output is correct
3 Correct 127 ms 15440 KB Output is correct
4 Correct 146 ms 17744 KB Output is correct
5 Correct 138 ms 14864 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 124 ms 16456 KB Output is correct
2 Correct 186 ms 14696 KB Output is correct
3 Correct 113 ms 13808 KB Output is correct
4 Correct 151 ms 17492 KB Output is correct
5 Correct 141 ms 15440 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 134 ms 15168 KB Output is correct
2 Correct 143 ms 19024 KB Output is correct
3 Correct 154 ms 18496 KB Output is correct
4 Correct 182 ms 21572 KB Output is correct
5 Correct 162 ms 17752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 145 ms 19596 KB Output is correct
2 Correct 217 ms 17744 KB Output is correct
3 Correct 134 ms 16464 KB Output is correct
4 Correct 179 ms 21472 KB Output is correct
5 Correct 204 ms 18516 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 146 ms 17280 KB Output is correct
2 Correct 170 ms 22096 KB Output is correct
3 Correct 164 ms 21332 KB Output is correct
4 Correct 218 ms 24912 KB Output is correct
5 Correct 199 ms 20216 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 168 ms 22868 KB Output is correct
2 Correct 243 ms 20464 KB Output is correct
3 Correct 166 ms 19540 KB Output is correct
4 Correct 204 ms 24580 KB Output is correct
5 Correct 193 ms 21328 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 169 ms 19792 KB Output is correct
2 Correct 204 ms 25564 KB Output is correct
3 Correct 187 ms 24408 KB Output is correct
4 Correct 244 ms 28500 KB Output is correct
5 Correct 223 ms 23892 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 192 ms 25936 KB Output is correct
2 Correct 277 ms 23524 KB Output is correct
3 Correct 178 ms 22440 KB Output is correct
4 Correct 243 ms 28196 KB Output is correct
5 Correct 226 ms 24380 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 206 ms 24660 KB Output is correct
2 Correct 262 ms 31568 KB Output is correct
3 Correct 257 ms 30492 KB Output is correct
4 Correct 292 ms 35408 KB Output is correct
5 Correct 280 ms 29548 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 242 ms 32592 KB Output is correct
2 Correct 323 ms 29268 KB Output is correct
3 Correct 224 ms 28240 KB Output is correct
4 Correct 302 ms 35356 KB Output is correct
5 Correct 268 ms 30760 KB Output is correct