結果

問題 No.2089 置換の符号
ユーザー ryota sasairyota sasai
提出日時 2022-09-30 22:47:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,141 ms / 2,000 ms
コード長 140 bytes
コンパイル時間 720 ms
コンパイル使用メモリ 86,868 KB
実行使用メモリ 85,660 KB
最終ジャッジ日時 2023-08-24 16:22:54
合計ジャッジ時間 8,274 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,252 KB
testcase_01 AC 71 ms
71,324 KB
testcase_02 AC 70 ms
71,340 KB
testcase_03 AC 70 ms
70,932 KB
testcase_04 AC 71 ms
71,136 KB
testcase_05 AC 70 ms
71,340 KB
testcase_06 AC 71 ms
71,252 KB
testcase_07 AC 71 ms
71,092 KB
testcase_08 AC 71 ms
71,204 KB
testcase_09 AC 71 ms
71,244 KB
testcase_10 AC 71 ms
70,932 KB
testcase_11 AC 71 ms
71,440 KB
testcase_12 AC 71 ms
71,228 KB
testcase_13 AC 71 ms
71,408 KB
testcase_14 AC 70 ms
71,284 KB
testcase_15 AC 70 ms
71,136 KB
testcase_16 AC 70 ms
71,284 KB
testcase_17 AC 71 ms
71,092 KB
testcase_18 AC 71 ms
71,328 KB
testcase_19 AC 70 ms
71,380 KB
testcase_20 AC 70 ms
71,316 KB
testcase_21 AC 71 ms
71,404 KB
testcase_22 AC 80 ms
75,704 KB
testcase_23 AC 85 ms
75,456 KB
testcase_24 AC 95 ms
76,636 KB
testcase_25 AC 93 ms
76,600 KB
testcase_26 AC 96 ms
76,908 KB
testcase_27 AC 141 ms
77,364 KB
testcase_28 AC 713 ms
81,412 KB
testcase_29 AC 792 ms
82,744 KB
testcase_30 AC 755 ms
81,672 KB
testcase_31 AC 1,141 ms
85,660 KB
testcase_32 AC 1,127 ms
85,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

_,S=input(),list(map(lambda k:int(k),(input()).split(" ")))
print(-1 if sum(1 for i, k in enumerate(S) for l in S[:i] if k < l) % 2 else 1)
0