結果

問題 No.2056 非力なレッド
ユーザー sk10271879sk10271879
提出日時 2022-09-28 17:37:52
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 2,284 bytes
コンパイル時間 1,926 ms
コンパイル使用メモリ 201,644 KB
実行使用メモリ 4,888 KB
最終ジャッジ日時 2023-08-24 04:30:01
合計ジャッジ時間 5,393 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,384 KB
testcase_13 WA -
testcase_14 AC 51 ms
4,376 KB
testcase_15 WA -
testcase_16 AC 7 ms
4,376 KB
testcase_17 AC 35 ms
4,376 KB
testcase_18 AC 4 ms
4,376 KB
testcase_19 AC 9 ms
4,376 KB
testcase_20 WA -
testcase_21 AC 15 ms
4,380 KB
testcase_22 AC 50 ms
4,376 KB
testcase_23 AC 43 ms
4,380 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 105 ms
4,520 KB
testcase_29 AC 108 ms
4,804 KB
testcase_30 AC 103 ms
4,520 KB
testcase_31 AC 106 ms
4,704 KB
testcase_32 AC 106 ms
4,652 KB
testcase_33 WA -
testcase_34 AC 79 ms
4,608 KB
testcase_35 WA -
testcase_36 AC 78 ms
4,580 KB
testcase_37 AC 78 ms
4,696 KB
testcase_38 AC 1 ms
4,380 KB
testcase_39 AC 1 ms
4,380 KB
testcase_40 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std; using ll=long long; using Pa=pair<ll,ll>; using Vll=vector<ll>; using VVll=vector<Vll>; using Vb=vector<bool>; using VVb=vector<vector<bool>>; using Vs=vector<string>; using VVs =vector<vector<string>>; using Vc=vector<char>; using VVc =vector<vector<char>>; const ll MOD=1000000007; const ll INF=(ll)1<<60;// 10^18 < 1<<60 = 1152921504606846976 // VVll G(N+1,Vll(0));   // vector<Pa> event; event.emplace_back(a,b); // 以下の関数 oi:エラー出力  OI:正出力  OIV:1次元vector正出力  OIVV:2次元vector正出力 
template<class t,class u> bool chmax(t&a,u b){if(a<b){a=b; return true;} else{return false;}}template<class t,class u> bool chmin(t&a,u b){if(b<a){a=b; return true;} else{return false;}} void oi(){}template<class Head, class... Tail>void oi(Head&& head,Tail&&... tail){if(sizeof...(tail)!=0){cerr<<head<<" ";} else{cerr<<head<<"\n";}oi(move(tail)...);} void OI(){}template<class Head, class... Tail>void OI(Head&& head,Tail&&... tail){if(sizeof...(tail)!=0){cout<<head<<" ";} else{cout<<head<<"\n";}OI(move(tail)...);} void OIV(){}template<typename T> void OIV(T &a){if(a.empty()){cout<<"\n"; return;} for(ll i00=0;i00<(a).size();i00++){if(a[i00]==(ll)1<<60){cout<<"I";} else{cout<<a[i00];} if(i00==(a).size()-1){cout<<"\n";} else{cout<<" ";}}} void OIVV(){}template<typename T> void OIVV(T &a){if(a.empty()){cout<<"\n"; return;} for(ll i00=0;i00<(a).size();i00++){for(ll j00=0;j00<(a[i00]).size();j00++){if(a[i00][j00]==(ll)1<<60){cout<<"I";} else{cout<<a[i00][j00];} if(j00==(a[i00]).size()-1){cout<<"\n";} else{cout<<" ";}}}}
#define FOR(i,a,b) for(ll i=(ll)(a); i<(ll)(b); i++)// a ~ b-1 i++ 
#define ALL(a) (a).begin(),(a).end()//   printf("%8.10lf\n",(ans));

int main(){
    ll N,X,M; cin>>N>>X>>M;
    Vll A(N+1,0); FOR(i,1,N +1) cin>>A[i];

    ll b=*max_element(ALL(A));
    if(X>b){
        OI("Yes");
        return 0;
    }

    while(true){
        auto it=max_element(ALL(A));
        ll k=it-A.begin();
        
        if(1<=k and k<=min(N,M)){
            FOR(i,1,k +1){
                A[i]/=2;
            }   
            M-=k;     
        }     
        else break; 
        //oi(*it,k,M);  
    }

    ll c=*max_element(ALL(A));
    if(X>c) OI("Yes");
    else OI("No");


    return 0;
}
0