結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
31,036 KB
testcase_01 AC 88 ms
30,592 KB
testcase_02 AC 89 ms
31,408 KB
testcase_03 AC 91 ms
30,940 KB
testcase_04 AC 94 ms
31,140 KB
testcase_05 AC 92 ms
31,020 KB
testcase_06 AC 95 ms
31,328 KB
testcase_07 AC 104 ms
31,600 KB
testcase_08 AC 92 ms
30,768 KB
testcase_09 AC 114 ms
32,308 KB
testcase_10 AC 112 ms
32,652 KB
testcase_11 AC 115 ms
32,236 KB
testcase_12 AC 105 ms
32,176 KB
testcase_13 AC 109 ms
31,492 KB
testcase_14 AC 103 ms
31,424 KB
testcase_15 AC 105 ms
32,064 KB
testcase_16 AC 87 ms
31,080 KB
testcase_17 AC 88 ms
30,680 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n=gets
a=gets.split.map &:to_i
b=[]
u=[]
a.map{|v|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