結果
| 問題 | No.3042 拡大コピー |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-01 02:41:14 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 206 ms / 2,000 ms |
| コード長 | 698 bytes |
| 記録 | |
| コンパイル時間 | 1,053 ms |
| コンパイル使用メモリ | 217,516 KB |
| 実行使用メモリ | 10,932 KB |
| 最終ジャッジ日時 | 2026-07-06 14:02:14 |
| 合計ジャッジ時間 | 3,203 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 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,sqrtl((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,sqrtl((x-sx)*(x-sx)+(y-sy)*(y-sy)));
cout << fixed << setprecision(20) << dist2/dist1 << endl;
}