結果

問題 No.397 NO MORE KADOMATSU
ユーザー tktk_snsntktk_snsn
提出日時 2021-11-03 12:54:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 595 ms
コンパイル使用メモリ 10,596 KB
実行使用メモリ 24,428 KB
平均クエリ数 662.33
最終ジャッジ日時 2023-09-24 03:00:43
合計ジャッジ時間 2,535 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
23,616 KB
testcase_01 AC 40 ms
23,660 KB
testcase_02 AC 40 ms
23,460 KB
testcase_03 AC 42 ms
23,952 KB
testcase_04 AC 40 ms
23,536 KB
testcase_05 AC 41 ms
24,252 KB
testcase_06 AC 42 ms
23,772 KB
testcase_07 AC 41 ms
23,580 KB
testcase_08 AC 40 ms
23,592 KB
testcase_09 AC 41 ms
24,336 KB
testcase_10 AC 66 ms
24,428 KB
testcase_11 AC 42 ms
24,108 KB
testcase_12 AC 42 ms
23,628 KB
testcase_13 AC 50 ms
23,896 KB
testcase_14 AC 51 ms
24,008 KB
testcase_15 AC 52 ms
23,968 KB
testcase_16 AC 40 ms
23,980 KB
testcase_17 AC 40 ms
23,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
ans = []
for i in range(N):
    for j in range(N):
        if A[i] < A[j]:
            A[i], A[j] = A[j], A[i]
            ans.append((i, j))

print(len(ans))
for a, b in ans:
    print(a, b)

int(input())
0