結果
| 問題 | No.482 あなたの名は |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-31 11:46:34 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 283 bytes |
| 記録 | |
| コンパイル時間 | 251 ms |
| コンパイル使用メモリ | 96,084 KB |
| 実行使用メモリ | 114,944 KB |
| 最終ジャッジ日時 | 2026-09-04 06:21:37 |
| 合計ジャッジ時間 | 5,658 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 8 |
ソースコード
N, K = map(int, input().split())
D = list(map(int, input().split()))
cnt = 0
for i in range(N):
if D[i] != i+1:
cnt += 1
if cnt % 2 == 0:
cnt //= 2
else:
cnt -= 1
if cnt > K:
print('NO')
elif (K-cnt) % 2 == 1:
print('NO')
else:
print('YES')