結果

問題 No.2315 Flying Camera
ユーザー 👑 timitimi
提出日時 2023-05-26 21:24:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 340 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,016 KB
実行使用メモリ 76,332 KB
最終ジャッジ日時 2023-08-26 09:55:40
合計ジャッジ時間 7,448 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
76,296 KB
testcase_01 AC 85 ms
76,280 KB
testcase_02 AC 87 ms
76,236 KB
testcase_03 AC 245 ms
76,332 KB
testcase_04 AC 310 ms
75,960 KB
testcase_05 AC 263 ms
76,300 KB
testcase_06 AC 179 ms
76,164 KB
testcase_07 AC 306 ms
76,256 KB
testcase_08 AC 161 ms
76,272 KB
testcase_09 AC 107 ms
76,036 KB
testcase_10 AC 167 ms
76,256 KB
testcase_11 AC 318 ms
76,296 KB
testcase_12 AC 123 ms
76,292 KB
testcase_13 AC 100 ms
76,228 KB
testcase_14 AC 331 ms
76,292 KB
testcase_15 AC 238 ms
76,064 KB
testcase_16 AC 205 ms
76,232 KB
testcase_17 AC 156 ms
76,264 KB
testcase_18 AC 324 ms
75,952 KB
testcase_19 AC 244 ms
76,272 KB
testcase_20 AC 140 ms
76,284 KB
testcase_21 AC 191 ms
76,040 KB
testcase_22 AC 137 ms
76,304 KB
testcase_23 AC 77 ms
76,200 KB
testcase_24 AC 340 ms
76,328 KB
testcase_25 AC 77 ms
76,208 KB
testcase_26 AC 335 ms
76,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=[]
for i in range(N):
  x,y=map(int, input().split())
  A.append((x,y))
  
ans=10**20
for h in range(1,301):
  for w in range(1,301):
    d=0
    for x,y in A:
      d+=abs(h-x)+abs(w-y)
    ans=min(ans,d)
print(ans)
0