답안 #1024268

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1024268 2024-07-15T22:23:12 Z angels Mobile (BOI12_mobile) C++14
90 / 100
1000 ms 31580 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 double, long double>>v(n);
    for(int i=0; i<n; i++)
    {
        cin>>v[i].first>>v[i].second;
    }
    long double l=1, r=1.5e9;
    while(r-l>1e-3)
    {
        long double mid=(l+r)/2.0;
        long double granica=0;
        for(int i=0; i<n; i++)
        {
            long double opseg=sqrt(mid*mid-v[i].second*v[i].second);
            long double minn=v[i].first-opseg;
            long 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 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 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 3 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 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 604 KB Output is correct
2 Correct 3 ms 604 KB Output is correct
3 Correct 3 ms 604 KB Output is correct
4 Correct 5 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 604 KB Output is correct
2 Correct 3 ms 604 KB Output is correct
3 Correct 3 ms 600 KB Output is correct
4 Correct 6 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 604 KB Output is correct
2 Correct 3 ms 600 KB Output is correct
3 Correct 3 ms 604 KB Output is correct
4 Correct 6 ms 604 KB Output is correct
5 Correct 4 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 61 ms 2652 KB Output is correct
2 Correct 37 ms 2648 KB Output is correct
3 Correct 34 ms 2136 KB Output is correct
4 Correct 82 ms 2652 KB Output is correct
5 Correct 40 ms 1884 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 69 ms 2908 KB Output is correct
2 Correct 71 ms 2648 KB Output is correct
3 Correct 87 ms 2908 KB Output is correct
4 Correct 87 ms 2904 KB Output is correct
5 Correct 96 ms 3160 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 44 ms 3164 KB Output is correct
2 Correct 44 ms 2904 KB Output is correct
3 Correct 54 ms 2908 KB Output is correct
4 Correct 126 ms 3420 KB Output is correct
5 Correct 83 ms 3160 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 50 ms 3420 KB Output is correct
2 Correct 49 ms 3420 KB Output is correct
3 Correct 60 ms 3420 KB Output is correct
4 Correct 122 ms 3420 KB Output is correct
5 Correct 99 ms 3420 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 53 ms 3416 KB Output is correct
2 Correct 48 ms 3416 KB Output is correct
3 Correct 60 ms 3420 KB Output is correct
4 Correct 123 ms 3416 KB Output is correct
5 Correct 99 ms 3420 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 236 ms 16004 KB Output is correct
2 Correct 235 ms 15960 KB Output is correct
3 Correct 234 ms 15960 KB Output is correct
4 Correct 604 ms 15964 KB Output is correct
5 Correct 496 ms 15964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 245 ms 15960 KB Output is correct
2 Correct 432 ms 15960 KB Output is correct
3 Correct 298 ms 15960 KB Output is correct
4 Correct 598 ms 15964 KB Output is correct
5 Correct 486 ms 15960 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 302 ms 19036 KB Output is correct
2 Correct 286 ms 19036 KB Output is correct
3 Correct 296 ms 19036 KB Output is correct
4 Correct 778 ms 19032 KB Output is correct
5 Correct 594 ms 19036 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 337 ms 19036 KB Output is correct
2 Correct 521 ms 19032 KB Output is correct
3 Correct 333 ms 19032 KB Output is correct
4 Correct 701 ms 19036 KB Output is correct
5 Correct 605 ms 19032 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 343 ms 22364 KB Output is correct
2 Correct 357 ms 22360 KB Output is correct
3 Correct 314 ms 22360 KB Output is correct
4 Correct 817 ms 22364 KB Output is correct
5 Correct 734 ms 22364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 353 ms 22364 KB Output is correct
2 Correct 588 ms 22360 KB Output is correct
3 Correct 440 ms 22360 KB Output is correct
4 Correct 830 ms 22364 KB Output is correct
5 Correct 727 ms 22360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 389 ms 25436 KB Output is correct
2 Correct 393 ms 25436 KB Output is correct
3 Correct 369 ms 25436 KB Output is correct
4 Correct 942 ms 25432 KB Output is correct
5 Correct 756 ms 25436 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 397 ms 25432 KB Output is correct
2 Correct 644 ms 25432 KB Output is correct
3 Correct 484 ms 25432 KB Output is correct
4 Correct 938 ms 25432 KB Output is correct
5 Correct 806 ms 25432 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 492 ms 31580 KB Output is correct
2 Correct 456 ms 31580 KB Output is correct
3 Correct 481 ms 31580 KB Output is correct
4 Execution timed out 1044 ms 31576 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 495 ms 31576 KB Output is correct
2 Correct 875 ms 31536 KB Output is correct
3 Correct 606 ms 31580 KB Output is correct
4 Execution timed out 1065 ms 31580 KB Time limit exceeded
5 Halted 0 ms 0 KB -