結果
| 問題 | No.482 あなたの名は |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-14 09:20:47 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 278 bytes |
| 記録 | |
| コンパイル時間 | 193 ms |
| コンパイル使用メモリ | 81,152 KB |
| 実行使用メモリ | 181,376 KB |
| 最終ジャッジ日時 | 2026-06-03 14:53:42 |
| 合計ジャッジ時間 | 5,259 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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'