結果
問題 |
No.482 あなたの名は
|
ユーザー |
![]() |
提出日時 | 2017-02-10 23:20:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 1,474 ms |
コンパイル使用メモリ | 158,732 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-29 04:45:32 |
合計ジャッジ時間 | 3,709 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 15 WA * 13 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define int long long signed main(){ int n, k; cin >> n >> k; int num = 0; int a; for(int i = 1; i <= n; i++){ cin >> a; if(a != i) num++; } num = (num + 1) / 2; k -= num; if(k >= 0) cout << "YES" << endl; else cout << "NO" << endl; }