結果

問題 No.3063 幅優先探索
ユーザー vwxyzvwxyz
提出日時 2022-09-07 00:57:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-05-01 19:09:21
合計ジャッジ時間 1,495 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
11,520 KB
testcase_01 AC 42 ms
11,392 KB
testcase_02 AC 40 ms
11,520 KB
testcase_03 AC 36 ms
11,392 KB
testcase_04 AC 37 ms
11,392 KB
testcase_05 AC 37 ms
11,520 KB
testcase_06 AC 37 ms
11,520 KB
testcase_07 AC 37 ms
11,392 KB
testcase_08 AC 38 ms
11,520 KB
testcase_09 AC 38 ms
11,648 KB
testcase_10 AC 39 ms
11,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
import sys
from typing import Counter
readline=sys.stdin.readline
write=sys.stdout.write
from math import gcd as GCD
import math

readline()
S=list(map(int,readline().split()))
G=list(map(int,readline().split()))
ans=abs(S[0]-G[0])+abs(S[1]-G[1])
print(ans)
0