結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-03 11:40:36 |
| 言語 | Ruby (4.0.2) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 201 bytes |
| 記録 | |
| コンパイル時間 | 201 ms |
| コンパイル使用メモリ | 8,832 KB |
| 実行使用メモリ | 34,168 KB |
| 最終ジャッジ日時 | 2026-04-08 04:48:27 |
| 合計ジャッジ時間 | 8,384 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 RE * 3 |
コンパイルメッセージ
Syntax OK
ソースコード
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)