結果
問題 | No.2056 非力なレッド |
ユーザー | sorag |
提出日時 | 2022-08-26 23:21:01 |
言語 | C++23 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 948 bytes |
コンパイル時間 | 1,315 ms |
コンパイル使用メモリ | 120,436 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-04-22 01:29:52 |
合計ジャッジ時間 | 4,650 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
5,248 KB |
testcase_01 | AC | 2 ms
5,376 KB |
testcase_02 | AC | 2 ms
5,376 KB |
testcase_03 | AC | 2 ms
5,376 KB |
testcase_04 | AC | 2 ms
5,376 KB |
testcase_05 | WA | - |
testcase_06 | AC | 2 ms
5,376 KB |
testcase_07 | AC | 2 ms
5,376 KB |
testcase_08 | AC | 2 ms
5,376 KB |
testcase_09 | WA | - |
testcase_10 | AC | 2 ms
5,376 KB |
testcase_11 | WA | - |
testcase_12 | AC | 2 ms
5,376 KB |
testcase_13 | AC | 57 ms
5,376 KB |
testcase_14 | AC | 55 ms
5,376 KB |
testcase_15 | AC | 55 ms
5,376 KB |
testcase_16 | AC | 7 ms
5,376 KB |
testcase_17 | AC | 40 ms
5,376 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 68 ms
5,376 KB |
testcase_21 | WA | - |
testcase_22 | AC | 55 ms
5,376 KB |
testcase_23 | AC | 46 ms
5,376 KB |
testcase_24 | AC | 25 ms
5,376 KB |
testcase_25 | AC | 69 ms
5,376 KB |
testcase_26 | AC | 74 ms
5,376 KB |
testcase_27 | AC | 70 ms
5,376 KB |
testcase_28 | AC | 87 ms
5,376 KB |
testcase_29 | AC | 87 ms
5,376 KB |
testcase_30 | WA | - |
testcase_31 | AC | 86 ms
5,376 KB |
testcase_32 | AC | 86 ms
5,376 KB |
testcase_33 | WA | - |
testcase_34 | AC | 88 ms
5,376 KB |
testcase_35 | AC | 86 ms
5,376 KB |
testcase_36 | AC | 87 ms
5,376 KB |
testcase_37 | AC | 88 ms
5,376 KB |
testcase_38 | WA | - |
testcase_39 | AC | 2 ms
5,376 KB |
testcase_40 | AC | 2 ms
5,376 KB |
ソースコード
#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; ma.first = 0; for (int i = 0; i < magic; i++) { a[i].first/=2; ma.first = max(ma.first, a[i].first); } m -= magic; if (x < ma.first) f = 0; if (f) cout << "Yes" << endl; else cout << "No" << endl; return 0; }