답안 #493540

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
493540 2021-12-11T22:22:19 Z imaginary_unit Mobile (BOI12_mobile) C++17
100 / 100
448 ms 16232 KB
#include<bits/stdc++.h>
#define ll long long
#define fi first
#define se second
using namespace std;

ll x[1'000'000], y[1'000'000];

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int n, len;
    cin >> n >> len;
    for(int i=0; i<n; i++){
        cin >> x[i] >> y[i];
    }

    double l=1, r=1.5e9;
    while(r-l>1e-3){
        double m=(l+r)/2, cur=0;
        for(int i=0; i<n; i++){
            double delta=sqrt(m*m-y[i]*y[i]);
            double a=x[i]-delta, b=x[i]+delta;
            if(a<=cur){
                cur=max(cur, b);
            }
        }
        if(cur>=len){
            r=m;
        }
        else{
            l=m;
        }
    }
    cout << fixed << setprecision(4) << l;
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 320 KB Output is correct
4 Correct 0 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 1 ms 332 KB Output is correct
2 Correct 1 ms 332 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 2 ms 332 KB Output is correct
2 Correct 2 ms 332 KB Output is correct
3 Correct 2 ms 328 KB Output is correct
4 Correct 3 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 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 4 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 344 KB Output is correct
5 Correct 2 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 1484 KB Output is correct
2 Correct 23 ms 1572 KB Output is correct
3 Correct 15 ms 1228 KB Output is correct
4 Correct 29 ms 1556 KB Output is correct
5 Correct 13 ms 1100 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 1608 KB Output is correct
2 Correct 24 ms 1356 KB Output is correct
3 Correct 33 ms 1508 KB Output is correct
4 Correct 31 ms 1564 KB Output is correct
5 Correct 34 ms 1752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 1804 KB Output is correct
2 Correct 25 ms 1696 KB Output is correct
3 Correct 23 ms 1672 KB Output is correct
4 Correct 39 ms 2024 KB Output is correct
5 Correct 29 ms 1688 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 1936 KB Output is correct
2 Correct 30 ms 1988 KB Output is correct
3 Correct 29 ms 1924 KB Output is correct
4 Correct 55 ms 2032 KB Output is correct
5 Correct 49 ms 1896 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 1940 KB Output is correct
2 Correct 28 ms 1952 KB Output is correct
3 Correct 26 ms 1996 KB Output is correct
4 Correct 42 ms 1964 KB Output is correct
5 Correct 32 ms 1852 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 122 ms 8300 KB Output is correct
2 Correct 173 ms 8272 KB Output is correct
3 Correct 153 ms 8248 KB Output is correct
4 Correct 193 ms 8280 KB Output is correct
5 Correct 190 ms 8220 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 155 ms 8356 KB Output is correct
2 Correct 214 ms 8280 KB Output is correct
3 Correct 129 ms 8320 KB Output is correct
4 Correct 194 ms 8276 KB Output is correct
5 Correct 193 ms 8220 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 164 ms 9820 KB Output is correct
2 Correct 188 ms 9936 KB Output is correct
3 Correct 179 ms 9944 KB Output is correct
4 Correct 234 ms 9868 KB Output is correct
5 Correct 197 ms 9892 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 183 ms 9960 KB Output is correct
2 Correct 254 ms 9924 KB Output is correct
3 Correct 153 ms 9796 KB Output is correct
4 Correct 286 ms 9872 KB Output is correct
5 Correct 200 ms 9732 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 169 ms 11412 KB Output is correct
2 Correct 256 ms 11432 KB Output is correct
3 Correct 186 ms 11332 KB Output is correct
4 Correct 278 ms 11468 KB Output is correct
5 Correct 267 ms 11360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 214 ms 11488 KB Output is correct
2 Correct 287 ms 11460 KB Output is correct
3 Correct 198 ms 11460 KB Output is correct
4 Correct 271 ms 11472 KB Output is correct
5 Correct 237 ms 11304 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 194 ms 12868 KB Output is correct
2 Correct 223 ms 12876 KB Output is correct
3 Correct 238 ms 12868 KB Output is correct
4 Correct 326 ms 13132 KB Output is correct
5 Correct 265 ms 13024 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 285 ms 13056 KB Output is correct
2 Correct 319 ms 12984 KB Output is correct
3 Correct 252 ms 12940 KB Output is correct
4 Correct 320 ms 13124 KB Output is correct
5 Correct 264 ms 12908 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 276 ms 16128 KB Output is correct
2 Correct 286 ms 16112 KB Output is correct
3 Correct 266 ms 16068 KB Output is correct
4 Correct 448 ms 15940 KB Output is correct
5 Correct 329 ms 16172 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 342 ms 16148 KB Output is correct
2 Correct 388 ms 16124 KB Output is correct
3 Correct 318 ms 16088 KB Output is correct
4 Correct 374 ms 15912 KB Output is correct
5 Correct 360 ms 16232 KB Output is correct