結果
| 問題 |
No.3042 拡大コピー
|
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2025-03-04 11:06:50 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 909 bytes |
| コンパイル時間 | 2,441 ms |
| コンパイル使用メモリ | 196,392 KB |
| 実行使用メモリ | 10,784 KB |
| 最終ジャッジ日時 | 2025-03-04 11:06:55 |
| 合計ジャッジ時間 | 5,033 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 24 |
ソースコード
#include <bits/stdc++.h>
//#include <atcoder/modint>
using namespace std;
//using namespace atcoder;
using ll = long long;
using ld = long double;
//using mint = modint998244353;
int main(){
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int N;
cin >> N;
ld gx, gy, mx1=0, mx2=0;
vector<ld> x(N), y(N);
gx = 0; gy = 0;
for (int i=0; i<N; i++){
cin >> x[i] >> y[i];
gx += x[i];
gy += y[i];
}
gx /= N;
gy /= N;
for (int i=0; i<N; i++){
mx1 = max(mx1, (x[i]-gx)*(x[i]-gx)+(y[i]-gy)*(x[i]-gx));
}
gx = 0; gy = 0;
for (int i=0; i<N; i++){
cin >> x[i] >> y[i];
gx += x[i];
gy += y[i];
}
gx /= N;
gy /= N;
for (int i=0; i<N; i++){
mx2 = max(mx2, (x[i]-gx)*(x[i]-gx)+(y[i]-gy)*(x[i]-gx));
}
cout << setprecision(18) << sqrt(mx2/mx1) << endl;
return 0;
}
srjywrdnprkt