結果

問題 No.397 NO MORE KADOMATSU
ユーザー 👑 KazunKazun
提出日時 2020-11-28 15:43:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 699 ms
コンパイル使用メモリ 86,620 KB
実行使用メモリ 92,648 KB
平均クエリ数 651.67
最終ジャッジ日時 2023-09-24 02:49:08
合計ジャッジ時間 3,616 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
87,048 KB
testcase_01 AC 82 ms
87,348 KB
testcase_02 AC 81 ms
87,144 KB
testcase_03 AC 101 ms
91,604 KB
testcase_04 AC 83 ms
87,492 KB
testcase_05 AC 90 ms
91,304 KB
testcase_06 AC 97 ms
91,336 KB
testcase_07 AC 88 ms
91,344 KB
testcase_08 AC 82 ms
87,064 KB
testcase_09 AC 84 ms
91,680 KB
testcase_10 AC 130 ms
92,640 KB
testcase_11 AC 85 ms
91,284 KB
testcase_12 AC 85 ms
91,732 KB
testcase_13 AC 113 ms
92,180 KB
testcase_14 AC 106 ms
92,648 KB
testcase_15 AC 107 ms
92,408 KB
testcase_16 AC 83 ms
87,404 KB
testcase_17 AC 82 ms
87,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))

X=[]
for i in range(N):
    for j in range(i,N):
        if A[i]>A[j]:
            A[i],A[j]=A[j],A[i]
            X.append((i,j))

print(len(X))
for i,j in X:
    print(i,j)
0