結果
問題 |
No.482 あなたの名は
|
ユーザー |
|
提出日時 | 2017-02-10 22:35:51 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 229 bytes |
コンパイル時間 | 341 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 23,740 KB |
最終ジャッジ日時 | 2024-12-28 07:31:55 |
合計ジャッジ時間 | 3,794 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 10 |
ソースコード
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 if x == 0: x += 1 if (x-1) % 2 == k % 2 and x-1 <= k: print "YES" else: print "NO"