답안 #991332

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
991332 2024-06-02T03:44:05 Z BF001 Mobile (BOI12_mobile) C++17
100 / 100
337 ms 16264 KB
#include <bits/stdc++.h>
using namespace std;
 
#define N 1000005
#define ld double
 
int n, len;
long long x[N], y[N];
 
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-3){
    	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 0 ms 2392 KB Output is correct
2 Correct 0 ms 2396 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 0 ms 2392 KB Output is correct
2 Correct 1 ms 2396 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 2 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 2392 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2396 KB Output is correct
2 Correct 2 ms 2396 KB Output is correct
3 Correct 2 ms 2396 KB Output is correct
4 Correct 2 ms 2396 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2396 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 2 ms 2564 KB Output is correct
4 Correct 2 ms 2396 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 2 ms 2396 KB Output is correct
3 Correct 2 ms 2396 KB Output is correct
4 Correct 3 ms 2396 KB Output is correct
5 Correct 2 ms 2396 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 6748 KB Output is correct
2 Correct 18 ms 6796 KB Output is correct
3 Correct 12 ms 4700 KB Output is correct
4 Correct 22 ms 6792 KB Output is correct
5 Correct 12 ms 4696 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 6748 KB Output is correct
2 Correct 19 ms 4744 KB Output is correct
3 Correct 22 ms 6748 KB Output is correct
4 Correct 24 ms 6804 KB Output is correct
5 Correct 34 ms 6800 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 17 ms 6744 KB Output is correct
2 Correct 19 ms 6748 KB Output is correct
3 Correct 20 ms 6796 KB Output is correct
4 Correct 33 ms 6792 KB Output is correct
5 Correct 29 ms 6744 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 6744 KB Output is correct
2 Correct 25 ms 6748 KB Output is correct
3 Correct 24 ms 6748 KB Output is correct
4 Correct 32 ms 6748 KB Output is correct
5 Correct 27 ms 6744 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 6744 KB Output is correct
2 Correct 24 ms 6748 KB Output is correct
3 Correct 22 ms 6748 KB Output is correct
4 Correct 31 ms 6744 KB Output is correct
5 Correct 27 ms 6744 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 112 ms 10632 KB Output is correct
2 Correct 116 ms 10832 KB Output is correct
3 Correct 108 ms 10832 KB Output is correct
4 Correct 153 ms 10900 KB Output is correct
5 Correct 136 ms 10848 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 114 ms 10832 KB Output is correct
2 Correct 188 ms 11132 KB Output is correct
3 Correct 114 ms 10880 KB Output is correct
4 Correct 150 ms 10624 KB Output is correct
5 Correct 138 ms 10880 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 122 ms 14944 KB Output is correct
2 Correct 159 ms 14984 KB Output is correct
3 Correct 135 ms 14928 KB Output is correct
4 Correct 204 ms 14984 KB Output is correct
5 Correct 164 ms 14928 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 143 ms 14928 KB Output is correct
2 Correct 220 ms 15188 KB Output is correct
3 Correct 132 ms 14972 KB Output is correct
4 Correct 189 ms 14928 KB Output is correct
5 Correct 165 ms 14928 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 140 ms 14932 KB Output is correct
2 Correct 160 ms 14928 KB Output is correct
3 Correct 155 ms 14928 KB Output is correct
4 Correct 221 ms 14932 KB Output is correct
5 Correct 187 ms 14984 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 163 ms 14928 KB Output is correct
2 Correct 255 ms 14928 KB Output is correct
3 Correct 157 ms 14932 KB Output is correct
4 Correct 223 ms 14932 KB Output is correct
5 Correct 202 ms 14984 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 167 ms 14984 KB Output is correct
2 Correct 182 ms 14928 KB Output is correct
3 Correct 186 ms 14928 KB Output is correct
4 Correct 238 ms 14928 KB Output is correct
5 Correct 220 ms 14928 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 197 ms 14984 KB Output is correct
2 Correct 275 ms 14980 KB Output is correct
3 Correct 178 ms 14932 KB Output is correct
4 Correct 271 ms 14988 KB Output is correct
5 Correct 232 ms 14932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 200 ms 15952 KB Output is correct
2 Correct 229 ms 16084 KB Output is correct
3 Correct 224 ms 15956 KB Output is correct
4 Correct 325 ms 16264 KB Output is correct
5 Correct 294 ms 15992 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 232 ms 15952 KB Output is correct
2 Correct 337 ms 15956 KB Output is correct
3 Correct 223 ms 15952 KB Output is correct
4 Correct 307 ms 15952 KB Output is correct
5 Correct 277 ms 16016 KB Output is correct