結果

問題 No.54 Happy Hallowe'en
ユーザー gigurururugigurururu
提出日時 2014-11-06 23:42:14
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 131 bytes
コンパイル時間 61 ms
コンパイル使用メモリ 11,480 KB
実行使用メモリ 16,512 KB
最終ジャッジ日時 2023-08-30 01:43:05
合計ジャッジ時間 25,205 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,048 KB
testcase_01 AC 81 ms
15,136 KB
testcase_02 AC 82 ms
15,148 KB
testcase_03 AC 81 ms
15,080 KB
testcase_04 AC 696 ms
15,432 KB
testcase_05 AC 1,164 ms
15,476 KB
testcase_06 AC 1,703 ms
15,640 KB
testcase_07 AC 2,605 ms
15,936 KB
testcase_08 AC 3,453 ms
16,188 KB
testcase_09 AC 4,546 ms
16,484 KB
testcase_10 AC 82 ms
15,124 KB
testcase_11 AC 83 ms
15,240 KB
testcase_12 AC 4,472 ms
16,512 KB
testcase_13 AC 4,490 ms
16,332 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 87 ms
15,112 KB
testcase_17 AC 91 ms
15,324 KB
testcase_18 AC 83 ms
15,352 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

m=[1]
(1..gets.to_i).map{gets.split.map &:to_i}.sort_by{|i,j|[j,-i]}.each{|i,j|
  (0..j-1).each{|k|m[k]&&m[k+i]=1}
}
p m.size-1
0