結果
| 問題 | No.1374 Absolute Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-10 16:53:52 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 2,000 ms |
| + 445µs | |
| コード長 | 292 bytes |
| 記録 | |
| コンパイル時間 | 241 ms |
| コンパイル使用メモリ | 96,492 KB |
| 実行使用メモリ | 102,400 KB |
| 最終ジャッジ日時 | 2026-07-30 08:47:03 |
| 合計ジャッジ時間 | 4,452 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 26 |
ソースコード
N=int(input()) C=list(map(int, input().split())) C.sort(reverse=True) conj1=sum(C[::2])-sum(C[1::2]) conj2=sum(C[:(N-1)//2+1])+sum(C[(N-1)//2+1:]) C.sort() conj3=-(sum(C[::2])-sum(C[1::2])) conj4=-(sum(C[:(N-1)//2+1])+sum(C[(N-1)//2+1:])) res=max(min(conj1,conj2),min(conj3,conj4)) print(res)