結果

問題 No.397 NO MORE KADOMATSU
ユーザー hanorverhanorver
提出日時 2016-09-07 17:37:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 221 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 24,700 KB
平均クエリ数 640.78
最終ジャッジ日時 2023-09-23 11:30:39
合計ジャッジ時間 3,984 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
24,024 KB
testcase_01 AC 38 ms
23,652 KB
testcase_02 AC 38 ms
23,488 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 40 ms
23,588 KB
testcase_10 RE -
testcase_11 AC 41 ms
23,964 KB
testcase_12 AC 48 ms
24,604 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 41 ms
23,688 KB
testcase_17 AC 41 ms
23,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

input()
a=list(map(int,input().split()))
l=[]
for i in range(len(a)):
 for j in range(i,len(a)-1):
  if a[j]>a[j+1]:l+=[j,j+1];a[j],a[j+1]=a[j+1],a[j]
print(len(l)//2)
for i in range(0,len(l),2):print(l[i],l[i+1])
input()
0