1 条题解

  • 0
    @ 2024-10-2 22:22:09
    #include <bits/stdc++.h>
    double A, B, C, x_1, y_1, x_2, y_2;
    double A2mB2, A2pB2, B2mA2, AB, AC, BC; 
    int main(){
    	
    	std::cin >> x_1 >> y_1;
    	std::cin >> A >> B >> C;
    	
    	AB = A * B;
    	AC = A * C;
    	BC = B * C;
    	A2pB2 = A * A + B * B;
    	A2mB2 = A * A - B * B;
    	B2mA2 = B * B - A * A;
    	
    	x_2 = - (2 * AB * y_1 + A2mB2 * x_1 + 2 * AC) / A2pB2;
    	y_2 = - (B2mA2 * y_1 + 2 * AB * x_1 + 2 * BC) / A2pB2;
    	
    	printf("%.3f %.3f", x_2, y_2);
    	
    	return 0;
    }
    
    • 1

    信息

    ID
    3211
    时间
    1000ms
    内存
    256MiB
    难度
    8
    标签
    递交数
    16
    已通过
    6
    上传者