답안 #991326

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
991326 2024-06-02T03:35:16 Z BF001 Mobile (BOI12_mobile) C++17
12 / 100
262 ms 8068 KB
#include <bits/stdc++.h>
using namespace std;

#define N 1000005
#define ld double

int n, x[N], y[N], len;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    
    cin >> n >> len;
    for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];

    ld l = 0, r = 2e9;
    while (r - l > 1e-6){
    	ld mid = (l + r) / 2.0;
    	ld cur = 0;
    	for (int i = 1; i <= n; i++){
    		ld denta = sqrt(mid * mid - y[i] * y[i]);
    		ld a = x[i] - denta;
    		ld b = x[i] + denta;
    		if (a <= cur) cur = max(cur, b);
    	}
    	if (cur >= len) r = mid;
    	else l = mid;
    }

    cout << fixed << setprecision(6) << l;
    
    return 0;
}     
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 0 ms 2392 KB Output is correct
3 Correct 0 ms 2396 KB Output is correct
4 Correct 0 ms 2396 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 2 ms 2392 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2392 KB Output is correct
2 Correct 2 ms 2528 KB Output is correct
3 Correct 2 ms 2392 KB Output is correct
4 Incorrect 2 ms 2396 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2396 KB Output is correct
2 Correct 2 ms 2532 KB Output is correct
3 Correct 2 ms 2396 KB Output is correct
4 Incorrect 2 ms 2396 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2396 KB Output is correct
2 Correct 2 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Incorrect 2 ms 2396 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 4696 KB Output is correct
2 Incorrect 20 ms 4664 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 4700 KB Output is correct
2 Correct 22 ms 4700 KB Output is correct
3 Incorrect 38 ms 4696 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 4700 KB Output is correct
2 Incorrect 21 ms 4700 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 27 ms 6748 KB Output is correct
2 Incorrect 26 ms 6748 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 26 ms 6748 KB Output is correct
2 Incorrect 26 ms 6792 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 128 ms 6748 KB Output is correct
2 Incorrect 131 ms 6792 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 130 ms 6780 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 138 ms 6772 KB Output is correct
2 Incorrect 166 ms 6776 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 154 ms 6788 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 167 ms 7092 KB Output is correct
2 Incorrect 179 ms 6928 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 188 ms 6996 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 182 ms 7480 KB Output is correct
2 Incorrect 205 ms 7256 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 215 ms 7248 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 227 ms 8020 KB Output is correct
2 Incorrect 255 ms 8068 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 262 ms 8016 KB Output isn't correct
2 Halted 0 ms 0 KB -