結果

問題 No.55 正方形を描くだけの簡単なお仕事です。
ユーザー roiti46roiti46
提出日時 2015-02-12 00:23:44
言語 Python2
(2.7.18)
結果
AC  
実行時間 837 ms / 5,000 ms
コード長 442 bytes
コンパイル時間 465 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2024-04-26 22:11:17
合計ジャッジ時間 17,243 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 421 ms
6,272 KB
testcase_01 AC 820 ms
6,272 KB
testcase_02 AC 414 ms
6,272 KB
testcase_03 AC 437 ms
6,272 KB
testcase_04 AC 811 ms
6,272 KB
testcase_05 AC 815 ms
6,272 KB
testcase_06 AC 820 ms
6,272 KB
testcase_07 AC 829 ms
6,272 KB
testcase_08 AC 815 ms
6,400 KB
testcase_09 AC 828 ms
6,144 KB
testcase_10 AC 824 ms
6,272 KB
testcase_11 AC 244 ms
6,272 KB
testcase_12 AC 828 ms
6,272 KB
testcase_13 AC 629 ms
6,272 KB
testcase_14 AC 421 ms
6,272 KB
testcase_15 AC 837 ms
6,272 KB
testcase_16 AC 430 ms
6,400 KB
testcase_17 AC 826 ms
6,272 KB
testcase_18 AC 214 ms
6,272 KB
testcase_19 AC 823 ms
6,272 KB
testcase_20 AC 416 ms
6,272 KB
testcase_21 AC 391 ms
6,272 KB
testcase_22 AC 827 ms
6,272 KB
testcase_23 AC 530 ms
6,144 KB
testcase_24 AC 215 ms
6,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x0,y0,x1,y1,x2,y2 = map(int,raw_input().split())
flag = False
for x in range(-200,201):
    for y in range(-200,201):
        xy = [[x0,y0],[x1,y1],[x2,y2],[x,y]]
        d = [(xy[i][0]-xy[j][0])**2+(xy[i][1]-xy[j][1])**2 for i in range(4) for j in range(i+1,4)]
        d = sorted(d)
        if d[0] == d[1] == d[2] == d[3] < d[4] == d[5]:
            print x,y
            flag = True
            break
    if flag: break
else:
    print -1
0