結果
| 問題 |
No.3042 拡大コピー
|
| コンテスト | |
| ユーザー |
👑 SPD_9X2
|
| 提出日時 | 2025-03-01 20:17:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 920 bytes |
| コンパイル時間 | 229 ms |
| コンパイル使用メモリ | 82,240 KB |
| 実行使用メモリ | 67,524 KB |
| 最終ジャッジ日時 | 2025-03-01 20:17:32 |
| 合計ジャッジ時間 | 3,175 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | RE * 24 |
ソースコード
"""
https://atcoder.jp/contests/abc022/tasks/abc022_d
点と点を対応付けるのは厳しいので数値的に出来ないか?
原点中心P倍は、純粋にメモリを小さくしただけなのでどこ中心でも一緒
→部分点は、各星の距離の合計をそのまま出せば終わり
原点は基準点として使えないので重心との距離を考える
"""
from sys import stdin
N = int(stdin.readline())
AG = [0,0]
A = []
for i in range(N):
x,y = map(int,stdin.readline().split())
AG[0] += x
AG[1] += y
A.append((x,y))
AG[0] /= N
AG[1] /= N
Aans = 0
for x,y in A:
Aans += ((AG[0]-x)**2 + (AG[1]-y)**2) ** 0.5
BG = [0,0]
B = []
for i in range(N):
x,y = map(int,stdin.readline().split())
BG[0] += x
BG[1] += y
B.append((x,y))
BG[0] /= N
BG[1] /= N
Bans = 0
for x,y in B:
Bans += ((BG[0]-x)**2 + (BG[1]-y)**2) ** 0.5
print (Bans / Aans)
SPD_9X2