結果
問題 |
No.482 あなたの名は
|
ユーザー |
![]() |
提出日時 | 2018-08-08 16:05:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 230 bytes |
コンパイル時間 | 132 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 29,676 KB |
最終ジャッジ日時 | 2024-09-22 23:03:58 |
合計ジャッジ時間 | 4,668 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 WA * 14 |
ソースコード
N,K = map(int,input().split()) lst = [0]+list(map(int,input().split())) cnt = 0 for i in range(N): x = lst[i] if x!=i: lst[i] = lst[x] lst[x] = x cnt+=1 print("NO" if cnt>K or (K-cnt)%2 else "YES")