답안 #1095196

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1095196 2024-10-01T14:21:01 Z Kodik Mobile (BOI12_mobile) C++17
70 / 100
1000 ms 31824 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-4){
        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 18 ms 31580 KB Output is correct
2 Correct 17 ms 31580 KB Output is correct
3 Correct 17 ms 31580 KB Output is correct
4 Correct 20 ms 31744 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 18 ms 31540 KB Output is correct
2 Correct 18 ms 31580 KB Output is correct
3 Correct 17 ms 31684 KB Output is correct
4 Correct 21 ms 31628 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 31576 KB Output is correct
4 Correct 17 ms 31580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 31576 KB Output is correct
2 Correct 20 ms 31580 KB Output is correct
3 Correct 25 ms 31580 KB Output is correct
4 Correct 29 ms 31568 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 31588 KB Output is correct
2 Correct 20 ms 31772 KB Output is correct
3 Correct 23 ms 31580 KB Output is correct
4 Correct 24 ms 31580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 31580 KB Output is correct
2 Correct 20 ms 31580 KB Output is correct
3 Correct 22 ms 31580 KB Output is correct
4 Correct 24 ms 31580 KB Output is correct
5 Correct 27 ms 31580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 97 ms 31576 KB Output is correct
2 Correct 56 ms 31580 KB Output is correct
3 Correct 55 ms 31580 KB Output is correct
4 Correct 120 ms 31748 KB Output is correct
5 Correct 68 ms 31760 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 99 ms 31580 KB Output is correct
2 Correct 100 ms 31748 KB Output is correct
3 Correct 122 ms 31576 KB Output is correct
4 Correct 152 ms 31576 KB Output is correct
5 Correct 145 ms 31576 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 58 ms 31576 KB Output is correct
2 Correct 58 ms 31576 KB Output is correct
3 Correct 86 ms 31576 KB Output is correct
4 Correct 168 ms 31752 KB Output is correct
5 Correct 126 ms 31580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 66 ms 31576 KB Output is correct
2 Correct 77 ms 31748 KB Output is correct
3 Correct 91 ms 31576 KB Output is correct
4 Correct 171 ms 31576 KB Output is correct
5 Correct 140 ms 31576 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 68 ms 31748 KB Output is correct
2 Correct 65 ms 31576 KB Output is correct
3 Correct 83 ms 31756 KB Output is correct
4 Correct 176 ms 31580 KB Output is correct
5 Correct 139 ms 31752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 284 ms 31580 KB Output is correct
2 Correct 276 ms 31748 KB Output is correct
3 Correct 299 ms 31756 KB Output is correct
4 Correct 820 ms 31748 KB Output is correct
5 Correct 681 ms 31752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 326 ms 31752 KB Output is correct
2 Correct 570 ms 31580 KB Output is correct
3 Correct 355 ms 31580 KB Output is correct
4 Correct 781 ms 31748 KB Output is correct
5 Correct 674 ms 31752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 346 ms 31580 KB Output is correct
2 Correct 319 ms 31576 KB Output is correct
3 Correct 328 ms 31576 KB Output is correct
4 Correct 948 ms 31580 KB Output is correct
5 Correct 774 ms 31752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 341 ms 31752 KB Output is correct
2 Correct 675 ms 31748 KB Output is correct
3 Correct 423 ms 31576 KB Output is correct
4 Correct 969 ms 31756 KB Output is correct
5 Correct 814 ms 31824 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 368 ms 31752 KB Output is correct
2 Correct 387 ms 31576 KB Output is correct
3 Correct 385 ms 31576 KB Output is correct
4 Execution timed out 1092 ms 31576 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 377 ms 31580 KB Output is correct
2 Correct 813 ms 31576 KB Output is correct
3 Correct 534 ms 31524 KB Output is correct
4 Execution timed out 1077 ms 31580 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 431 ms 31748 KB Output is correct
2 Correct 436 ms 31576 KB Output is correct
3 Correct 429 ms 31576 KB Output is correct
4 Execution timed out 1026 ms 31576 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 409 ms 31580 KB Output is correct
2 Correct 879 ms 31748 KB Output is correct
3 Correct 601 ms 31752 KB Output is correct
4 Execution timed out 1050 ms 31576 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 523 ms 31748 KB Output is correct
2 Correct 535 ms 31748 KB Output is correct
3 Correct 526 ms 31748 KB Output is correct
4 Execution timed out 1054 ms 31580 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 517 ms 31576 KB Output is correct
2 Execution timed out 1058 ms 31580 KB Time limit exceeded
3 Halted 0 ms 0 KB -