結果
問題 |
No.3042 拡大コピー
|
ユーザー |
|
提出日時 | 2025-02-28 22:42:01 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 689 bytes |
コンパイル時間 | 2,019 ms |
コンパイル使用メモリ | 198,248 KB |
実行使用メモリ | 10,696 KB |
最終ジャッジ日時 | 2025-03-01 07:39:44 |
合計ジャッジ時間 | 3,981 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector<pair<long double,long double>> XY(N); long double dist1 = -1,sx = 0,sy = 0,dist2 = 0; for(auto [x,y] : XY){ cin >> x >> y; sx += x; sy += y; } sx /= N; sy /= N; for(auto [x,y] : XY) dist1 = max(dist1,(x-sx)*(x-sx)+(y-sy)*(y-sy)); sx = 0,sy = 0; for(auto [x,y] : XY){ cin >> x >> y; sx += x; sy += y; } sx /= N; sy /= N; for(auto [x,y] : XY) dist2 = max(dist2,(x-sx)*(x-sx)+(y-sy)*(y-sy)); cout << fixed << setprecision(20) << sqrt(dist2/dist1) << endl; }