結果

問題 No.2315 Flying Camera
ユーザー sepa38sepa38
提出日時 2023-05-26 21:21:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 444 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 76,484 KB
最終ジャッジ日時 2023-08-26 09:49:32
合計ジャッジ時間 7,553 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
76,144 KB
testcase_01 AC 85 ms
76,244 KB
testcase_02 AC 88 ms
76,168 KB
testcase_03 AC 278 ms
76,424 KB
testcase_04 AC 372 ms
76,484 KB
testcase_05 AC 319 ms
76,192 KB
testcase_06 AC 201 ms
76,120 KB
testcase_07 AC 377 ms
76,296 KB
testcase_08 AC 174 ms
76,268 KB
testcase_09 AC 105 ms
75,972 KB
testcase_10 AC 174 ms
76,292 KB
testcase_11 AC 382 ms
76,448 KB
testcase_12 AC 127 ms
76,288 KB
testcase_13 AC 100 ms
76,172 KB
testcase_14 AC 394 ms
76,280 KB
testcase_15 AC 288 ms
76,320 KB
testcase_16 AC 241 ms
76,412 KB
testcase_17 AC 172 ms
76,276 KB
testcase_18 AC 393 ms
76,284 KB
testcase_19 AC 308 ms
76,464 KB
testcase_20 AC 149 ms
76,324 KB
testcase_21 AC 212 ms
76,256 KB
testcase_22 AC 137 ms
76,292 KB
testcase_23 AC 77 ms
76,024 KB
testcase_24 AC 444 ms
76,200 KB
testcase_25 AC 79 ms
76,320 KB
testcase_26 AC 404 ms
76,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ls = [list(map(int, input().split())) for _ in range(n)]
ans = 1 << 30
for x in range(1, 301):
  for y in range(1, 301):
    res = 0
    for xi, yi in ls:
      res += abs(x - xi) + abs(y - yi)
    ans = min(ans, res)
print(ans)
0