結果

問題 No.2089 置換の符号
ユーザー ryota sasairyota sasai
提出日時 2022-09-30 22:45:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 160 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 14,964 KB
最終ジャッジ日時 2023-08-24 16:20:59
合計ジャッジ時間 5,357 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 16 ms
7,860 KB
testcase_09 AC 14 ms
7,808 KB
testcase_10 AC 15 ms
7,856 KB
testcase_11 AC 15 ms
7,776 KB
testcase_12 AC 15 ms
7,920 KB
testcase_13 AC 15 ms
7,860 KB
testcase_14 AC 15 ms
7,908 KB
testcase_15 AC 14 ms
7,800 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 15 ms
7,888 KB
testcase_22 AC 15 ms
7,780 KB
testcase_23 AC 22 ms
7,784 KB
testcase_24 WA -
testcase_25 AC 54 ms
7,744 KB
testcase_26 AC 70 ms
7,808 KB
testcase_27 WA -
testcase_28 TLE -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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