1 条题解

  • 0
    @ 2025-4-13 11:33:01
    #include <iostream>
    #include <cmath>
    #include <iomanip>
    
    using namespace std;
    
    int main() {
        double L, n, C;
        cin >> L >> n >> C;
        
        // Calculate the new length after expansion
        double L_prime = (1 + n * C) * L;
        
        // Calculate the radius of the circle
        double R = (L_prime * L_prime) / (8 * (L_prime - L));
        
        // Calculate the height (offset) from the center of the chord to the arc
        double offset = R - sqrt(R * R - (L / 2) * (L / 2));
        
        // Output the result with precision up to 3 decimal places
        cout << fixed << setprecision(3) << offset << endl;
        
        return 0;
    }
    
    
    死
    
    • 1

    信息

    ID
    726
    时间
    1000ms
    内存
    128MiB
    难度
    10
    标签
    (无)
    递交数
    1
    已通过
    0
    上传者