結果
| 問題 | No.482 あなたの名は |
| コンテスト | |
| ユーザー |
neko_the_shadow
|
| 提出日時 | 2017-02-11 00:17:30 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 252 bytes |
| 記録 | |
| コンパイル時間 | 262 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 29,684 KB |
| 最終ジャッジ日時 | 2024-12-29 08:14:34 |
| 合計ジャッジ時間 | 3,720 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 8 |
ソースコード
import math
if __name__ == '__main__':
n, k = map(int, input().split())
ds = list(map(int, input().split()))
cnt = sum(1 for i, d in enumerate(ds) if d != i + 1)
t = math.ceil(cnt / 2)
print("YES" if (k - t) % 2 == 0 else "NO")
neko_the_shadow