結果

問題 No.482 あなたの名は
ユーザー ichibanshiboriichibanshibori
提出日時 2017-02-10 22:50:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 30,184 KB
最終ジャッジ日時 2023-08-27 23:09:48
合計ジャッジ時間 3,846 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,932 KB
testcase_01 AC 16 ms
8,028 KB
testcase_02 AC 17 ms
8,064 KB
testcase_03 AC 15 ms
7,888 KB
testcase_04 AC 16 ms
7,972 KB
testcase_05 AC 16 ms
7,928 KB
testcase_06 AC 16 ms
7,968 KB
testcase_07 AC 20 ms
7,956 KB
testcase_08 AC 16 ms
8,032 KB
testcase_09 AC 16 ms
7,972 KB
testcase_10 AC 16 ms
7,884 KB
testcase_11 AC 16 ms
7,904 KB
testcase_12 AC 17 ms
7,928 KB
testcase_13 AC 16 ms
8,032 KB
testcase_14 WA -
testcase_15 AC 112 ms
30,092 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 113 ms
30,176 KB
testcase_19 AC 111 ms
30,096 KB
testcase_20 AC 113 ms
29,956 KB
testcase_21 AC 112 ms
30,084 KB
testcase_22 WA -
testcase_23 AC 111 ms
30,088 KB
testcase_24 AC 115 ms
30,176 KB
testcase_25 WA -
testcase_26 AC 113 ms
30,092 KB
testcase_27 WA -
testcase_28 AC 113 ms
30,044 KB
testcase_29 AC 120 ms
30,088 KB
testcase_30 AC 16 ms
7,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

_, k = tuple(int(x) for x in input().split())
darr = [int(x) for x in input().split()]


dcnt = 0

for i in range(len(darr)):
    if darr[i] != i + 1:
        dcnt += 1

dcnt = math.ceil(dcnt / 2)


if k >= dcnt and (k - dcnt) % 2 == 0:
    print("YES")
else:
    print("NO")
0