結果
| 問題 | No.55 正方形を描くだけの簡単なお仕事です。 |
| コンテスト | |
| ユーザー |
バカらっく
|
| 提出日時 | 2019-09-12 08:11:16 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 601 bytes |
| 記録 | |
| コンパイル時間 | 358 ms |
| コンパイル使用メモリ | 20,964 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-03-24 01:02:11 |
| 合計ジャッジ時間 | 3,470 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 13 WA * 8 |
ソースコード
# coding: utf-8
allXY = [int(i) for i in input().rstrip().split(" ")]
xList = [x for (index, x) in enumerate(allXY) if index % 2 == 0]
yList = [y for (index, y) in enumerate(allXY) if index % 2 == 1]
canSquare = True
if len(set(xList)) != 2 or len(set(yList)) != 2:
canSquare = False
if abs(max(xList) - min(xList)) != abs(max(yList) - min(yList)):
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)
バカらっく