답안 #970784

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
970784 2024-04-27T08:56:48 Z hihihihaw Mobile (BOI12_mobile) C++17
100 / 100
340 ms 35456 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 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 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 Grader output
1 Correct 2 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 2 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 2 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 2 ms 348 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 26 ms 2652 KB Output is correct
2 Correct 19 ms 2700 KB Output is correct
3 Correct 18 ms 2652 KB Output is correct
4 Correct 23 ms 2648 KB Output is correct
5 Correct 12 ms 2652 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 2652 KB Output is correct
2 Correct 20 ms 2648 KB Output is correct
3 Correct 23 ms 2688 KB Output is correct
4 Correct 24 ms 2908 KB Output is correct
5 Correct 27 ms 2852 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 2652 KB Output is correct
2 Correct 20 ms 2652 KB Output is correct
3 Correct 20 ms 2652 KB Output is correct
4 Correct 32 ms 2900 KB Output is correct
5 Correct 23 ms 2692 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 26 ms 2652 KB Output is correct
2 Correct 25 ms 2652 KB Output is correct
3 Correct 23 ms 2652 KB Output is correct
4 Correct 33 ms 2676 KB Output is correct
5 Correct 29 ms 2648 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 26 ms 2648 KB Output is correct
2 Correct 24 ms 2652 KB Output is correct
3 Correct 23 ms 2652 KB Output is correct
4 Correct 32 ms 2652 KB Output is correct
5 Correct 28 ms 2652 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 111 ms 9296 KB Output is correct
2 Correct 120 ms 8784 KB Output is correct
3 Correct 118 ms 8828 KB Output is correct
4 Correct 156 ms 8784 KB Output is correct
5 Correct 141 ms 8784 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 122 ms 8788 KB Output is correct
2 Correct 180 ms 8824 KB Output is correct
3 Correct 121 ms 8844 KB Output is correct
4 Correct 156 ms 8576 KB Output is correct
5 Correct 153 ms 8788 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 124 ms 10832 KB Output is correct
2 Correct 144 ms 10832 KB Output is correct
3 Correct 142 ms 10836 KB Output is correct
4 Correct 191 ms 10876 KB Output is correct
5 Correct 184 ms 10868 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 146 ms 10872 KB Output is correct
2 Correct 229 ms 10876 KB Output is correct
3 Correct 139 ms 10832 KB Output is correct
4 Correct 191 ms 10876 KB Output is correct
5 Correct 170 ms 10880 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 148 ms 12932 KB Output is correct
2 Correct 167 ms 12928 KB Output is correct
3 Correct 166 ms 12920 KB Output is correct
4 Correct 227 ms 12928 KB Output is correct
5 Correct 191 ms 12936 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 171 ms 13172 KB Output is correct
2 Correct 248 ms 12880 KB Output is correct
3 Correct 160 ms 12936 KB Output is correct
4 Correct 231 ms 12936 KB Output is correct
5 Correct 197 ms 12932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 166 ms 14932 KB Output is correct
2 Correct 198 ms 14936 KB Output is correct
3 Correct 193 ms 14980 KB Output is correct
4 Correct 249 ms 14980 KB Output is correct
5 Correct 234 ms 15220 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 192 ms 14964 KB Output is correct
2 Correct 273 ms 14984 KB Output is correct
3 Correct 182 ms 14980 KB Output is correct
4 Correct 252 ms 14984 KB Output is correct
5 Correct 227 ms 15236 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 205 ms 15952 KB Output is correct
2 Correct 236 ms 16092 KB Output is correct
3 Correct 242 ms 31312 KB Output is correct
4 Correct 316 ms 35152 KB Output is correct
5 Correct 290 ms 29780 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 248 ms 15956 KB Output is correct
2 Correct 340 ms 29316 KB Output is correct
3 Correct 235 ms 28244 KB Output is correct
4 Correct 319 ms 35456 KB Output is correct
5 Correct 293 ms 30868 KB Output is correct