結果

問題 No.2056 非力なレッド
ユーザー butsurizuki
提出日時 2022-08-26 21:24:09
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 425 bytes
コンパイル時間 2,815 ms
コンパイル使用メモリ 247,692 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-13 21:46:15
合計ジャッジ時間 4,657 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 36 WA * 2
権限があれば一括ダウンロードができます

ソースコード

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