結果
| 問題 | No.482 あなたの名は |
| コンテスト | |
| ユーザー |
neko_the_shadow
|
| 提出日時 | 2017-02-11 14:10:10 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 263 bytes |
| 記録 | |
| コンパイル時間 | 147 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 29,552 KB |
| 最終ジャッジ日時 | 2024-12-29 12:15:39 |
| 合計ジャッジ時間 | 3,816 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 6 |
ソースコード
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 and (k - t) % 2 == 0 else "NO")
neko_the_shadow