답안 #724542

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
724542 2023-04-15T14:01:19 Z rastervc Mobile (BOI12_mobile) C++17
100 / 100
424 ms 35420 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 332 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 324 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 324 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 340 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 3 ms 444 KB Output is correct
4 Correct 2 ms 476 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 340 KB Output is correct
2 Correct 2 ms 476 KB Output is correct
3 Correct 2 ms 340 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 476 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 31 ms 2260 KB Output is correct
2 Correct 22 ms 2484 KB Output is correct
3 Correct 14 ms 1788 KB Output is correct
4 Correct 27 ms 2636 KB Output is correct
5 Correct 14 ms 1480 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 2276 KB Output is correct
2 Correct 22 ms 2132 KB Output is correct
3 Correct 27 ms 2612 KB Output is correct
4 Correct 27 ms 2744 KB Output is correct
5 Correct 31 ms 3140 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 2344 KB Output is correct
2 Correct 27 ms 2688 KB Output is correct
3 Correct 23 ms 2488 KB Output is correct
4 Correct 40 ms 3784 KB Output is correct
5 Correct 28 ms 2628 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 3364 KB Output is correct
2 Correct 29 ms 3288 KB Output is correct
3 Correct 28 ms 2892 KB Output is correct
4 Correct 43 ms 3732 KB Output is correct
5 Correct 46 ms 3132 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 31 ms 3488 KB Output is correct
2 Correct 30 ms 3220 KB Output is correct
3 Correct 30 ms 2848 KB Output is correct
4 Correct 38 ms 3788 KB Output is correct
5 Correct 35 ms 3152 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 123 ms 12448 KB Output is correct
2 Correct 151 ms 15928 KB Output is correct
3 Correct 148 ms 15392 KB Output is correct
4 Correct 244 ms 17740 KB Output is correct
5 Correct 176 ms 14964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 147 ms 16412 KB Output is correct
2 Correct 228 ms 14728 KB Output is correct
3 Correct 132 ms 13828 KB Output is correct
4 Correct 179 ms 17496 KB Output is correct
5 Correct 163 ms 15668 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 140 ms 14796 KB Output is correct
2 Correct 172 ms 18992 KB Output is correct
3 Correct 170 ms 18408 KB Output is correct
4 Correct 229 ms 21620 KB Output is correct
5 Correct 243 ms 17700 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 194 ms 19680 KB Output is correct
2 Correct 277 ms 17544 KB Output is correct
3 Correct 171 ms 16668 KB Output is correct
4 Correct 238 ms 21436 KB Output is correct
5 Correct 212 ms 18336 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 204 ms 17328 KB Output is correct
2 Correct 220 ms 22128 KB Output is correct
3 Correct 235 ms 21452 KB Output is correct
4 Correct 291 ms 24828 KB Output is correct
5 Correct 242 ms 20360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 242 ms 22808 KB Output is correct
2 Correct 303 ms 20524 KB Output is correct
3 Correct 243 ms 19660 KB Output is correct
4 Correct 308 ms 24600 KB Output is correct
5 Correct 312 ms 21412 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 197 ms 19776 KB Output is correct
2 Correct 260 ms 25244 KB Output is correct
3 Correct 256 ms 24440 KB Output is correct
4 Correct 324 ms 28464 KB Output is correct
5 Correct 287 ms 24132 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 248 ms 26040 KB Output is correct
2 Correct 409 ms 23408 KB Output is correct
3 Correct 237 ms 22348 KB Output is correct
4 Correct 344 ms 28328 KB Output is correct
5 Correct 296 ms 24436 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 240 ms 24604 KB Output is correct
2 Correct 339 ms 31396 KB Output is correct
3 Correct 328 ms 30508 KB Output is correct
4 Correct 407 ms 35108 KB Output is correct
5 Correct 354 ms 29516 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 299 ms 32492 KB Output is correct
2 Correct 424 ms 29180 KB Output is correct
3 Correct 290 ms 28260 KB Output is correct
4 Correct 369 ms 35420 KB Output is correct
5 Correct 349 ms 30868 KB Output is correct