結果

問題 No.2056 非力なレッド
ユーザー hiro71687khiro71687k
提出日時 2023-08-28 21:58:10
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 781 bytes
コンパイル時間 4,762 ms
コンパイル使用メモリ 258,764 KB
実行使用メモリ 6,380 KB
最終ジャッジ日時 2023-08-28 21:58:20
合計ジャッジ時間 9,650 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,384 KB
testcase_06 AC 2 ms
4,384 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,384 KB
testcase_09 AC 1 ms
4,384 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,384 KB
testcase_12 AC 2 ms
4,384 KB
testcase_13 AC 51 ms
5,196 KB
testcase_14 AC 51 ms
4,948 KB
testcase_15 AC 50 ms
5,008 KB
testcase_16 AC 6 ms
4,384 KB
testcase_17 AC 36 ms
4,476 KB
testcase_18 AC 4 ms
4,384 KB
testcase_19 AC 7 ms
4,380 KB
testcase_20 AC 60 ms
5,412 KB
testcase_21 AC 13 ms
4,380 KB
testcase_22 AC 51 ms
4,948 KB
testcase_23 AC 43 ms
4,660 KB
testcase_24 AC 23 ms
4,388 KB
testcase_25 AC 62 ms
5,464 KB
testcase_26 AC 68 ms
5,848 KB
testcase_27 AC 64 ms
5,868 KB
testcase_28 AC 78 ms
6,380 KB
testcase_29 AC 79 ms
6,316 KB
testcase_30 AC 80 ms
6,200 KB
testcase_31 AC 78 ms
6,196 KB
testcase_32 AC 78 ms
6,192 KB
testcase_33 AC 79 ms
6,240 KB
testcase_34 AC 80 ms
6,200 KB
testcase_35 AC 78 ms
6,196 KB
testcase_36 AC 79 ms
6,368 KB
testcase_37 AC 80 ms
6,204 KB
testcase_38 AC 1 ms
4,380 KB
testcase_39 AC 2 ms
4,380 KB
testcase_40 AC 1 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using namespace std;
using ll=long long;
using ld=long double;
ld pie=3.141592653589793;
ll mod=1000000007;
ll inf=10099999999999990;
int main(){
    ll n,x,m;
    cin>> n >> x >> m;
    vector<ll>a(n);
    vector<ll>b(n);
    for (ll i = 0; i < n; i++)
    {
        cin >> a[i];
        for (ll j = 0; j >=0; j++)
        {
            if (x>a[i])
            {
                b[i]=j;
                break;
            }
            a[i]/=2;
        }
    }
    ll now=0;
    ll ans=0;
    for (ll i = n-1; i >=0; i--)
    {
        ans+=max(0LL,(b[i]-now)*(i+1));
        now=max(now,b[i]);
    }
    if (m>=ans)
    {
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
    
}
0