結果

問題 No.3664 Manhattan Circumcenter
コンテスト
ユーザー wasd314
提出日時 2026-08-30 19:40:58
言語 PyPy3
(7.3.23)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 450 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 5,089 ms
コンパイル使用メモリ 95,696 KB
実行使用メモリ 268,904 KB
最終ジャッジ日時 2026-08-30 19:41:16
合計ジャッジ時間 10,073 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 55 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

ps = [tuple(map(lambda s_: int(s_) * 8, input().split())) for _ in range(3)]


def dist(i, x2, y2):
    x1, y1 = ps[i]
    return abs(x1 - x2) + abs(y1 - y2)


def ok(x, y):
    return dist(0, x, y) == dist(1, x, y) == dist(2, x, y)


sl, sr = -800, 2000
ans = [(x, y) for x in range(sl, sr) for y in range(sl, sr) if ok(x, y)]
if len(ans) > 10:
    print(-1)
else:
    print(len(ans))
    ans.sort()
    for x, y in ans:
        print(x / 8, y / 8)
0