답안 #1095199

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1095199 2024-10-01T14:25:21 Z Kodik Mobile (BOI12_mobile) C++17
100 / 100
391 ms 35408 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



pair<ll,ll> bases[1000000];


signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, l; 
    cin >> n >> l;
    for(int i = 0; i < n; ++i){
        cin >> bases[i].ff >> bases[i].ss;
    }
    double left = 1, right = 2e9;
    while(right-left>1e-4){
        double mid = left + (right-left)/2;
        double curr = 0;
        for(int i = 0; i < n; ++i){
            double hi_range = sqrt(mid*mid-bases[i].ss*bases[i].ss);
            double start = bases[i].ff-hi_range, end = bases[i].ff+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 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 2 ms 348 KB Output is correct
4 Correct 4 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 2 ms 348 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 1628 KB Output is correct
2 Correct 20 ms 1628 KB Output is correct
3 Correct 14 ms 1304 KB Output is correct
4 Correct 24 ms 1628 KB Output is correct
5 Correct 13 ms 1116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 1624 KB Output is correct
2 Correct 21 ms 1368 KB Output is correct
3 Correct 24 ms 1628 KB Output is correct
4 Correct 25 ms 1628 KB Output is correct
5 Correct 27 ms 1624 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 1836 KB Output is correct
2 Correct 20 ms 1752 KB Output is correct
3 Correct 21 ms 1628 KB Output is correct
4 Correct 34 ms 1884 KB Output is correct
5 Correct 26 ms 1628 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 2032 KB Output is correct
2 Correct 32 ms 1880 KB Output is correct
3 Correct 23 ms 1884 KB Output is correct
4 Correct 34 ms 2000 KB Output is correct
5 Correct 29 ms 1880 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 27 ms 1884 KB Output is correct
2 Correct 26 ms 2028 KB Output is correct
3 Correct 24 ms 1880 KB Output is correct
4 Correct 35 ms 1884 KB Output is correct
5 Correct 29 ms 1884 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 107 ms 8052 KB Output is correct
2 Correct 123 ms 8020 KB Output is correct
3 Correct 121 ms 8016 KB Output is correct
4 Correct 163 ms 8020 KB Output is correct
5 Correct 148 ms 8268 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 133 ms 8024 KB Output is correct
2 Correct 207 ms 8016 KB Output is correct
3 Correct 133 ms 8216 KB Output is correct
4 Correct 177 ms 8024 KB Output is correct
5 Correct 152 ms 8020 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 136 ms 9808 KB Output is correct
2 Correct 158 ms 9724 KB Output is correct
3 Correct 150 ms 9728 KB Output is correct
4 Correct 203 ms 9812 KB Output is correct
5 Correct 177 ms 9796 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 156 ms 9616 KB Output is correct
2 Correct 247 ms 9808 KB Output is correct
3 Correct 142 ms 9812 KB Output is correct
4 Correct 215 ms 9808 KB Output is correct
5 Correct 177 ms 9796 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 153 ms 11348 KB Output is correct
2 Correct 172 ms 11348 KB Output is correct
3 Correct 172 ms 11392 KB Output is correct
4 Correct 265 ms 11348 KB Output is correct
5 Correct 208 ms 11344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 180 ms 11292 KB Output is correct
2 Correct 272 ms 11248 KB Output is correct
3 Correct 167 ms 11400 KB Output is correct
4 Correct 232 ms 11352 KB Output is correct
5 Correct 210 ms 11348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 181 ms 12928 KB Output is correct
2 Correct 198 ms 12884 KB Output is correct
3 Correct 193 ms 12880 KB Output is correct
4 Correct 277 ms 12880 KB Output is correct
5 Correct 243 ms 24108 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 208 ms 12884 KB Output is correct
2 Correct 303 ms 12880 KB Output is correct
3 Correct 194 ms 12880 KB Output is correct
4 Correct 291 ms 12784 KB Output is correct
5 Correct 238 ms 24360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 215 ms 15888 KB Output is correct
2 Correct 275 ms 16080 KB Output is correct
3 Correct 245 ms 15908 KB Output is correct
4 Correct 345 ms 15952 KB Output is correct
5 Correct 307 ms 29524 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 257 ms 16088 KB Output is correct
2 Correct 391 ms 15848 KB Output is correct
3 Correct 254 ms 28396 KB Output is correct
4 Correct 339 ms 35408 KB Output is correct
5 Correct 328 ms 30804 KB Output is correct