結果
| 問題 |
No.397 NO MORE KADOMATSU
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-23 19:59:12 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 311 bytes |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 27,608 KB |
| 平均クエリ数 | 285.72 |
| 最終ジャッジ日時 | 2024-11-23 19:59:21 |
| 合計ジャッジ時間 | 5,346 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 RE * 12 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
cnt = 0
ans = []
for i in range(n):
for j in range(n - i - 1):
if a[j] > a[j+1]:
cnt += 1
ans.append([j, j+1])
a[j], a[j+1] = a[j+1], a[i]
print(cnt)
for i, j in ans:
print(i, j)
dummy = int(input())