結果
問題 |
No.1374 Absolute Game
|
ユーザー |
|
提出日時 | 2022-04-21 09:45:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 577 ms / 2,000 ms |
コード長 | 204 bytes |
コンパイル時間 | 324 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 45,212 KB |
最終ジャッジ日時 | 2024-06-22 07:34:21 |
合計ジャッジ時間 | 18,019 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
import numpy as np N = int(input()) C = np.fromstring(input(), dtype=np.int64, sep=' ') if C.sum() < 0: C = -C C = np.sort(C)[::-1] ans = np.abs(np.sum(C[0::2])) - np.abs(np.sum(C[1::2])) print(ans)