結果
問題 |
No.482 あなたの名は
|
ユーザー |
|
提出日時 | 2017-02-11 16:43:12 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 224 bytes |
コンパイル時間 | 253 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 29,672 KB |
最終ジャッジ日時 | 2024-12-29 16:28:55 |
合計ジャッジ時間 | 5,128 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 WA * 13 |
ソースコード
n,k=map(int,input().split()) d=list(map(lambda x: x-1, map(int,input().split()))) cnt=0 for i in range(n): j = d[i] if i == j: continue cnt+=1 d[j] = d[i] print("YES" if cnt == k or abs(cnt-k)&1==0 else "NO")