結果

問題 No.482 あなたの名は
ユーザー pluto77pluto77
提出日時 2017-02-14 09:20:12
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 278 bytes
コンパイル時間 472 ms
コンパイル使用メモリ 6,716 KB
実行使用メモリ 27,672 KB
最終ジャッジ日時 2023-08-28 16:28:45
合計ジャッジ時間 4,365 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
13,004 KB
testcase_01 AC 11 ms
6,008 KB
testcase_02 AC 10 ms
6,008 KB
testcase_03 AC 10 ms
5,964 KB
testcase_04 AC 11 ms
6,020 KB
testcase_05 AC 11 ms
5,940 KB
testcase_06 AC 11 ms
5,940 KB
testcase_07 AC 13 ms
5,980 KB
testcase_08 AC 12 ms
5,896 KB
testcase_09 AC 11 ms
5,884 KB
testcase_10 AC 11 ms
6,072 KB
testcase_11 AC 11 ms
5,900 KB
testcase_12 AC 13 ms
5,924 KB
testcase_13 AC 12 ms
6,088 KB
testcase_14 AC 11 ms
5,944 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_482

n,k=map(int,raw_input().split())
d=map(int,raw_input().split())
for i in xrange(n):
 d[i]=d[i]-1
cnt=0
for i in xrange(n):
 if d[i]!=i:
  temp=d.index(i)
  d[i],d[temp]=d[temp],d[i]
  cnt+=1
 if cnt>k:
  break
if k>=cnt and k%2==cnt%2:
 print 'YES'
else:
 print 'NO'
0