답안 #834294

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
834294 2023-08-22T12:41:45 Z Darren0724 Mobile (BOI12_mobile) C++17
100 / 100
789 ms 35264 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long

int32_t main(){
    int n,len;cin>>n>>len;
    vector<int> x(n),y(n);
    for(int i=0;i<n;i++){
        cin>>x[i]>>y[i];
    }
    double l=0,r=2e9,m;
    int t=60;
    while(t--){
        m=(l+r)/2;
        double now=0;
        for(int i=0;i<n;i++){
            double d=m*m-y[i]*y[i];
            if(d<0){
                continue;
            }
            d=sqrtl(d);
            if(x[i]-d<=now&&x[i]+d>=now){
                now=x[i]+d;
            }
        }
        if(now>=len){
            r=m;
        }
        else{
            l=m;
        }
    }
    cout<<fixed<<setprecision(9)<<r<<endl;
    
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 340 KB Output is correct
2 Correct 3 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 2 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 316 KB Output is correct
2 Correct 4 ms 340 KB Output is correct
3 Correct 3 ms 340 KB Output is correct
4 Correct 4 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 340 KB Output is correct
2 Correct 4 ms 440 KB Output is correct
3 Correct 3 ms 416 KB Output is correct
4 Correct 4 ms 440 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 340 KB Output is correct
2 Correct 5 ms 340 KB Output is correct
3 Correct 4 ms 312 KB Output is correct
4 Correct 4 ms 340 KB Output is correct
5 Correct 3 ms 412 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 62 ms 1852 KB Output is correct
2 Correct 63 ms 2568 KB Output is correct
3 Correct 34 ms 1648 KB Output is correct
4 Correct 53 ms 2608 KB Output is correct
5 Correct 28 ms 1464 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 44 ms 1820 KB Output is correct
2 Correct 42 ms 2096 KB Output is correct
3 Correct 50 ms 2592 KB Output is correct
4 Correct 53 ms 2728 KB Output is correct
5 Correct 60 ms 3048 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 59 ms 2156 KB Output is correct
2 Correct 64 ms 1968 KB Output is correct
3 Correct 55 ms 1996 KB Output is correct
4 Correct 74 ms 2160 KB Output is correct
5 Correct 49 ms 2572 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 75 ms 2240 KB Output is correct
2 Correct 81 ms 2208 KB Output is correct
3 Correct 67 ms 2160 KB Output is correct
4 Correct 71 ms 2172 KB Output is correct
5 Correct 61 ms 3008 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 80 ms 2180 KB Output is correct
2 Correct 78 ms 2236 KB Output is correct
3 Correct 63 ms 2244 KB Output is correct
4 Correct 75 ms 2240 KB Output is correct
5 Correct 61 ms 3128 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 327 ms 8504 KB Output is correct
2 Correct 388 ms 8508 KB Output is correct
3 Correct 437 ms 8492 KB Output is correct
4 Correct 340 ms 8504 KB Output is correct
5 Correct 316 ms 14932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 373 ms 8992 KB Output is correct
2 Correct 472 ms 9384 KB Output is correct
3 Correct 328 ms 13864 KB Output is correct
4 Correct 449 ms 17452 KB Output is correct
5 Correct 309 ms 15420 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 403 ms 11212 KB Output is correct
2 Correct 436 ms 11228 KB Output is correct
3 Correct 432 ms 11220 KB Output is correct
4 Correct 409 ms 11212 KB Output is correct
5 Correct 357 ms 17604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 449 ms 11284 KB Output is correct
2 Correct 514 ms 11220 KB Output is correct
3 Correct 369 ms 16456 KB Output is correct
4 Correct 432 ms 21328 KB Output is correct
5 Correct 365 ms 18380 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 447 ms 13036 KB Output is correct
2 Correct 536 ms 12916 KB Output is correct
3 Correct 504 ms 12916 KB Output is correct
4 Correct 465 ms 12920 KB Output is correct
5 Correct 410 ms 20304 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 517 ms 12916 KB Output is correct
2 Correct 590 ms 12924 KB Output is correct
3 Correct 456 ms 19560 KB Output is correct
4 Correct 481 ms 24548 KB Output is correct
5 Correct 431 ms 21360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 513 ms 14480 KB Output is correct
2 Correct 603 ms 14608 KB Output is correct
3 Correct 581 ms 14608 KB Output is correct
4 Correct 533 ms 14604 KB Output is correct
5 Correct 489 ms 23960 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 610 ms 14604 KB Output is correct
2 Correct 651 ms 14604 KB Output is correct
3 Correct 507 ms 22332 KB Output is correct
4 Correct 566 ms 28164 KB Output is correct
5 Correct 494 ms 24456 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 635 ms 17696 KB Output is correct
2 Correct 753 ms 17760 KB Output is correct
3 Correct 733 ms 17792 KB Output is correct
4 Correct 687 ms 16008 KB Output is correct
5 Correct 631 ms 29500 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 761 ms 16000 KB Output is correct
2 Correct 789 ms 17740 KB Output is correct
3 Correct 656 ms 28224 KB Output is correct
4 Correct 710 ms 35264 KB Output is correct
5 Correct 649 ms 30652 KB Output is correct