結果

問題 No.55 正方形を描くだけの簡単なお仕事です。
ユーザー hiragnhiragn
提出日時 2022-10-26 09:37:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 359 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 29,800 KB
最終ジャッジ日時 2023-09-17 03:30:36
合計ジャッジ時間 5,690 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
29,756 KB
testcase_01 AC 134 ms
29,748 KB
testcase_02 AC 136 ms
29,660 KB
testcase_03 AC 134 ms
29,728 KB
testcase_04 AC 135 ms
29,624 KB
testcase_05 AC 136 ms
29,728 KB
testcase_06 AC 133 ms
29,584 KB
testcase_07 AC 135 ms
29,772 KB
testcase_08 AC 135 ms
29,688 KB
testcase_09 AC 135 ms
29,800 KB
testcase_10 AC 136 ms
29,636 KB
testcase_11 AC 135 ms
29,728 KB
testcase_12 AC 134 ms
29,628 KB
testcase_13 AC 135 ms
29,712 KB
testcase_14 AC 133 ms
29,712 KB
testcase_15 AC 134 ms
29,684 KB
testcase_16 AC 135 ms
29,640 KB
testcase_17 AC 135 ms
29,712 KB
testcase_18 AC 134 ms
29,760 KB
testcase_19 AC 134 ms
29,656 KB
testcase_20 AC 135 ms
29,744 KB
testcase_21 AC 134 ms
29,596 KB
testcase_22 AC 134 ms
29,576 KB
testcase_23 AC 134 ms
29,628 KB
testcase_24 AC 135 ms
29,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
import numpy as np


def main():
    points = np.array_split(list(map(int, input().split())), 3)
    for a, b, c in itertools.permutations(points):
        if np.linalg.norm(a - b) == np.linalg.norm(c - b) and np.dot(a - b, c - b) == 0:
            print(*(a + c - b))
            exit()
    print(-1)


if __name__ == "__main__":
    main()
0