結果
| 問題 |
No.3042 拡大コピー
|
| コンテスト | |
| ユーザー |
Today03
|
| 提出日時 | 2025-03-01 19:47:16 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 780 bytes |
| コンパイル時間 | 3,526 ms |
| コンパイル使用メモリ | 277,672 KB |
| 実行使用メモリ | 18,092 KB |
| 最終ジャッジ日時 | 2025-03-01 19:47:21 |
| 合計ジャッジ時間 | 5,100 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / 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;
double solve(vector<pair<ll, ll>> A) {
int N = A.size();
double gx = 0, gy = 0;
for (int i = 0; i < N; i++) {
gx += A[i].first;
gy += A[i].second;
}
gx /= N;
gy /= N;
double res = 0;
for (int i = 0; i < N; i++) {
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("%.10f\n", solve(B) / solve(A));
}
Today03