結果
問題 |
No.1374 Absolute Game
|
ユーザー |
![]() |
提出日時 | 2021-02-05 22:09:51 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 196 bytes |
コンパイル時間 | 246 ms |
コンパイル使用メモリ | 82,208 KB |
実行使用メモリ | 92,464 KB |
最終ジャッジ日時 | 2024-07-02 12:38:53 |
合計ジャッジ時間 | 3,104 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 2 WA * 24 |
ソースコード
n = int(input()) *a, = map(int,input().split()) a.sort() v = sum(a[::2]) w = sum(a[::-1]) ans = abs(v) - abs(w) a = a[::-1] v = sum(a[::2]) w = sum(a[::-1]) ans = max(ans,abs(v)-abs(w)) print(ans)