Submission #920752

# Submission time Handle Problem Language Result Execution time Memory
920752 2024-02-03T02:26:50 Z ethanv13 Mobile (BOI12_mobile) C++17
0 / 100
727 ms 24744 KB
#include <bits/stdc++.h>
using namespace std;
int main() {
    int n,l;cin>>n>>l;
    vector<pair<int,int>>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 minimum=4e9;
        long double currub=4e9;
        for(int i=0;i<n;++i){
            long double dist=sqrt(mid*mid-a[i].second*a[i].second);
            minimum=min(minimum,a[i].first-dist);
            if(a[i].first-dist<=currub){
                currub=a[i].first+dist;
            }
        }
        if(currub>=l&&minimum<=0){hi=mid;}else{lo=mid;}
    }
    cout<<fixed<<setprecision(5);
    cout<<lo<<endl;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 472 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Incorrect 2 ms 444 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 344 KB Output is correct
2 Correct 4 ms 348 KB Output is correct
3 Correct 5 ms 488 KB Output is correct
4 Incorrect 8 ms 712 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 86 ms 1628 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 77 ms 1628 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 47 ms 1780 KB Output is correct
2 Incorrect 56 ms 2120 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 79 ms 2612 KB Output is correct
2 Incorrect 67 ms 2384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 72 ms 2596 KB Output is correct
2 Incorrect 67 ms 2396 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 276 ms 8416 KB Output is correct
2 Incorrect 346 ms 11860 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 364 ms 12896 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 331 ms 10280 KB Output is correct
2 Incorrect 430 ms 14192 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 428 ms 15208 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 384 ms 11860 KB Output is correct
2 Incorrect 496 ms 16636 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 501 ms 17232 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 428 ms 13604 KB Output is correct
2 Incorrect 562 ms 19024 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 584 ms 19796 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 542 ms 16812 KB Output is correct
2 Incorrect 703 ms 23728 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 727 ms 24744 KB Output isn't correct
2 Halted 0 ms 0 KB -