結果

問題 No.2315 Flying Camera
ユーザー navel_tosnavel_tos
提出日時 2023-05-26 21:25:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 352 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 476 ms
コンパイル使用メモリ 86,880 KB
実行使用メモリ 76,564 KB
最終ジャッジ日時 2023-08-26 10:03:23
合計ジャッジ時間 6,824 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
76,456 KB
testcase_01 AC 84 ms
76,404 KB
testcase_02 AC 87 ms
76,412 KB
testcase_03 AC 244 ms
76,520 KB
testcase_04 AC 322 ms
76,424 KB
testcase_05 AC 267 ms
76,304 KB
testcase_06 AC 188 ms
76,148 KB
testcase_07 AC 306 ms
76,412 KB
testcase_08 AC 164 ms
76,308 KB
testcase_09 AC 104 ms
76,304 KB
testcase_10 AC 166 ms
76,408 KB
testcase_11 AC 323 ms
76,492 KB
testcase_12 AC 120 ms
76,476 KB
testcase_13 AC 98 ms
76,424 KB
testcase_14 AC 332 ms
76,448 KB
testcase_15 AC 246 ms
76,304 KB
testcase_16 AC 215 ms
76,248 KB
testcase_17 AC 157 ms
76,416 KB
testcase_18 AC 332 ms
76,184 KB
testcase_19 AC 247 ms
76,476 KB
testcase_20 AC 141 ms
76,564 KB
testcase_21 AC 196 ms
76,532 KB
testcase_22 AC 136 ms
76,412 KB
testcase_23 AC 77 ms
76,212 KB
testcase_24 AC 352 ms
76,408 KB
testcase_25 AC 79 ms
76,336 KB
testcase_26 AC 343 ms
76,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yukicoder390B

N=int(input()); P=[]; ans=2*10**18
for _ in range(N): X,Y=list(map(int,input().split())); P.append((X,Y))
for h in range(301):
    for w in range(301):
        cnt=0
        for x,y in P:
            cnt+=abs(h-x)+abs(w-y)
        ans=min(ans,cnt)
print(ans)
0