結果
問題 |
No.397 NO MORE KADOMATSU
|
ユーザー |
![]() |
提出日時 | 2016-07-20 20:08:51 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 49 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 25,616 KB |
平均クエリ数 | 640.78 |
最終ジャッジ日時 | 2024-07-16 10:44:03 |
合計ジャッジ時間 | 3,224 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 RE * 10 |
ソースコード
from sys import stdout N = int(raw_input()) A = map(int,raw_input().split()) M = 0 op = [] for i in xrange(N): for j in xrange(i+1,N): if A[j]<A[j-1]: A[j-1],A[j]=A[j],A[j-1] M+=1 op.append([j-1,j]) print M for u,v in op: print u,v stdout.flush() input()