結果
| 問題 |
No.2315 Flying Camera
|
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2023-05-26 21:37:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 47 ms / 2,000 ms |
| コード長 | 235 bytes |
| コンパイル時間 | 306 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 53,504 KB |
| 最終ジャッジ日時 | 2024-12-25 05:32:18 |
| 合計ジャッジ時間 | 2,323 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]
X = []
Y = []
for x,y in XY:
X.append(x)
Y.append(y)
X.sort()
Y.sort()
xh = X[N//2]
yh = Y[N//2]
S = 0
for x,y in XY:
S+=abs(x-xh)+abs(y-yh)
print(S)
H20