結果

問題 No.2056 非力なレッド
ユーザー butsurizuki
提出日時 2022-08-26 21:25:39
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 2,716 ms
コンパイル使用メモリ 245,884 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-13 21:48:49
合計ジャッジ時間 4,445 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  long long n,x,m;
  cin >> n >> x >> m;
  vector<long long> a(n);
  for(auto &nx : a){cin >> nx;}
  long long ope=0,prev=0;
  for(int i=n-1;i>=0;i--){
    a[i]>>=prev;
    while(a[i]>=x){
      a[i]/=2;
      ope+=(i+1);
      prev++;
    }
  }
  if(ope<=m){cout << "Yes\n";}
  else{cout << "No\n";}
  return 0;
}
0