結果

問題 No.54 Happy Hallowe'en
ユーザー gigurururugigurururu
提出日時 2014-11-06 23:49:30
言語 Ruby
(3.3.0)
結果
AC  
実行時間 4,531 ms / 5,000 ms
コード長 130 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 11,292 KB
実行使用メモリ 16,020 KB
最終ジャッジ日時 2023-08-30 01:45:31
合計ジャッジ時間 25,436 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,220 KB
testcase_01 AC 83 ms
15,348 KB
testcase_02 AC 82 ms
15,128 KB
testcase_03 AC 82 ms
15,184 KB
testcase_04 AC 710 ms
15,356 KB
testcase_05 AC 1,180 ms
15,372 KB
testcase_06 AC 1,693 ms
15,624 KB
testcase_07 AC 2,579 ms
15,660 KB
testcase_08 AC 3,488 ms
16,020 KB
testcase_09 AC 4,510 ms
15,840 KB
testcase_10 AC 81 ms
15,100 KB
testcase_11 AC 85 ms
15,080 KB
testcase_12 AC 4,518 ms
15,964 KB
testcase_13 AC 4,531 ms
15,696 KB
testcase_14 AC 84 ms
15,064 KB
testcase_15 AC 83 ms
15,172 KB
testcase_16 AC 91 ms
15,344 KB
testcase_17 AC 92 ms
15,572 KB
testcase_18 AC 85 ms
15,488 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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