結果
問題 |
No.397 NO MORE KADOMATSU
|
ユーザー |
![]() |
提出日時 | 2016-07-20 20:06:37 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 512 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 25,616 KB |
平均クエリ数 | 586.17 |
最終ジャッジ日時 | 2024-07-16 10:43:55 |
合計ジャッジ時間 | 3,722 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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()