結果

問題 No.482 あなたの名は
ユーザー nebukuro09nebukuro09
提出日時 2017-02-10 22:35:51
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 649 ms
コンパイル使用メモリ 7,088 KB
実行使用メモリ 23,272 KB
最終ジャッジ日時 2023-08-27 22:31:33
合計ジャッジ時間 4,053 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,020 KB
testcase_01 AC 11 ms
6,024 KB
testcase_02 AC 12 ms
5,960 KB
testcase_03 AC 11 ms
6,012 KB
testcase_04 AC 11 ms
5,948 KB
testcase_05 AC 11 ms
5,972 KB
testcase_06 AC 11 ms
6,024 KB
testcase_07 WA -
testcase_08 AC 12 ms
6,040 KB
testcase_09 AC 11 ms
6,028 KB
testcase_10 AC 11 ms
6,040 KB
testcase_11 AC 11 ms
5,888 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 11 ms
6,036 KB
testcase_15 WA -
testcase_16 AC 131 ms
23,100 KB
testcase_17 AC 132 ms
23,268 KB
testcase_18 AC 131 ms
23,248 KB
testcase_19 WA -
testcase_20 AC 136 ms
23,244 KB
testcase_21 WA -
testcase_22 AC 131 ms
23,256 KB
testcase_23 WA -
testcase_24 AC 132 ms
23,096 KB
testcase_25 WA -
testcase_26 AC 133 ms
23,172 KB
testcase_27 WA -
testcase_28 AC 133 ms
23,148 KB
testcase_29 WA -
testcase_30 AC 11 ms
5,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, raw_input().split())
d = map(int, raw_input().split())

x = 0
for i in xrange(n):
    if d[i] != i+1:
        x += 1

if x == 0:
    x += 1
if (x-1) % 2 == k % 2 and x-1 <= k:
    print "YES"
else:
    print "NO"
0