样例过了,一片WA声,有么有大神帮帮忙

P1927 防护伞

您告诉我,题里说 圆周率 取多少
by mmr123 @ 2022-04-14 19:05:48


```cpp #include <iostream> #include <cmath> #include <algorithm> using namespace std; const int MAX = 1005; int n, x[MAX], y[MAX], sum, t; int ans = 1e9; double pi = 3.1415926535; int wh(int a, int b, int c, int d) { return pow(a-c,2)+pow(b-d,2); } int main() { cin >> n; for (int i = 1; i <= n; ++i) { cin >> x[i]; cin >> y[i]; } for (int i = 1; i <= n; ++i) { sum = 0; for (int j = 1; j <= n; ++j) { if (j != i) { t = wh(x[i], y[i], x[j], y[j]); sum = max(sum, t); } } ans = min(sum, ans); } printf("%.4lf", (double)ans * pi); } ```
by mmr123 @ 2022-04-14 19:14:41


@[永遠地神](/user/511105) [https://www.luogu.com.cn/record/73903741](https://www.luogu.com.cn/record/73903741)
by mmr123 @ 2022-04-14 19:15:10


哈哈哈
by 亚非胡氏男子 @ 2022-04-15 16:08:27


|