結果
| 問題 | No.482 あなたの名は |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-14 09:20:12 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 278 bytes |
| 記録 | |
| コンパイル時間 | 435 ms |
| コンパイル使用メモリ | 77,392 KB |
| 最終ジャッジ日時 | 2025-12-03 23:05:29 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 TLE * 1 -- * 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 cnt>k: break if k>=cnt and k%2==cnt%2: print 'YES' else: print 'NO'