답안 #920755

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
920755 2024-02-03T02:33:50 Z ethanv13 Mobile (BOI12_mobile) C++17
70 / 100
1000 ms 28244 KB
#include <bits/stdc++.h>
using namespace std;
int main() {
    long long n,l;cin>>n>>l;
    vector<pair<long long,long long>>a(n);
    for(int i=0;i<n;++i){
        cin>>a[i].first>>a[i].second;
    }
    long double lo=0;
    long double hi=4e9;
    long double delta=1e-5;
    while(hi-lo>delta){
        long double mid=(lo+hi)/2;
        long double curr=0;
        for(int i=0;i<n;++i){
            long double dist=sqrt(mid*mid-a[i].second*a[i].second);
            if(a[i].first-dist<=curr){curr=max(a[i].first+dist,curr);}
        }
        if(curr>=l){hi=mid;}else{lo=mid;}
    }
    cout<<fixed<<setprecision(5);
    cout<<lo<<endl;
}
# 결과 실행 시간 메모리 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 344 KB Output is correct
2 Correct 1 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 4 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 348 KB Output is correct
2 Correct 3 ms 344 KB Output is correct
3 Correct 4 ms 348 KB Output is correct
4 Correct 7 ms 516 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 344 KB Output is correct
2 Correct 3 ms 348 KB Output is correct
3 Correct 3 ms 348 KB Output is correct
4 Correct 7 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 348 KB Output is correct
2 Correct 3 ms 348 KB Output is correct
3 Correct 3 ms 348 KB Output is correct
4 Correct 7 ms 348 KB Output is correct
5 Correct 5 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 78 ms 1372 KB Output is correct
2 Correct 49 ms 1624 KB Output is correct
3 Correct 44 ms 1112 KB Output is correct
4 Correct 102 ms 1368 KB Output is correct
5 Correct 47 ms 1116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 82 ms 1624 KB Output is correct
2 Correct 80 ms 1372 KB Output is correct
3 Correct 100 ms 1624 KB Output is correct
4 Correct 105 ms 1660 KB Output is correct
5 Correct 123 ms 1780 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 47 ms 1796 KB Output is correct
2 Correct 53 ms 1708 KB Output is correct
3 Correct 62 ms 1744 KB Output is correct
4 Correct 153 ms 1884 KB Output is correct
5 Correct 99 ms 1628 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 67 ms 1880 KB Output is correct
2 Correct 64 ms 1884 KB Output is correct
3 Correct 72 ms 1988 KB Output is correct
4 Correct 155 ms 1880 KB Output is correct
5 Correct 127 ms 2000 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 68 ms 1884 KB Output is correct
2 Correct 64 ms 1880 KB Output is correct
3 Correct 72 ms 1988 KB Output is correct
4 Correct 159 ms 1880 KB Output is correct
5 Correct 121 ms 1884 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 275 ms 8248 KB Output is correct
2 Correct 338 ms 8024 KB Output is correct
3 Correct 321 ms 8028 KB Output is correct
4 Correct 767 ms 8252 KB Output is correct
5 Correct 628 ms 8272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 336 ms 8252 KB Output is correct
2 Correct 572 ms 8264 KB Output is correct
3 Correct 378 ms 8248 KB Output is correct
4 Correct 754 ms 8272 KB Output is correct
5 Correct 650 ms 8252 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 329 ms 10068 KB Output is correct
2 Correct 399 ms 9816 KB Output is correct
3 Correct 391 ms 9816 KB Output is correct
4 Correct 934 ms 9820 KB Output is correct
5 Correct 755 ms 18004 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 402 ms 9816 KB Output is correct
2 Correct 678 ms 9816 KB Output is correct
3 Correct 451 ms 10068 KB Output is correct
4 Correct 931 ms 9820 KB Output is correct
5 Correct 789 ms 18512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 378 ms 11380 KB Output is correct
2 Correct 465 ms 11356 KB Output is correct
3 Correct 514 ms 11352 KB Output is correct
4 Execution timed out 1077 ms 11356 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 467 ms 11376 KB Output is correct
2 Correct 803 ms 11384 KB Output is correct
3 Correct 531 ms 11384 KB Output is correct
4 Execution timed out 1052 ms 11356 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 439 ms 12952 KB Output is correct
2 Correct 532 ms 12948 KB Output is correct
3 Correct 522 ms 12952 KB Output is correct
4 Execution timed out 1101 ms 12888 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 549 ms 13140 KB Output is correct
2 Correct 917 ms 12944 KB Output is correct
3 Correct 605 ms 22616 KB Output is correct
4 Execution timed out 1064 ms 28244 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 549 ms 16072 KB Output is correct
2 Correct 672 ms 15964 KB Output is correct
3 Correct 638 ms 16080 KB Output is correct
4 Execution timed out 1051 ms 15964 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 670 ms 16076 KB Output is correct
2 Execution timed out 1050 ms 15960 KB Time limit exceeded
3 Halted 0 ms 0 KB -