結果
| 問題 |
No.55 正方形を描くだけの簡単なお仕事です。
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-21 16:20:49 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 579 bytes |
| コンパイル時間 | 242 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-10-09 05:43:48 |
| 合計ジャッジ時間 | 1,804 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 WA * 2 |
ソースコード
a, b, c, d, e, f = map(int,input().split())
p1 = [a, b]
p2 = [c, d]
p3 = [e, f]
def f(x, y):
z = ((y[0]-x[0])**2 + (y[1]-x[1])**2) ** 0.5
return z
l = []
l.append([f(p1, p2), p1, p2])
l.append([f(p2, p3), p2, p3])
l.append([f(p1, p3), p1, p3])
l =sorted(l)
l1 = [f(p1, p2), f(p2, p3), f(p1, p3)]
l2 = sorted(set(l1))
if (l2[0]**2 + l2[0]**2) ** 0.5 == l2[1]:
g = [(l[-1][1][0]+l[-1][2][0])/2, (l[-1][1][1]+l[-1][2][1])/2]
L = [p1, p2, p3]
L.remove(l[-1][1])
L.remove(l[-1][2])
print(int(2*g[0] - L[0][0]), int(2*g[1] - L[0][1]))
else:
print(-1)