답안 #1024279

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1024279 2024-07-15T22:32:40 Z angels Mobile (BOI12_mobile) C++14
100 / 100
339 ms 15964 KB
#include <bits/stdc++.h>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    long long int n, L;
    cin>>n>>L;
    vector<pair<long long, long long>>v(n);
    for(int i=0; i<n; i++)
    {
        cin>>v[i].first>>v[i].second;
    }
    double l=1, r=1.0e9;
    while(r-l>1e-3)
    {
        double mid=(l+r)/2;
        double granica=0;
        for(int i=0; i<n; i++)
        {
            double opseg=sqrt(mid*mid-v[i].second*v[i].second);
            double minn=v[i].first-opseg;
            double maxx=v[i].first+opseg;
            if(minn<=granica)
            {
                granica=max(granica, maxx);
            }
        }
        if(granica<L)
        {
            l=mid;
        }
        else
            r=mid;
    }
    cout<<fixed<<setprecision(4)<<l;

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 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 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 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 2 ms 540 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 2 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 1624 KB Output is correct
2 Correct 17 ms 1628 KB Output is correct
3 Correct 12 ms 1116 KB Output is correct
4 Correct 26 ms 1628 KB Output is correct
5 Correct 11 ms 1116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 1628 KB Output is correct
2 Correct 25 ms 1372 KB Output is correct
3 Correct 22 ms 1628 KB Output is correct
4 Correct 23 ms 1628 KB Output is correct
5 Correct 26 ms 1628 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 18 ms 1628 KB Output is correct
2 Correct 19 ms 1628 KB Output is correct
3 Correct 19 ms 1628 KB Output is correct
4 Correct 38 ms 1884 KB Output is correct
5 Correct 23 ms 1624 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 1880 KB Output is correct
2 Correct 24 ms 1884 KB Output is correct
3 Correct 21 ms 1880 KB Output is correct
4 Correct 33 ms 1884 KB Output is correct
5 Correct 34 ms 1884 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 1884 KB Output is correct
2 Correct 24 ms 1884 KB Output is correct
3 Correct 22 ms 1880 KB Output is correct
4 Correct 35 ms 1880 KB Output is correct
5 Correct 27 ms 1880 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 103 ms 8284 KB Output is correct
2 Correct 114 ms 8280 KB Output is correct
3 Correct 113 ms 8284 KB Output is correct
4 Correct 151 ms 8280 KB Output is correct
5 Correct 244 ms 8280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 125 ms 8284 KB Output is correct
2 Correct 194 ms 8284 KB Output is correct
3 Correct 107 ms 8280 KB Output is correct
4 Correct 163 ms 8280 KB Output is correct
5 Correct 139 ms 8280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 122 ms 9820 KB Output is correct
2 Correct 131 ms 9820 KB Output is correct
3 Correct 135 ms 9820 KB Output is correct
4 Correct 185 ms 9820 KB Output is correct
5 Correct 158 ms 9816 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 151 ms 9816 KB Output is correct
2 Correct 213 ms 9816 KB Output is correct
3 Correct 134 ms 9816 KB Output is correct
4 Correct 193 ms 9816 KB Output is correct
5 Correct 159 ms 9820 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 139 ms 11356 KB Output is correct
2 Correct 151 ms 11356 KB Output is correct
3 Correct 157 ms 11356 KB Output is correct
4 Correct 204 ms 11356 KB Output is correct
5 Correct 177 ms 11352 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 146 ms 11356 KB Output is correct
2 Correct 244 ms 11352 KB Output is correct
3 Correct 153 ms 11356 KB Output is correct
4 Correct 213 ms 11356 KB Output is correct
5 Correct 190 ms 11352 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 159 ms 12892 KB Output is correct
2 Correct 190 ms 12892 KB Output is correct
3 Correct 181 ms 12888 KB Output is correct
4 Correct 242 ms 12892 KB Output is correct
5 Correct 231 ms 12892 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 185 ms 12892 KB Output is correct
2 Correct 268 ms 12892 KB Output is correct
3 Correct 185 ms 12888 KB Output is correct
4 Correct 248 ms 12888 KB Output is correct
5 Correct 219 ms 12888 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 198 ms 15964 KB Output is correct
2 Correct 229 ms 15960 KB Output is correct
3 Correct 228 ms 15960 KB Output is correct
4 Correct 294 ms 15960 KB Output is correct
5 Correct 274 ms 15964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 220 ms 15964 KB Output is correct
2 Correct 339 ms 15960 KB Output is correct
3 Correct 221 ms 15960 KB Output is correct
4 Correct 330 ms 15960 KB Output is correct
5 Correct 316 ms 15964 KB Output is correct