結果

問題 No.482 あなたの名は
ユーザー nebukuro09
提出日時 2017-02-10 22:30:25
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 688 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 23,740 KB
最終ジャッジ日時 2024-12-28 06:52:34
合計ジャッジ時間 4,496 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, raw_input().split())
d = map(int, raw_input().split())

x = 0
for i in xrange(n):
    if d[i] != i+1:
        x += 1

x = (x+1)/2
if x % 2 == k % 2 and x <= k:
    print "YES"
else:
    print "NO"
0