結果

問題 No.2315 Flying Camera
ユーザー ああいいああいい
提出日時 2023-05-26 21:30:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 369 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 250 ms
コンパイル使用メモリ 86,768 KB
実行使用メモリ 76,692 KB
最終ジャッジ日時 2023-08-26 10:24:49
合計ジャッジ時間 6,939 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
76,536 KB
testcase_01 AC 81 ms
76,600 KB
testcase_02 AC 84 ms
76,508 KB
testcase_03 AC 251 ms
76,512 KB
testcase_04 AC 328 ms
76,556 KB
testcase_05 AC 288 ms
76,296 KB
testcase_06 AC 196 ms
76,608 KB
testcase_07 AC 325 ms
76,388 KB
testcase_08 AC 166 ms
76,416 KB
testcase_09 AC 101 ms
76,692 KB
testcase_10 AC 172 ms
76,516 KB
testcase_11 AC 354 ms
76,412 KB
testcase_12 AC 129 ms
76,520 KB
testcase_13 AC 100 ms
76,272 KB
testcase_14 AC 338 ms
76,588 KB
testcase_15 AC 256 ms
76,492 KB
testcase_16 AC 217 ms
76,412 KB
testcase_17 AC 158 ms
76,480 KB
testcase_18 AC 333 ms
76,640 KB
testcase_19 AC 269 ms
76,508 KB
testcase_20 AC 143 ms
76,576 KB
testcase_21 AC 193 ms
76,520 KB
testcase_22 AC 137 ms
76,640 KB
testcase_23 AC 79 ms
76,076 KB
testcase_24 AC 369 ms
76,268 KB
testcase_25 AC 81 ms
76,476 KB
testcase_26 AC 321 ms
76,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
point = []
for _ in range(N):
	x,y = map(int,input().split())
	point.append((x,y))
	
ans = 10 ** 10

for i in range(301):
	for j in range(301):
		tmp = 0
		for x,y in point:
			tmp += abs(x - i) + abs(y - j)
		if tmp < ans:ans = tmp
print(ans)
0