結果
問題 |
No.3042 拡大コピー
|
ユーザー |
![]() |
提出日時 | 2025-03-04 02:55:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,522 ms / 2,000 ms |
コード長 | 483 bytes |
コンパイル時間 | 591 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 101,632 KB |
最終ジャッジ日時 | 2025-03-04 02:55:52 |
合計ジャッジ時間 | 6,242 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 24 |
ソースコード
import sys input = sys.stdin.readline N=int(input()) P=[list(map(float,input().split())) for i in range(N)] P2=[list(map(float,input().split())) for i in range(N)] sx=0 sy=0 sx2=0 sy2=0 for x,y in P: sx+=x sy+=y for x,y in P2: sx2+=x sy2+=y mx=sx/N my=sy/N mx2=sx2/N my2=sy2/N MAX1=0 MAX2=0 for x,y in P: MAX1=max(MAX1,(mx-x)*(mx-x)+(my-y)*(my-y)) for x,y in P2: MAX2=max(MAX2,(mx2-x)*(mx2-x)+(my2-y)*(my2-y)) print((MAX2**(1/2))/(MAX1**(1/2)))