結果

問題 No.1374 Absolute Game
ユーザー Kiri8128Kiri8128
提出日時 2021-02-05 23:20:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 139 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 19,000 KB
最終ジャッジ日時 2023-09-15 10:52:11
合計ジャッジ時間 2,644 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,932 KB
testcase_01 AC 15 ms
7,812 KB
testcase_02 AC 16 ms
7,812 KB
testcase_03 AC 15 ms
7,844 KB
testcase_04 AC 15 ms
7,844 KB
testcase_05 AC 15 ms
7,784 KB
testcase_06 AC 16 ms
7,804 KB
testcase_07 AC 16 ms
7,800 KB
testcase_08 AC 32 ms
11,124 KB
testcase_09 AC 62 ms
16,408 KB
testcase_10 AC 70 ms
17,456 KB
testcase_11 AC 48 ms
13,616 KB
testcase_12 AC 35 ms
11,728 KB
testcase_13 AC 56 ms
15,156 KB
testcase_14 AC 80 ms
18,864 KB
testcase_15 AC 79 ms
18,872 KB
testcase_16 AC 79 ms
18,952 KB
testcase_17 AC 79 ms
18,848 KB
testcase_18 AC 79 ms
18,836 KB
testcase_19 AC 80 ms
19,000 KB
testcase_20 AC 37 ms
12,016 KB
testcase_21 AC 46 ms
13,544 KB
testcase_22 AC 76 ms
18,696 KB
testcase_23 AC 21 ms
9,268 KB
testcase_24 AC 24 ms
9,720 KB
testcase_25 AC 25 ms
10,120 KB
testcase_26 AC 34 ms
11,724 KB
testcase_27 AC 42 ms
13,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = sorted([int(a) for a in input().split()])
print(max(-sum(A[::2])-abs(sum(A[1::2])), sum(A[::-2])-abs(sum(A[-2::-2]))))
0