結果

問題 No.482 あなたの名は
ユーザー tookunn_1213tookunn_1213
提出日時 2017-02-10 22:36:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 191 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 30,092 KB
最終ジャッジ日時 2023-08-27 22:34:00
合計ジャッジ時間 3,410 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,880 KB
testcase_01 AC 15 ms
7,868 KB
testcase_02 AC 15 ms
7,812 KB
testcase_03 AC 16 ms
7,940 KB
testcase_04 AC 15 ms
7,868 KB
testcase_05 WA -
testcase_06 AC 16 ms
7,876 KB
testcase_07 AC 16 ms
7,980 KB
testcase_08 WA -
testcase_09 AC 15 ms
7,852 KB
testcase_10 AC 16 ms
7,928 KB
testcase_11 AC 16 ms
7,980 KB
testcase_12 AC 16 ms
7,928 KB
testcase_13 AC 15 ms
7,880 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 108 ms
29,972 KB
testcase_17 AC 108 ms
29,840 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 108 ms
29,976 KB
testcase_25 AC 107 ms
29,840 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 108 ms
29,920 KB
testcase_29 AC 112 ms
29,884 KB
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
D = list(map(int,input().split()))
cnt = 0
for i in range(N):
	if D[i] != i + 1:
		cnt+=1
K -= cnt//2
if K >= 0 and K % 2 == 0:
	print('YES')
else:
	print('NO')
0