結果

問題 No.208 王将
ユーザー roiti46roiti46
提出日時 2015-05-15 23:44:43
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 239 bytes
コンパイル時間 370 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-10-09 16:22:10
合計ジャッジ時間 1,671 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y = map(int, raw_input().split())
x2, y2 = map(int, raw_input().split())

ans = max(abs(x), abs(y))
if abs(x) == abs(y) and abs(x2) == abs(y2):
    if (0 < x2 < x or x < x2 < 0) and (0 < y2 < y or y < y2 < 0):
        ans += 1
print ans
0