結果

問題 No.397 NO MORE KADOMATSU
ユーザー koba-e964koba-e964
提出日時 2016-08-09 01:09:51
言語 Ruby
(3.3.0)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 155 bytes
コンパイル時間 362 ms
コンパイル使用メモリ 11,336 KB
実行使用メモリ 32,824 KB
平均クエリ数 1614.44
最終ジャッジ日時 2023-09-24 00:25:35
合計ジャッジ時間 3,041 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
30,832 KB
testcase_01 AC 92 ms
31,288 KB
testcase_02 AC 87 ms
31,032 KB
testcase_03 AC 89 ms
30,988 KB
testcase_04 AC 92 ms
30,972 KB
testcase_05 AC 91 ms
31,412 KB
testcase_06 AC 93 ms
31,096 KB
testcase_07 AC 93 ms
31,664 KB
testcase_08 AC 94 ms
30,668 KB
testcase_09 AC 112 ms
32,376 KB
testcase_10 AC 112 ms
32,548 KB
testcase_11 AC 112 ms
32,824 KB
testcase_12 AC 104 ms
32,216 KB
testcase_13 AC 100 ms
31,724 KB
testcase_14 AC 101 ms
31,680 KB
testcase_15 AC 106 ms
31,664 KB
testcase_16 AC 89 ms
31,200 KB
testcase_17 AC 91 ms
31,024 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n=gets
b=u=[]
gets.split.map{|q|v=q.to_i;i=b.index{|k|k>=v};j=i ?i: b.size;u+=(-b.size...-j).to_a;b.insert(j,v);}
p u.size
for i in u;puts [-i-1,-i]*' 'end
0