답안 #217137

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
217137 2020-03-29T06:06:37 Z dolphingarlic Mobile (BOI12_mobile) C++14
100 / 100
707 ms 16120 KB
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse4,avx2,fma,avx")
#define FOR(i, x, y) for (int i = x; i < y; i++)
#define x first
#define y second
using namespace std;

pair<long long, long long> p[1000000];

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n, len;
    cin >> n >> len;
    FOR(i, 0, n) cin >> p[i].x >> p[i].y;

    double l = 1, r = 5e8;
    while (r - l > 1e-3) {
        double mid = (l + r) / 2, curr = 0;
        FOR(i, 0, n) {
            double delta = sqrt(mid * mid - p[i].y * p[i].y);
            double a = p[i].x - delta, b = p[i].x + delta;
            if (a <= curr) curr = max(curr, b);
        }

        if (curr >= len) r = mid;
        else l = mid;
    }

    cout << fixed << setprecision(4) << l;
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 5 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 384 KB Output is correct
2 Correct 6 ms 384 KB Output is correct
3 Correct 9 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 512 KB Output is correct
2 Correct 8 ms 512 KB Output is correct
3 Correct 8 ms 512 KB Output is correct
4 Correct 9 ms 512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 512 KB Output is correct
2 Correct 8 ms 512 KB Output is correct
3 Correct 7 ms 512 KB Output is correct
4 Correct 7 ms 512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 512 KB Output is correct
2 Correct 7 ms 512 KB Output is correct
3 Correct 7 ms 512 KB Output is correct
4 Correct 8 ms 512 KB Output is correct
5 Correct 11 ms 512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 52 ms 1920 KB Output is correct
2 Correct 49 ms 2040 KB Output is correct
3 Correct 29 ms 1536 KB Output is correct
4 Correct 61 ms 2040 KB Output is correct
5 Correct 31 ms 1408 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 48 ms 1920 KB Output is correct
2 Correct 58 ms 1912 KB Output is correct
3 Correct 58 ms 2040 KB Output is correct
4 Correct 57 ms 2168 KB Output is correct
5 Correct 66 ms 2280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 48 ms 2048 KB Output is correct
2 Correct 48 ms 2160 KB Output is correct
3 Correct 43 ms 2048 KB Output is correct
4 Correct 76 ms 2432 KB Output is correct
5 Correct 55 ms 2048 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 61 ms 2452 KB Output is correct
2 Correct 59 ms 2432 KB Output is correct
3 Correct 47 ms 2304 KB Output is correct
4 Correct 86 ms 2536 KB Output is correct
5 Correct 65 ms 2424 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 63 ms 2424 KB Output is correct
2 Correct 66 ms 2424 KB Output is correct
3 Correct 49 ms 2296 KB Output is correct
4 Correct 79 ms 2552 KB Output is correct
5 Correct 71 ms 2552 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 250 ms 8824 KB Output is correct
2 Correct 276 ms 8824 KB Output is correct
3 Correct 278 ms 8824 KB Output is correct
4 Correct 354 ms 8824 KB Output is correct
5 Correct 320 ms 8952 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 279 ms 8828 KB Output is correct
2 Correct 353 ms 8912 KB Output is correct
3 Correct 228 ms 8824 KB Output is correct
4 Correct 374 ms 8800 KB Output is correct
5 Correct 322 ms 8824 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 325 ms 10488 KB Output is correct
2 Correct 348 ms 10088 KB Output is correct
3 Correct 327 ms 9788 KB Output is correct
4 Correct 433 ms 9848 KB Output is correct
5 Correct 363 ms 9720 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 343 ms 9736 KB Output is correct
2 Correct 404 ms 9720 KB Output is correct
3 Correct 275 ms 9788 KB Output is correct
4 Correct 412 ms 9720 KB Output is correct
5 Correct 402 ms 9824 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 355 ms 11256 KB Output is correct
2 Correct 395 ms 11352 KB Output is correct
3 Correct 377 ms 11360 KB Output is correct
4 Correct 508 ms 11256 KB Output is correct
5 Correct 442 ms 11232 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 397 ms 11384 KB Output is correct
2 Correct 456 ms 11256 KB Output is correct
3 Correct 331 ms 11360 KB Output is correct
4 Correct 500 ms 11348 KB Output is correct
5 Correct 447 ms 11336 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 397 ms 12920 KB Output is correct
2 Correct 449 ms 12896 KB Output is correct
3 Correct 436 ms 12912 KB Output is correct
4 Correct 556 ms 12792 KB Output is correct
5 Correct 506 ms 12992 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 444 ms 12916 KB Output is correct
2 Correct 522 ms 12796 KB Output is correct
3 Correct 377 ms 12920 KB Output is correct
4 Correct 543 ms 12792 KB Output is correct
5 Correct 514 ms 12792 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 494 ms 15992 KB Output is correct
2 Correct 550 ms 16052 KB Output is correct
3 Correct 394 ms 15996 KB Output is correct
4 Correct 675 ms 15992 KB Output is correct
5 Correct 610 ms 16120 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 550 ms 15992 KB Output is correct
2 Correct 650 ms 16120 KB Output is correct
3 Correct 452 ms 16016 KB Output is correct
4 Correct 707 ms 15992 KB Output is correct
5 Correct 645 ms 16120 KB Output is correct