結果
問題 |
No.397 NO MORE KADOMATSU
|
ユーザー |
![]() |
提出日時 | 2024-12-30 14:10:09 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 291 bytes |
コンパイル時間 | 492 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 88,928 KB |
平均クエリ数 | 936.56 |
最終ジャッジ日時 | 2024-12-30 14:10:17 |
合計ジャッジ時間 | 5,244 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 13 |
ソースコード
N = int(input()) A = list(map(int,input().split())) ans = [] while A: x = A.index(max(A)) while x + 1 < len(A): if A[x] != A[x+1]: A[x],A[x+1] = A[x+1],A[x] ans.append((x+1,x+2)) x += 1 A.pop() print(len(ans)) for a in ans: print(*a)