結果
問題 |
No.482 あなたの名は
|
ユーザー |
![]() |
提出日時 | 2020-10-05 05:03:54 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 231 bytes |
コンパイル時間 | 192 ms |
コンパイル使用メモリ | 82,124 KB |
実行使用メモリ | 105,892 KB |
最終ジャッジ日時 | 2024-07-19 19:12:01 |
合計ジャッジ時間 | 3,308 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 WA * 13 |
ソースコード
n, k = map(int, input().split()) D = list(map(int, input().split())) D = [d-1 for d in D] c = 0 for i, d in enumerate(D): if i != d: c += 1 c //= 2 if k-c >= 0 and (k-c)%2 == 0: print('YES') else: print('NO')