結果
| 問題 |
No.2056 非力なレッド
|
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2025-03-29 05:24:09 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 673 bytes |
| コンパイル時間 | 3,505 ms |
| コンパイル使用メモリ | 278,752 KB |
| 実行使用メモリ | 7,556 KB |
| 最終ジャッジ日時 | 2025-03-29 05:24:16 |
| 合計ジャッジ時間 | 5,818 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 36 WA * 2 |
ソースコード
#include <bits/stdc++.h>
//#include <atcoder/modint>
using namespace std;
//using namespace atcoder;
using ll = long long;
//using mint = modint998244353;
int main(){
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
ll N, X, M, A, ans=0;
cin >> N >> X >> M;
vector<ll> c(N);
for (int i=0; i<N; i++){
cin >> A;
while(A > X){
A /= 2;
c[i]++;
}
}
for (int i=N-2; i>=0; i--) c[i] = max(c[i], c[i+1]);
c.push_back(0);
for (int i=N-1; i>=0; i--){
ans += (c[i]-c[i+1]) * (i+1);
}
if (ans <= M) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
srjywrdnprkt