結果
| 問題 |
No.482 あなたの名は
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-30 03:48:52 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 172 ms / 2,000 ms |
| コード長 | 218 bytes |
| コンパイル時間 | 154 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 29,668 KB |
| 最終ジャッジ日時 | 2024-11-06 10:07:11 |
| 合計ジャッジ時間 | 4,329 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
N,K=map(int,input().split())
D=[ x-1 for x in map(int,input().split())]
x=0
for i in range(N):
while D[i]!=i:
j=D[i]
D[i],D[j]=D[j],D[i]
x+=1
print(('NO','YES')[K>=x and (K-x)%2==0])