結果

問題 No.1374 Absolute Game
ユーザー maimai
提出日時 2021-02-12 21:56:49
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 148 bytes
コンパイル時間 46 ms
コンパイル使用メモリ 11,568 KB
実行使用メモリ 25,752 KB
最終ジャッジ日時 2023-09-27 03:53:05
合計ジャッジ時間 4,908 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
15,148 KB
testcase_01 WA -
testcase_02 AC 84 ms
15,144 KB
testcase_03 AC 89 ms
15,112 KB
testcase_04 WA -
testcase_05 AC 84 ms
15,136 KB
testcase_06 AC 83 ms
15,304 KB
testcase_07 AC 84 ms
15,116 KB
testcase_08 AC 107 ms
17,864 KB
testcase_09 AC 148 ms
21,844 KB
testcase_10 AC 155 ms
22,088 KB
testcase_11 AC 126 ms
20,272 KB
testcase_12 AC 110 ms
18,396 KB
testcase_13 AC 135 ms
21,200 KB
testcase_14 AC 164 ms
25,544 KB
testcase_15 WA -
testcase_16 AC 171 ms
25,500 KB
testcase_17 WA -
testcase_18 AC 171 ms
25,700 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 123 ms
20,036 KB
testcase_22 AC 164 ms
25,260 KB
testcase_23 WA -
testcase_24 AC 98 ms
16,332 KB
testcase_25 AC 97 ms
16,596 KB
testcase_26 AC 110 ms
18,124 KB
testcase_27 AC 122 ms
19,284 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def lscan; gets.split.map(&:to_i); end
gets;p lscan.sort.reverse.each_slice(2).reduce([0,0]){|s,e|s[0]+=e[0];s[1]+=e[1]||0;s}.map(&:abs).reduce(&:-)
0