結果

問題 No.365 ジェンガソート
ユーザー mizocodermizocoder
提出日時 2018-08-03 11:40:36
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 201 bytes
コンパイル時間 421 ms
コンパイル使用メモリ 11,868 KB
実行使用メモリ 28,492 KB
最終ジャッジ日時 2023-10-19 21:17:47
合計ジャッジ時間 12,512 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
16,092 KB
testcase_01 AC 86 ms
16,092 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 88 ms
16,096 KB
testcase_05 AC 87 ms
16,096 KB
testcase_06 AC 87 ms
16,096 KB
testcase_07 AC 88 ms
16,096 KB
testcase_08 AC 88 ms
16,096 KB
testcase_09 AC 87 ms
16,096 KB
testcase_10 AC 86 ms
16,096 KB
testcase_11 AC 87 ms
16,096 KB
testcase_12 AC 88 ms
16,096 KB
testcase_13 AC 87 ms
16,096 KB
testcase_14 AC 87 ms
16,096 KB
testcase_15 AC 87 ms
16,096 KB
testcase_16 AC 447 ms
21,396 KB
testcase_17 AC 456 ms
27,508 KB
testcase_18 AC 113 ms
16,388 KB
testcase_19 AC 406 ms
27,432 KB
testcase_20 AC 168 ms
19,592 KB
testcase_21 AC 181 ms
17,704 KB
testcase_22 AC 444 ms
21,360 KB
testcase_23 AC 287 ms
21,380 KB
testcase_24 AC 425 ms
21,352 KB
testcase_25 AC 178 ms
17,484 KB
testcase_26 AC 353 ms
21,352 KB
testcase_27 AC 575 ms
28,232 KB
testcase_28 AC 357 ms
21,288 KB
testcase_29 AC 513 ms
22,584 KB
testcase_30 AC 369 ms
21,220 KB
testcase_31 AC 205 ms
19,256 KB
testcase_32 AC 199 ms
18,888 KB
testcase_33 AC 567 ms
28,144 KB
testcase_34 AC 153 ms
17,144 KB
testcase_35 AC 434 ms
21,364 KB
testcase_36 RE -
testcase_37 AC 376 ms
28,492 KB
testcase_38 AC 581 ms
28,492 KB
testcase_39 AC 371 ms
28,492 KB
testcase_40 AC 473 ms
28,248 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
num = gets.split.map(&:to_i)
numary = []

num.each_with_index {|num, idx| numary << [num, idx] }
numary.sort!.reverse!

i = 0
i += 1 while (numary[i][1] > numary[i+1][1])

puts n - (i+1)
0