結果

問題 No.482 あなたの名は
ユーザー jamad
提出日時 2017-08-30 01:01:04
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 178 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 29,672 KB
最終ジャッジ日時 2024-11-06 09:51:57
合計ジャッジ時間 4,142 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())

D=[ x-1 for x in map(int,input().split())]

Z=[int(D[i]==i) for i in range(N)].count(0)

swaptime=Z//2

print(('YES','NO')[(K-swaptime)%2==1])

    
0