メモ帳

楽しいアウトプットの場所

2021-03-29から1日間の記事一覧

ABC197-D Opposite, 複素数の計算

atcoder.jp from math import cos, sin, atan2 n = int(input()) x0, y0 = map(int, input().split()) x2, y2 = map(int, input().split()) xh = (x0+x2)/2 yh = (y0+y2)/2 r = ((x0-x2)**2+(y0-y2)**2)**0.5 r/=2 A = atan2((y0-yh), (x0-xh)) x = r*cos(A+…