結果

問題 No.156 キャンディー・ボックス
ユーザー LeonardoneLeonardone
提出日時 2015-10-17 00:54:13
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 190 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 11,408 KB
実行使用メモリ 21,332 KB
最終ジャッジ日時 2023-09-29 12:33:56
合計ジャッジ時間 18,198 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
16,544 KB
testcase_01 AC 79 ms
15,252 KB
testcase_02 AC 81 ms
15,236 KB
testcase_03 AC 77 ms
15,328 KB
testcase_04 AC 77 ms
15,220 KB
testcase_05 AC 559 ms
16,724 KB
testcase_06 AC 1,209 ms
16,832 KB
testcase_07 AC 1,040 ms
16,608 KB
testcase_08 AC 824 ms
16,716 KB
testcase_09 AC 475 ms
16,404 KB
testcase_10 AC 965 ms
16,728 KB
testcase_11 AC 598 ms
16,708 KB
testcase_12 AC 1,266 ms
16,616 KB
testcase_13 AC 796 ms
16,728 KB
testcase_14 AC 581 ms
16,716 KB
testcase_15 AC 1,000 ms
16,804 KB
testcase_16 AC 507 ms
16,496 KB
testcase_17 AC 808 ms
16,744 KB
testcase_18 AC 335 ms
16,724 KB
testcase_19 AC 402 ms
16,828 KB
testcase_20 AC 95 ms
16,312 KB
testcase_21 AC 150 ms
16,808 KB
testcase_22 AC 316 ms
16,728 KB
testcase_23 AC 173 ms
16,724 KB
testcase_24 AC 77 ms
15,156 KB
testcase_25 AC 78 ms
15,164 KB
testcase_26 AC 77 ms
15,268 KB
testcase_27 AC 77 ms
15,268 KB
testcase_28 AC 77 ms
15,248 KB
testcase_29 AC 77 ms
15,264 KB
testcase_30 TLE -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#! ruby
# yukicoder My Practice
# author: Leonardone @ NEETSDKASU

(N, M), c = $<.map{|x| x.split.map(&:to_i)}

M.times do
	c.sort_by!{|x| x == 0 ? 10**5 : x}
	c[0] -= 1
end

puts c.count(0)
0