結果

問題 No.2315 Flying Camera
ユーザー miya145592miya145592
提出日時 2023-05-26 21:47:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 452 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 576 ms
コンパイル使用メモリ 86,940 KB
実行使用メモリ 76,500 KB
最終ジャッジ日時 2023-08-26 11:07:25
合計ジャッジ時間 8,284 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
76,300 KB
testcase_01 AC 90 ms
76,224 KB
testcase_02 AC 92 ms
76,172 KB
testcase_03 AC 297 ms
76,280 KB
testcase_04 AC 397 ms
76,184 KB
testcase_05 AC 342 ms
76,496 KB
testcase_06 AC 211 ms
76,428 KB
testcase_07 AC 389 ms
76,172 KB
testcase_08 AC 185 ms
76,296 KB
testcase_09 AC 109 ms
76,312 KB
testcase_10 AC 186 ms
76,176 KB
testcase_11 AC 400 ms
76,500 KB
testcase_12 AC 133 ms
76,428 KB
testcase_13 AC 107 ms
76,200 KB
testcase_14 AC 406 ms
76,280 KB
testcase_15 AC 302 ms
76,148 KB
testcase_16 AC 255 ms
76,304 KB
testcase_17 AC 172 ms
76,204 KB
testcase_18 AC 401 ms
76,260 KB
testcase_19 AC 315 ms
76,344 KB
testcase_20 AC 153 ms
76,176 KB
testcase_21 AC 221 ms
76,172 KB
testcase_22 AC 144 ms
76,260 KB
testcase_23 AC 84 ms
76,092 KB
testcase_24 AC 452 ms
76,264 KB
testcase_25 AC 83 ms
76,060 KB
testcase_26 AC 425 ms
76,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]
INF = 10**9
ans = INF
for i in range(1, 301):
    for j in range(1, 301):
        S = 0
        for sx, sy in XY:
            S += abs(i-sx) +abs(j-sy)
        ans = min(ans, S)
print(ans)
0