結果
| 問題 |
No.2315 Flying Camera
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-26 21:30:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 306 bytes |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 21,376 KB |
| 最終ジャッジ日時 | 2024-12-25 05:04:09 |
| 合計ジャッジ時間 | 70,350 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 TLE * 22 |
ソースコード
import itertools
def solve(N, XY):
ans = 10 ** 9
for xc, yc in itertools.product(range(-310, 310), repeat=2):
s = sum(abs(xi - xc) + abs(yi - yc) for xi, yi in XY)
ans = min(s, ans)
return ans
N = int(input())
XY = [[int(x) for x in input().split()] for _ in range(N)]
print(solve(N, XY))