結果
問題 | No.2056 非力なレッド |
ユーザー |
![]() |
提出日時 | 2022-08-26 23:15:16 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 770 bytes |
コンパイル時間 | 1,243 ms |
コンパイル使用メモリ | 117,664 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-13 23:56:48 |
合計ジャッジ時間 | 4,275 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 WA * 14 |
ソースコード
#include<iostream>#include<string>#include<vector>#include<algorithm>#include<map>#include<math.h>#include<set>#define all(x) x.begin(),x.end()#define gall(x) x.begin(),x.end(),greater<>()#define pb push_back#define ll long long#define P pair<int,int>#define LP pair<ll,ll>using namespace std;int main() {int n, x, m, magic;P ma;ll cnt=0;cin >> n >> x >> m;bool f = 1;vector<P> a(n);for (int i = 0; i < n; i++) {cin >> a[i].first;a[i].second = i;ma.first = max(ma.first, a[i].first);if (ma.first == a[i].first) ma.second = a[i].second;}magic = min(n, m);if (magic < ma.second+1) f = 0;if (f) cout << "Yes" << endl;else cout << "No" << endl;return 0;}