結果
| 問題 | No.482 あなたの名は |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-10 22:35:51 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 229 bytes |
| 記録 | |
| コンパイル時間 | 379 ms |
| コンパイル使用メモリ | 77,724 KB |
| 最終ジャッジ日時 | 2025-12-03 23:04:42 |
|
ジャッジサーバーID (参考情報) |
judge4 / 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"