답안 #672971

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
672971 2022-12-19T08:27:13 Z 1zaid1 Balloons (CEOI11_bal) C++17
0 / 100
140 ms 4792 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n';

const int M = 1e2+15, MOD = 1000000007;

signed main() {
    cin.tie(0)->sync_with_stdio(0);
    
    int n;
    cin >> n;
    double x0, r0;
    cin >> x0 >> r0;
    cout << r0 << endl;
    for (int i = 1; i < n; i++) {
        int x, mr;
        cin >> x >> mr;

        double r = (x0-x)*(x0-x)/4.0/r0;
        cout << fixed << setprecision(4) << min(r, double(mr)) << endl;
        if (x*x/r < x0*x0/r0) {
            x0 = x;
            r0 = min(r, double(mr));
        }
    }

    return 0;
}

/*
3 0 9 8 1 13 7
*/
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 4th numbers differ - expected: '1.8420000000', found: '87.0000000000', error = '85.1580000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st numbers differ - expected: '247294217.0000000000', found: '247294000.0000000000', error = '217.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 7th numbers differ - expected: '0.0010000000', found: '9.0000000000', error = '8.9990000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 332 KB 3rd numbers differ - expected: '121.0000000000', found: '123.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 15 ms 712 KB 3rd numbers differ - expected: '211.0000000000', found: '213.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 39 ms 1432 KB 5th numbers differ - expected: '15395.0000000000', found: '15396.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 72 ms 2744 KB 3rd numbers differ - expected: '7936.0000000000', found: '10352.0000000000', error = '2416.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 111 ms 3172 KB 5th numbers differ - expected: '5054.0000000000', found: '5055.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 137 ms 4112 KB 3rd numbers differ - expected: '1872.0000000000', found: '1874.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 140 ms 4792 KB 3rd numbers differ - expected: '2960.0000000000', found: '2962.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -