답안 #656293

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
656293 2022-11-06T17:53:46 Z chjiao Mobile (BOI12_mobile) C++14
100 / 100
404 ms 35276 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 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 340 KB Output is correct
2 Correct 2 ms 468 KB Output is correct
3 Correct 2 ms 340 KB Output is correct
4 Correct 3 ms 468 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 340 KB Output is correct
2 Correct 2 ms 468 KB Output is correct
3 Correct 2 ms 424 KB Output is correct
4 Correct 2 ms 468 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 340 KB Output is correct
2 Correct 2 ms 464 KB Output is correct
3 Correct 2 ms 340 KB Output is correct
4 Correct 2 ms 468 KB Output is correct
5 Correct 2 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 32 ms 1376 KB Output is correct
2 Correct 22 ms 2524 KB Output is correct
3 Correct 14 ms 1708 KB Output is correct
4 Correct 27 ms 2600 KB Output is correct
5 Correct 13 ms 1492 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 1492 KB Output is correct
2 Correct 22 ms 2200 KB Output is correct
3 Correct 25 ms 2604 KB Output is correct
4 Correct 26 ms 2636 KB Output is correct
5 Correct 29 ms 3028 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 1708 KB Output is correct
2 Correct 23 ms 2772 KB Output is correct
3 Correct 22 ms 2516 KB Output is correct
4 Correct 38 ms 3780 KB Output is correct
5 Correct 30 ms 2516 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 27 ms 1892 KB Output is correct
2 Correct 34 ms 3272 KB Output is correct
3 Correct 26 ms 2916 KB Output is correct
4 Correct 40 ms 3768 KB Output is correct
5 Correct 31 ms 3028 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 27 ms 1892 KB Output is correct
2 Correct 28 ms 3216 KB Output is correct
3 Correct 29 ms 2816 KB Output is correct
4 Correct 36 ms 3796 KB Output is correct
5 Correct 31 ms 3156 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 111 ms 8140 KB Output is correct
2 Correct 138 ms 15748 KB Output is correct
3 Correct 147 ms 15228 KB Output is correct
4 Correct 185 ms 17672 KB Output is correct
5 Correct 157 ms 14892 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 137 ms 8132 KB Output is correct
2 Correct 213 ms 14668 KB Output is correct
3 Correct 132 ms 13856 KB Output is correct
4 Correct 175 ms 17352 KB Output is correct
5 Correct 161 ms 15340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 134 ms 9688 KB Output is correct
2 Correct 170 ms 18968 KB Output is correct
3 Correct 170 ms 18508 KB Output is correct
4 Correct 217 ms 21568 KB Output is correct
5 Correct 188 ms 17676 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 167 ms 9764 KB Output is correct
2 Correct 247 ms 17532 KB Output is correct
3 Correct 154 ms 16472 KB Output is correct
4 Correct 224 ms 21420 KB Output is correct
5 Correct 191 ms 18324 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 159 ms 11228 KB Output is correct
2 Correct 207 ms 22096 KB Output is correct
3 Correct 194 ms 21352 KB Output is correct
4 Correct 268 ms 24784 KB Output is correct
5 Correct 231 ms 20232 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 195 ms 11196 KB Output is correct
2 Correct 286 ms 20408 KB Output is correct
3 Correct 187 ms 19524 KB Output is correct
4 Correct 250 ms 24664 KB Output is correct
5 Correct 219 ms 21384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 178 ms 12840 KB Output is correct
2 Correct 236 ms 25116 KB Output is correct
3 Correct 218 ms 24352 KB Output is correct
4 Correct 296 ms 28552 KB Output is correct
5 Correct 260 ms 23868 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 223 ms 12804 KB Output is correct
2 Correct 336 ms 23404 KB Output is correct
3 Correct 211 ms 22340 KB Output is correct
4 Correct 291 ms 28324 KB Output is correct
5 Correct 251 ms 24400 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 238 ms 16012 KB Output is correct
2 Correct 301 ms 31392 KB Output is correct
3 Correct 297 ms 30400 KB Output is correct
4 Correct 382 ms 35228 KB Output is correct
5 Correct 322 ms 29616 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 282 ms 16016 KB Output is correct
2 Correct 404 ms 29236 KB Output is correct
3 Correct 270 ms 28284 KB Output is correct
4 Correct 365 ms 35276 KB Output is correct
5 Correct 333 ms 30632 KB Output is correct