답안 #464197

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
464197 2021-08-12T13:39:52 Z dqk Mobile (BOI12_mobile) C++17
65 / 100
835 ms 55124 KB
#include <bits/stdc++.h>

int main() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int n;
    double L;
    std::cin >> n >> L;
    std::vector<std::vector<int>> p(n, std::vector<int>(2, 0));
    for (int i = 0; i < n; ++i) {
        std::cin >> p[i][0] >> p[i][1];
    }
    sort(p.begin(), p.end());
    double lo = 0.0, hi = 3e9;
    while(hi - lo > 1e-6) {
        double mi = lo + (hi - lo) / 2;
        double cur = 0.0;
        for (int i = 0; i < n; ++i) {
            double d = sqrt(mi * mi - (1.0 * 1ll * p[i][1]) * (1.0 * 1ll * p[i][1]));
            if (cur >= p[i][0] - d)
                cur = std::max(cur, p[i][0] + d);
        }
        if (cur >= L) {
            hi = mi;
        }
        else {
            lo = mi;
        }
    }
    std::cout << std::setprecision(10) << lo << "\n";
    return 0;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 460 KB Output is correct
2 Correct 2 ms 332 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 2 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 460 KB Output is correct
2 Correct 3 ms 460 KB Output is correct
3 Correct 3 ms 460 KB Output is correct
4 Correct 4 ms 580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 560 KB Output is correct
2 Correct 3 ms 460 KB Output is correct
3 Correct 3 ms 460 KB Output is correct
4 Correct 4 ms 560 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 588 KB Output is correct
2 Correct 3 ms 560 KB Output is correct
3 Correct 4 ms 460 KB Output is correct
4 Correct 4 ms 460 KB Output is correct
5 Correct 4 ms 584 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 58 ms 4300 KB Output is correct
2 Correct 44 ms 4428 KB Output is correct
3 Correct 31 ms 3148 KB Output is correct
4 Correct 53 ms 4428 KB Output is correct
5 Correct 31 ms 3020 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 52 ms 4556 KB Output is correct
2 Correct 52 ms 4172 KB Output is correct
3 Correct 57 ms 4684 KB Output is correct
4 Correct 56 ms 4556 KB Output is correct
5 Correct 63 ms 4940 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 49 ms 5068 KB Output is correct
2 Correct 51 ms 4812 KB Output is correct
3 Correct 49 ms 4876 KB Output is correct
4 Correct 74 ms 5708 KB Output is correct
5 Correct 61 ms 5196 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 59 ms 5708 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 58 ms 5708 KB Output is correct
2 Correct 60 ms 5740 KB Output is correct
3 Correct 58 ms 5708 KB Output is correct
4 Correct 75 ms 5708 KB Output is correct
5 Correct 70 ms 5708 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 288 ms 27672 KB Output is correct
2 Incorrect 310 ms 27588 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 320 ms 27604 KB Output is correct
2 Correct 435 ms 27596 KB Output is correct
3 Correct 301 ms 27596 KB Output is correct
4 Correct 421 ms 27648 KB Output is correct
5 Correct 365 ms 27596 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 338 ms 33100 KB Output is correct
2 Incorrect 365 ms 33144 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 378 ms 33124 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 403 ms 38612 KB Output is correct
2 Incorrect 436 ms 38604 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 460 ms 38596 KB Output is correct
2 Correct 580 ms 38592 KB Output is correct
3 Correct 423 ms 38644 KB Output is correct
4 Correct 549 ms 38612 KB Output is correct
5 Correct 504 ms 38680 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 474 ms 44132 KB Output is correct
2 Incorrect 483 ms 44100 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 506 ms 44056 KB Output is correct
2 Correct 674 ms 44072 KB Output is correct
3 Correct 506 ms 44056 KB Output is correct
4 Correct 641 ms 44100 KB Output is correct
5 Correct 591 ms 44100 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 599 ms 55076 KB Output is correct
2 Incorrect 640 ms 55100 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 622 ms 55124 KB Output is correct
2 Correct 835 ms 55020 KB Output is correct
3 Correct 647 ms 55020 KB Output is correct
4 Correct 804 ms 55096 KB Output is correct
5 Correct 761 ms 54980 KB Output is correct