답안 #1024281

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1024281 2024-07-15T22:36:31 Z angels Mobile (BOI12_mobile) C++14
100 / 100
336 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=0, 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 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 0 ms 348 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 2 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 1 ms 348 KB Output is correct
2 Correct 2 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 26 ms 1628 KB Output is correct
2 Correct 18 ms 1628 KB Output is correct
3 Correct 12 ms 1116 KB Output is correct
4 Correct 22 ms 1404 KB Output is correct
5 Correct 11 ms 1116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 1624 KB Output is correct
2 Correct 19 ms 1368 KB Output is correct
3 Correct 22 ms 1628 KB Output is correct
4 Correct 24 ms 1628 KB Output is correct
5 Correct 25 ms 1624 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 18 ms 1624 KB Output is correct
2 Correct 19 ms 1632 KB Output is correct
3 Correct 19 ms 1632 KB Output is correct
4 Correct 30 ms 2136 KB Output is correct
5 Correct 23 ms 1628 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 1884 KB Output is correct
2 Correct 24 ms 1884 KB Output is correct
3 Correct 23 ms 1884 KB Output is correct
4 Correct 32 ms 1884 KB Output is correct
5 Correct 33 ms 1884 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 22 ms 1884 KB Output is correct
4 Correct 31 ms 1884 KB Output is correct
5 Correct 28 ms 1884 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 99 ms 8284 KB Output is correct
2 Correct 114 ms 8284 KB Output is correct
3 Correct 127 ms 8284 KB Output is correct
4 Correct 154 ms 8284 KB Output is correct
5 Correct 137 ms 8280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 119 ms 8284 KB Output is correct
2 Correct 196 ms 8280 KB Output is correct
3 Correct 122 ms 8280 KB Output is correct
4 Correct 149 ms 8284 KB Output is correct
5 Correct 137 ms 8280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 119 ms 9820 KB Output is correct
2 Correct 139 ms 9816 KB Output is correct
3 Correct 133 ms 9816 KB Output is correct
4 Correct 182 ms 9816 KB Output is correct
5 Correct 183 ms 9820 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 150 ms 9820 KB Output is correct
2 Correct 208 ms 9820 KB Output is correct
3 Correct 129 ms 9820 KB Output is correct
4 Correct 180 ms 9820 KB Output is correct
5 Correct 153 ms 9820 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 141 ms 11352 KB Output is correct
2 Correct 171 ms 11356 KB Output is correct
3 Correct 155 ms 11352 KB Output is correct
4 Correct 208 ms 11356 KB Output is correct
5 Correct 185 ms 11356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 160 ms 11352 KB Output is correct
2 Correct 242 ms 11352 KB Output is correct
3 Correct 160 ms 11356 KB Output is correct
4 Correct 206 ms 11352 KB Output is correct
5 Correct 185 ms 11356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 164 ms 12892 KB Output is correct
2 Correct 186 ms 12892 KB Output is correct
3 Correct 178 ms 12888 KB Output is correct
4 Correct 240 ms 12892 KB Output is correct
5 Correct 215 ms 12892 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 188 ms 12888 KB Output is correct
2 Correct 291 ms 12888 KB Output is correct
3 Correct 175 ms 12892 KB Output is correct
4 Correct 240 ms 12892 KB Output is correct
5 Correct 222 ms 12892 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 202 ms 15964 KB Output is correct
2 Correct 225 ms 15960 KB Output is correct
3 Correct 228 ms 15964 KB Output is correct
4 Correct 296 ms 15960 KB Output is correct
5 Correct 273 ms 15964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 224 ms 15960 KB Output is correct
2 Correct 336 ms 15964 KB Output is correct
3 Correct 212 ms 15960 KB Output is correct
4 Correct 300 ms 15964 KB Output is correct
5 Correct 274 ms 15964 KB Output is correct