結果
問題 |
No.482 あなたの名は
|
ユーザー |
|
提出日時 | 2017-02-14 09:17:13 |
言語 | Python2 (2.7.18) |
結果 |
TLE
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 481 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 30,560 KB |
最終ジャッジ日時 | 2024-12-29 21:06:29 |
合計ジャッジ時間 | 47,638 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 TLE * 15 |
ソースコード
#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 k>=cnt and k%2==cnt%2: print 'YES' else: print 'NO'