結果

問題 No.2056 非力なレッド
ユーザー やうやう
提出日時 2022-08-26 21:29:16
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 676 bytes
コンパイル時間 1,898 ms
コンパイル使用メモリ 171,644 KB
実行使用メモリ 22,656 KB
最終ジャッジ日時 2024-04-21 23:26:45
合計ジャッジ時間 11,414 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
10,624 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 AC 2 ms
5,376 KB
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 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 WA -
testcase_14 AC 324 ms
12,160 KB
testcase_15 WA -
testcase_16 AC 36 ms
5,376 KB
testcase_17 AC 192 ms
9,472 KB
testcase_18 AC 20 ms
5,376 KB
testcase_19 AC 164 ms
5,376 KB
testcase_20 WA -
testcase_21 AC 254 ms
5,532 KB
testcase_22 AC 406 ms
12,032 KB
testcase_23 AC 389 ms
10,624 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 TLE -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using P=pair<ll,ll>;
using V=vector<ll>;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)

int main(){
    ll n,x,m;
    cin >> n >> x >> m;
    V a(n);
    set<P> s;
    rep(i,n){
        cin >> a[i];
        s.insert(P(a[i],i));
    }

    while(m){
        auto i=s.end(); --i;
        int k=min(m,(*i).second+1);
        rep(j,k){
            s.erase(P(a[j],j));
            a[j]/=2;
            s.insert(P(a[j],j));
        }
        m-=k;
    }

    ll M=0;
    rep(i,n) M=max(M,a[i]);
    if(x<M) cout << "No" << endl;
    else cout << "Yes" << endl;

}
0