結果
問題 | No.326 あみだますたー |
ユーザー | Tawara |
提出日時 | 2015-12-19 16:13:50 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 255 bytes |
コンパイル時間 | 1,088 ms |
コンパイル使用メモリ | 6,644 KB |
実行使用メモリ | 6,508 KB |
最終ジャッジ日時 | 2023-10-14 22:29:29 |
合計ジャッジ時間 | 5,528 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 12 ms
6,164 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 12 ms
6,172 KB |
testcase_06 | AC | 22 ms
6,112 KB |
testcase_07 | AC | 15 ms
6,200 KB |
testcase_08 | AC | 19 ms
6,508 KB |
testcase_09 | AC | 31 ms
6,232 KB |
testcase_10 | AC | 29 ms
6,336 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
ソースコード
f=lambda:map(int,raw_input().split()) N=input();a=[];I=range(N+1) for i in xrange(input()):x,y=f();I[x],I[y]=I[y],I[x] A=[0]+f();i=1 while i<=N: p=I.index(A[i]) while i<p:q=p-1;a+=[(q,p)];I[q],I[p]=I[p],I[q];p=q i+=1 print len(a) for x,y in a:print x,y