結果

問題 No.55 正方形を描くだけの簡単なお仕事です。
ユーザー ytftytft
提出日時 2022-11-06 03:05:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 369 bytes
コンパイル時間 1,042 ms
コンパイル使用メモリ 10,796 KB
実行使用メモリ 29,672 KB
最終ジャッジ日時 2023-09-27 01:38:38
合計ジャッジ時間 8,732 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
29,556 KB
testcase_01 AC 134 ms
29,580 KB
testcase_02 AC 136 ms
29,640 KB
testcase_03 AC 134 ms
29,644 KB
testcase_04 AC 134 ms
29,428 KB
testcase_05 AC 134 ms
29,628 KB
testcase_06 AC 134 ms
29,412 KB
testcase_07 AC 140 ms
29,632 KB
testcase_08 AC 135 ms
29,372 KB
testcase_09 AC 133 ms
29,424 KB
testcase_10 AC 133 ms
29,500 KB
testcase_11 AC 133 ms
29,524 KB
testcase_12 AC 137 ms
29,508 KB
testcase_13 AC 135 ms
29,488 KB
testcase_14 AC 137 ms
29,648 KB
testcase_15 AC 136 ms
29,520 KB
testcase_16 AC 133 ms
29,432 KB
testcase_17 AC 136 ms
29,664 KB
testcase_18 AC 135 ms
29,652 KB
testcase_19 AC 134 ms
29,556 KB
testcase_20 AC 135 ms
29,672 KB
testcase_21 AC 132 ms
29,520 KB
testcase_22 AC 133 ms
29,636 KB
testcase_23 AC 134 ms
29,648 KB
testcase_24 AC 135 ms
29,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,numpy as np,itertools
input=lambda:sys.stdin.readline().rstrip()
temp=list(map(int,input().split()))
points=[np.array(temp[i:i+2]) for i in range(0,6,2)]
n=lambda x:np.linalg.norm(x,ord=2)
for i in itertools.permutations(points,3):
	if np.dot(i[0]-i[1],i[0]-i[2])!=0 or n(i[0]-i[1])!=n(i[0]-i[2]):
		continue
	print(*(i[1]+i[2]-i[0]))
	break
else:
	print(-1)
0