답안 #477079

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
477079 2021-09-30T06:13:01 Z qwerty1234 Mobile (BOI12_mobile) C++17
100 / 100
488 ms 35388 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 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 332 KB Output is correct
2 Correct 1 ms 460 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 332 KB Output is correct
2 Correct 2 ms 332 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 2 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 332 KB Output is correct
2 Correct 2 ms 332 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 3 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 332 KB Output is correct
2 Correct 3 ms 332 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 3 ms 332 KB Output is correct
5 Correct 2 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 34 ms 1472 KB Output is correct
2 Correct 30 ms 1496 KB Output is correct
3 Correct 16 ms 1144 KB Output is correct
4 Correct 38 ms 1384 KB Output is correct
5 Correct 15 ms 1100 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 26 ms 1484 KB Output is correct
2 Correct 36 ms 1524 KB Output is correct
3 Correct 34 ms 1564 KB Output is correct
4 Correct 32 ms 1604 KB Output is correct
5 Correct 34 ms 1612 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 1612 KB Output is correct
2 Correct 32 ms 1496 KB Output is correct
3 Correct 33 ms 1532 KB Output is correct
4 Correct 42 ms 1836 KB Output is correct
5 Correct 28 ms 1612 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 34 ms 1816 KB Output is correct
2 Correct 35 ms 1944 KB Output is correct
3 Correct 37 ms 1832 KB Output is correct
4 Correct 49 ms 1796 KB Output is correct
5 Correct 39 ms 1788 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 1832 KB Output is correct
2 Correct 42 ms 1864 KB Output is correct
3 Correct 41 ms 1776 KB Output is correct
4 Correct 53 ms 1872 KB Output is correct
5 Correct 36 ms 1860 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 165 ms 8016 KB Output is correct
2 Correct 189 ms 8228 KB Output is correct
3 Correct 175 ms 8152 KB Output is correct
4 Correct 226 ms 8132 KB Output is correct
5 Correct 204 ms 8236 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 171 ms 8320 KB Output is correct
2 Correct 234 ms 8036 KB Output is correct
3 Correct 184 ms 8132 KB Output is correct
4 Correct 227 ms 8012 KB Output is correct
5 Correct 189 ms 8128 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 166 ms 9776 KB Output is correct
2 Correct 204 ms 9708 KB Output is correct
3 Correct 196 ms 9612 KB Output is correct
4 Correct 259 ms 9840 KB Output is correct
5 Correct 237 ms 9680 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 202 ms 9696 KB Output is correct
2 Correct 284 ms 9624 KB Output is correct
3 Correct 178 ms 9796 KB Output is correct
4 Correct 255 ms 9692 KB Output is correct
5 Correct 232 ms 9772 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 218 ms 11256 KB Output is correct
2 Correct 226 ms 11204 KB Output is correct
3 Correct 255 ms 11332 KB Output is correct
4 Correct 327 ms 11348 KB Output is correct
5 Correct 263 ms 20280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 249 ms 11320 KB Output is correct
2 Correct 326 ms 11204 KB Output is correct
3 Correct 258 ms 11204 KB Output is correct
4 Correct 306 ms 11356 KB Output is correct
5 Correct 274 ms 21480 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 222 ms 12840 KB Output is correct
2 Correct 284 ms 12868 KB Output is correct
3 Correct 336 ms 24444 KB Output is correct
4 Correct 365 ms 28356 KB Output is correct
5 Correct 318 ms 23876 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 269 ms 12744 KB Output is correct
2 Correct 372 ms 23468 KB Output is correct
3 Correct 307 ms 22340 KB Output is correct
4 Correct 350 ms 28268 KB Output is correct
5 Correct 333 ms 24472 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 289 ms 15940 KB Output is correct
2 Correct 330 ms 17128 KB Output is correct
3 Correct 338 ms 30484 KB Output is correct
4 Correct 477 ms 35128 KB Output is correct
5 Correct 432 ms 29508 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 355 ms 17316 KB Output is correct
2 Correct 488 ms 29252 KB Output is correct
3 Correct 381 ms 28224 KB Output is correct
4 Correct 443 ms 35388 KB Output is correct
5 Correct 415 ms 30788 KB Output is correct