結果
| 問題 | No.482 あなたの名は |
| コンテスト | |
| ユーザー |
fal_rnd
|
| 提出日時 | 2017-02-10 22:35:25 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 411 bytes |
| 記録 | |
| コンパイル時間 | 1,479 ms |
| コンパイル使用メモリ | 158,000 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-28 07:27:34 |
| 合計ジャッジ時間 | 3,006 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 14 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
const char en = '\n';
using ll = long long;
using ull = unsigned long long;
int main(){
ios::sync_with_stdio(false);cin.tie();
int n,ar[200000];
ll k;
cin>>n>>k;
for(int i=0;i<n;i++){
cin>>ar[i];
ar[i]--;
}
for(int i=0;i<n;i++){
if((i+1)!=ar[i]){
swap(ar[ar[i]],ar[i]);
k--;
}
}
cout<<((k%2==0)?"YES":"NO")<<en;
return 0;
}
fal_rnd