結果
問題 |
No.55 正方形を描くだけの簡単なお仕事です。
|
ユーザー |
![]() |
提出日時 | 2019-09-12 08:07:34 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 526 bytes |
コンパイル時間 | 94 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-02 16:57:52 |
合計ジャッジ時間 | 1,923 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | AC * 12 WA * 9 |
ソースコード
# coding: utf-8 allXY = [int(i) for i in input().rstrip().split(" ")] xList = list(set([x for (index, x) in enumerate(allXY) if index % 2 == 0])) yList = list(set([y for (index, y) in enumerate(allXY) if index % 2 == 1])) canSquare = True if len(xList) != 2 or len(yList) != 2: canSquare = False ans = -1 if canSquare: x = [p for p in xList if len([sub for sub in xList if sub == p]) == 1][0] y = [p for p in yList if len([sub for sub in yList if sub == p]) == 1][0] ans = str(x) + " " + str(y) print(ans)