結果

問題 No.2089 置換の符号
ユーザー a aa a
提出日時 2022-09-30 22:21:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 163 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 9,240 KB
最終ジャッジ日時 2023-08-24 15:55:42
合計ジャッジ時間 2,159 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,880 KB
testcase_01 AC 15 ms
7,960 KB
testcase_02 WA -
testcase_03 AC 15 ms
7,796 KB
testcase_04 AC 15 ms
7,784 KB
testcase_05 AC 14 ms
7,828 KB
testcase_06 WA -
testcase_07 AC 15 ms
7,784 KB
testcase_08 AC 16 ms
7,912 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 14 ms
7,748 KB
testcase_13 AC 14 ms
7,776 KB
testcase_14 AC 16 ms
7,776 KB
testcase_15 WA -
testcase_16 AC 15 ms
7,808 KB
testcase_17 AC 15 ms
7,824 KB
testcase_18 WA -
testcase_19 AC 16 ms
7,896 KB
testcase_20 AC 16 ms
7,856 KB
testcase_21 WA -
testcase_22 AC 14 ms
7,836 KB
testcase_23 AC 15 ms
7,780 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 15 ms
7,888 KB
testcase_27 AC 16 ms
8,204 KB
testcase_28 AC 19 ms
9,084 KB
testcase_29 AC 21 ms
9,240 KB
testcase_30 AC 20 ms
9,156 KB
testcase_31 WA -
testcase_32 AC 19 ms
9,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
s=list(map(int,input().split()))
t=0
for i in range(n):
    if s[i]!=i+1:
        t+=1
if t%4==0 or (2*t+1)%4==0:
    print (1)
else:
    print (-1)
0