結果

問題 No.2315 Flying Camera
ユーザー june19312june19312
提出日時 2023-05-27 09:47:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 458 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 76,472 KB
最終ジャッジ日時 2023-08-26 18:47:24
合計ジャッジ時間 8,405 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
76,392 KB
testcase_01 AC 90 ms
76,144 KB
testcase_02 AC 100 ms
76,324 KB
testcase_03 AC 283 ms
76,340 KB
testcase_04 AC 386 ms
76,404 KB
testcase_05 AC 338 ms
76,452 KB
testcase_06 AC 214 ms
76,472 KB
testcase_07 AC 396 ms
76,384 KB
testcase_08 AC 188 ms
76,396 KB
testcase_09 AC 111 ms
76,060 KB
testcase_10 AC 196 ms
76,336 KB
testcase_11 AC 390 ms
75,996 KB
testcase_12 AC 139 ms
76,344 KB
testcase_13 AC 110 ms
76,120 KB
testcase_14 AC 402 ms
76,040 KB
testcase_15 AC 312 ms
76,200 KB
testcase_16 AC 258 ms
76,308 KB
testcase_17 AC 181 ms
76,440 KB
testcase_18 AC 401 ms
76,112 KB
testcase_19 AC 326 ms
76,300 KB
testcase_20 AC 160 ms
76,340 KB
testcase_21 AC 308 ms
76,240 KB
testcase_22 AC 152 ms
76,396 KB
testcase_23 AC 88 ms
76,124 KB
testcase_24 AC 458 ms
76,312 KB
testcase_25 AC 89 ms
76,448 KB
testcase_26 AC 413 ms
76,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

G = []
for i in range(N):
    X,Y = map(int,input().split())
    G.append([X,Y])

ans = 10**10
for i in range(1,301):
    for j in range(1,301):
        tmp = 0
        for a,b in G:
            aa = abs(i-a)
            bb = abs(j-b)
            tmp+=(aa+bb)
        ans = min(ans,tmp)

print(ans)
0