結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
31,080 KB
testcase_01 AC 86 ms
31,324 KB
testcase_02 AC 88 ms
30,804 KB
testcase_03 AC 94 ms
30,760 KB
testcase_04 AC 90 ms
31,096 KB
testcase_05 AC 92 ms
31,088 KB
testcase_06 AC 89 ms
31,580 KB
testcase_07 AC 89 ms
31,160 KB
testcase_08 AC 88 ms
30,700 KB
testcase_09 AC 89 ms
30,800 KB
testcase_10 AC 91 ms
31,348 KB
testcase_11 AC 89 ms
31,328 KB
testcase_12 AC 91 ms
31,216 KB
testcase_13 AC 97 ms
31,500 KB
testcase_14 AC 95 ms
30,788 KB
testcase_15 AC 95 ms
31,296 KB
testcase_16 AC 86 ms
31,392 KB
testcase_17 AC 86 ms
30,776 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,*a=(gets+gets).split.map(&:to_i);z=[];n.times{|i|n.times{|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