답안 #914980

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
914980 2024-01-23T05:09:38 Z Em1L Mobile (BOI12_mobile) C++14
0 / 100
812 ms 24656 KB
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using pii = pair<int, int>;
using tiiii = tuple<int, int, ll, ll>;

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);

    int n, L; cin >> n >> L;

    vector < int > x(n), y(n);

    for (int i = 0; i < n; i++)
        cin >> x[i] >> y[i];

    auto Good = [&](double dist) {
        double r = 0;

        for (int i = 0; i < n; i++) {
            if (y[i] > dist)
                continue;

            double left = x[i] - sqrtl(dist * dist - y[i] * y[i]);
            double right = x[i] + sqrtl(dist * dist - y[i] * y[i]);

            if (r < left)
                return false;

            r = max(r, right);
        }

        return r > L;
    };

    double l = 0, m, r = 1e+16;

    for (int i = 0; i < 100; i++) {
        m = (l + r) / 2;

        if (Good(m))
            r = m;
        else
            l = m;
    }

    cout << setprecision(16) << fixed << r << "\n";
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 1 ms 348 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 456 KB Output is correct
4 Incorrect 1 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 7 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 348 KB Output is correct
2 Correct 3 ms 344 KB Output is correct
3 Incorrect 3 ms 600 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 57 ms 1624 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 91 ms 1628 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 57 ms 1776 KB Output is correct
2 Incorrect 41 ms 2388 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 40 ms 2648 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 59 ms 2652 KB Output is correct
2 Incorrect 58 ms 2644 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 336 ms 8828 KB Output is correct
2 Correct 239 ms 11856 KB Output is correct
3 Correct 260 ms 11344 KB Output is correct
4 Incorrect 812 ms 14164 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 236 ms 12424 KB Output is correct
2 Incorrect 395 ms 10984 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 366 ms 10316 KB Output is correct
2 Incorrect 235 ms 14436 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 225 ms 15024 KB Output is correct
2 Incorrect 489 ms 13336 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 432 ms 12120 KB Output is correct
2 Incorrect 362 ms 16720 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 335 ms 17476 KB Output is correct
2 Incorrect 525 ms 15024 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 503 ms 13660 KB Output is correct
2 Incorrect 403 ms 19028 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 413 ms 19768 KB Output is correct
2 Incorrect 617 ms 17488 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 617 ms 16980 KB Output is correct
2 Incorrect 517 ms 23632 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 493 ms 24656 KB Output is correct
2 Incorrect 636 ms 21720 KB Output isn't correct
3 Halted 0 ms 0 KB -