結果
問題 | No.397 NO MORE KADOMATSU |
ユーザー | Tawara |
提出日時 | 2016-07-20 20:08:51 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 49 ms |
コンパイル使用メモリ | 6,652 KB |
実行使用メモリ | 24,372 KB |
平均クエリ数 | 640.78 |
最終ジャッジ日時 | 2023-09-23 11:12:14 |
合計ジャッジ時間 | 3,565 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 38 ms
23,820 KB |
testcase_01 | AC | 37 ms
23,400 KB |
testcase_02 | AC | 37 ms
24,336 KB |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | AC | 36 ms
24,336 KB |
testcase_10 | RE | - |
testcase_11 | AC | 36 ms
23,616 KB |
testcase_12 | AC | 42 ms
23,628 KB |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | AC | 34 ms
24,372 KB |
testcase_17 | AC | 35 ms
23,988 KB |
ソースコード
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()