結果
| 問題 |
No.3042 拡大コピー
|
| コンテスト | |
| ユーザー |
Today03
|
| 提出日時 | 2025-03-01 19:51:08 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 740 bytes |
| コンパイル時間 | 3,521 ms |
| コンパイル使用メモリ | 277,984 KB |
| 実行使用メモリ | 18,072 KB |
| 最終ジャッジ日時 | 2025-03-01 19:51:14 |
| 合計ジャッジ時間 | 4,757 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9 + 10;
const ll INFL = 4e18;
long double solve(vector<pair<ll, ll>> A) {
int N = A.size();
long double gx = 0, gy = 0;
for (int i = 0; i < N; i++) gx += A[i].first, gy += A[i].second;
gx /= N, gy /= N;
long double res = 0;
for (int i = 0; i < N; i++) {
long double val = hypot(A[i].first - gx, A[i].second - gy);
res = max(res, val);
}
return res;
}
int main() {
int N;
cin >> N;
vector<pair<ll, ll>> A(N), B(N);
for (int i = 0; i < N; i++) cin >> A[i].first >> A[i].second;
for (int i = 0; i < N; i++) cin >> B[i].first >> B[i].second;
printf("%.10Lf\n", solve(B) / solve(A));
}
Today03