結果

問題 No.390 最長の数列
ユーザー hogeover30hogeover30
提出日時 2016-09-20 23:41:55
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 129 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 28,160 KB
最終ジャッジ日時 2024-04-28 16:40:27
合計ジャッジ時間 17,884 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 328 ms
19,968 KB
testcase_01 AC 208 ms
19,840 KB
testcase_02 WA -
testcase_03 AC 220 ms
20,096 KB
testcase_04 WA -
testcase_05 AC 274 ms
28,032 KB
testcase_06 WA -
testcase_07 AC 87 ms
19,840 KB
testcase_08 AC 87 ms
19,968 KB
testcase_09 AC 149 ms
20,096 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1,032 ms
25,984 KB
testcase_14 TLE -
testcase_15 AC 86 ms
19,968 KB
testcase_16 AC 86 ms
20,096 KB
testcase_17 AC 112 ms
20,096 KB
testcase_18 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

c=[-1]*m=1000001;gets;gets.split.map{|i|c[i=i.to_i]=1;i}.sort{|i|(i+i).step(m-1,i){|j|c[j]=[c[j],c[i]+1].max if c[j]>=0}};p c.max
0