結果

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

ソースコード

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)
#print(Z)
swaptime=(Z+1)//2
#print(K-swaptime)
print(('YES','NO')[K-swaptime<0 or (K-swaptime)%2==1])
0