結果

問題 No.2315 Flying Camera
ユーザー ニックネームニックネーム
提出日時 2023-05-26 21:23:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 490 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 86,912 KB
実行使用メモリ 76,516 KB
最終ジャッジ日時 2023-08-26 09:54:36
合計ジャッジ時間 8,884 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
76,268 KB
testcase_01 AC 97 ms
76,216 KB
testcase_02 AC 99 ms
76,252 KB
testcase_03 AC 321 ms
76,320 KB
testcase_04 AC 429 ms
76,460 KB
testcase_05 AC 373 ms
76,280 KB
testcase_06 AC 238 ms
76,280 KB
testcase_07 AC 432 ms
76,256 KB
testcase_08 AC 203 ms
76,384 KB
testcase_09 AC 116 ms
76,340 KB
testcase_10 AC 211 ms
76,280 KB
testcase_11 AC 436 ms
76,304 KB
testcase_12 AC 143 ms
76,276 KB
testcase_13 AC 115 ms
76,152 KB
testcase_14 AC 451 ms
75,912 KB
testcase_15 AC 337 ms
76,280 KB
testcase_16 AC 283 ms
75,968 KB
testcase_17 AC 194 ms
76,244 KB
testcase_18 AC 441 ms
76,056 KB
testcase_19 AC 347 ms
76,376 KB
testcase_20 AC 170 ms
75,960 KB
testcase_21 AC 247 ms
75,944 KB
testcase_22 AC 155 ms
76,084 KB
testcase_23 AC 90 ms
76,232 KB
testcase_24 AC 490 ms
76,424 KB
testcase_25 AC 92 ms
76,248 KB
testcase_26 AC 465 ms
76,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
xy = [tuple(map(int,input().split())) for _ in range(n)]
ans = 600*n
for i in range(1,301):
    for j in range(1,301):
        d = 0
        for x,y in xy: d += abs(i-x)+abs(j-y)
        ans = min(ans,d)
print(ans)
0