結果
| 問題 |
No.2315 Flying Camera
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-26 21:57:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 493 bytes |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 21,376 KB |
| 最終ジャッジ日時 | 2024-12-25 06:45:03 |
| 合計ジャッジ時間 | 46,456 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 TLE * 12 |
ソースコード
from itertools import product
import sys
def main():
sys.setrecursionlimit(1000000)
input = lambda: sys.stdin.readline()[:-1]
N = int(input())
XY = [tuple(map(int, input().split())) for _ in [0] * N]
ans = float("inf")
for x, y in product(range(1, 301), repeat=2):
d = 0
for xi, yi in XY:
d += abs(xi - x) + abs(yi - y)
ans = min(ans, d)
print(ans)
if not __debug__:
f = open(sys.argv[1], "r")
sys.stdin = f
main()