結果

問題 No.397 NO MORE KADOMATSU
ユーザー cielciel
提出日時 2016-07-16 15:32:22
言語 Ruby
(3.3.0)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 147 bytes
コンパイル時間 489 ms
コンパイル使用メモリ 11,424 KB
実行使用メモリ 31,576 KB
平均クエリ数 414.83
最終ジャッジ日時 2023-09-24 00:21:15
合計ジャッジ時間 3,356 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
30,844 KB
testcase_01 AC 102 ms
30,908 KB
testcase_02 AC 100 ms
31,148 KB
testcase_03 AC 106 ms
31,476 KB
testcase_04 AC 98 ms
30,984 KB
testcase_05 AC 102 ms
31,556 KB
testcase_06 AC 103 ms
31,048 KB
testcase_07 AC 100 ms
30,916 KB
testcase_08 AC 100 ms
30,784 KB
testcase_09 AC 102 ms
30,748 KB
testcase_10 AC 100 ms
31,068 KB
testcase_11 AC 97 ms
31,052 KB
testcase_12 AC 101 ms
31,224 KB
testcase_13 AC 110 ms
31,576 KB
testcase_14 AC 110 ms
31,276 KB
testcase_15 AC 110 ms
31,080 KB
testcase_16 AC 102 ms
30,824 KB
testcase_17 AC 100 ms
31,324 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,*a=(gets+gets).split.map(&:to_i);z=[];n.times{|i|(i+1...n).each{|j|if a[i]<a[j];z<<[i,j];a[i],a[j]=a[j],a[i] end}};p z.size;z.each{|e|puts e*' '}
0