답안 #1095197

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1095197 2024-10-01T14:21:54 Z Kodik Mobile (BOI12_mobile) C++17
40 / 100
1000 ms 31856 KB
#include <bits/stdc++.h>
using namespace std;
#define ss second
#define ff first
typedef long long ll;
typedef long double ld;
#define int ll






signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ld n, l; 
    cin >> n >> l;
    pair<ld,ld> bases[1000000];
    for(int i = 0; i < n; ++i){
        cin >> bases[i].ff >> bases[i].ss;
    }
    ld left = 0, right = 2e9;
    while(right-left>1e-3){
        ld mid = left + (right-left)/2;
        ld curr = 0;
        for(int i = 0; i < n; ++i){
            ld x = bases[i].ff;
            ld y = bases[i].ss;
            ld hi_range = sqrt(mid*mid-y*y);
            ld start = x-hi_range, end = x+hi_range;
            if(start<=curr) curr = max(curr, end);
        }
        if(curr>=l){
            right = mid;
        }else{
            left = mid;
        }
    }
    cout << fixed << setprecision(3) << right;
    return 0;   
}
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 31576 KB Output is correct
2 Correct 16 ms 31552 KB Output is correct
3 Correct 17 ms 31580 KB Output is correct
4 Correct 17 ms 31576 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 18 ms 31580 KB Output is correct
2 Correct 18 ms 31576 KB Output is correct
3 Correct 17 ms 31580 KB Output is correct
4 Correct 17 ms 31576 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 31580 KB Output is correct
2 Correct 19 ms 31580 KB Output is correct
3 Correct 19 ms 31576 KB Output is correct
4 Correct 17 ms 31580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 31580 KB Output is correct
2 Correct 19 ms 31776 KB Output is correct
3 Correct 21 ms 31576 KB Output is correct
4 Correct 24 ms 31776 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 31576 KB Output is correct
2 Correct 19 ms 31576 KB Output is correct
3 Correct 20 ms 31560 KB Output is correct
4 Correct 25 ms 31580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 18 ms 31580 KB Output is correct
2 Correct 20 ms 31576 KB Output is correct
3 Correct 24 ms 31580 KB Output is correct
4 Correct 26 ms 31692 KB Output is correct
5 Correct 22 ms 31576 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 82 ms 31748 KB Output is correct
2 Correct 51 ms 31576 KB Output is correct
3 Incorrect 51 ms 31576 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 91 ms 31576 KB Output is correct
2 Correct 92 ms 31752 KB Output is correct
3 Correct 109 ms 31748 KB Output is correct
4 Incorrect 114 ms 31580 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 59 ms 31580 KB Output is correct
2 Correct 59 ms 31580 KB Output is correct
3 Incorrect 72 ms 31576 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 70 ms 31748 KB Output is correct
2 Correct 63 ms 31756 KB Output is correct
3 Incorrect 77 ms 31576 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 68 ms 31756 KB Output is correct
2 Correct 66 ms 31580 KB Output is correct
3 Correct 80 ms 31588 KB Output is correct
4 Correct 155 ms 31576 KB Output is correct
5 Correct 129 ms 31752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 257 ms 31752 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 252 ms 31752 KB Output is correct
2 Correct 514 ms 31580 KB Output is correct
3 Correct 348 ms 31856 KB Output is correct
4 Correct 757 ms 31580 KB Output is correct
5 Incorrect 641 ms 31580 KB Output isn't correct
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 301 ms 31616 KB Output is correct
2 Correct 317 ms 31576 KB Output is correct
3 Correct 309 ms 31752 KB Output is correct
4 Correct 888 ms 31756 KB Output is correct
5 Correct 728 ms 31748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 303 ms 31580 KB Output is correct
2 Correct 588 ms 31752 KB Output is correct
3 Correct 429 ms 31828 KB Output is correct
4 Correct 919 ms 31828 KB Output is correct
5 Correct 741 ms 31756 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 365 ms 31580 KB Output is correct
2 Correct 362 ms 31752 KB Output is correct
3 Correct 353 ms 31580 KB Output is correct
4 Execution timed out 1020 ms 31580 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 378 ms 31752 KB Output is correct
2 Correct 715 ms 31764 KB Output is correct
3 Correct 460 ms 31580 KB Output is correct
4 Execution timed out 1052 ms 31756 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 413 ms 31756 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 419 ms 31580 KB Output is correct
2 Correct 780 ms 31576 KB Output is correct
3 Correct 549 ms 31580 KB Output is correct
4 Execution timed out 1062 ms 31580 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 500 ms 31752 KB Output is correct
2 Correct 575 ms 31748 KB Output is correct
3 Correct 522 ms 31576 KB Output is correct
4 Execution timed out 1067 ms 31580 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 525 ms 31576 KB Output is correct
2 Execution timed out 1046 ms 31580 KB Time limit exceeded
3 Halted 0 ms 0 KB -