結果
問題 | No.2056 非力なレッド |
ユーザー |
![]() |
提出日時 | 2022-09-02 13:03:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,340 bytes |
コンパイル時間 | 2,400 ms |
コンパイル使用メモリ | 219,336 KB |
最終ジャッジ日時 | 2025-02-07 00:35:38 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 RE * 19 |
ソースコード
#pragma GCC optimize("Ofast")#pragma GCC optimize(2)#include <bits/stdc++.h>using namespace std;typedef long long ll;typedef string str;typedef pair<ll,ll> pii;#define F first#define S second#define pb push_back#define pq priority_queue#define all(x) (x).begin(),(x).end()#define de_bug(x) cout << (x) << '\n'#define loli(x) cout << (x) << ' '#define yn(x) cout << (x==1?"Yes\n":"No\n")#define PI 3.14159265358979323#define lolicon ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)const ll max_n=1e5+10,mod1=1e9+7,mod2=998244353;ll dx[8] = {1,0,0,-1,1,1,-1,-1};ll dy[8] = {0,1,-1,0,1,-1,1,-1};ll n,x,m,k,t,a,cnt[max_n];vector<ll> v;void solve(){cin >> n >> x >> m;for(ll i=0;i<n;i++){cin >> a;v.pb(a);for(ll j=a;j>=x;j=j/2){cnt[i]++;}}/*for(ll i=0;i<n;i++){cout << cnt[i] << ' ';}cout << '\n';*/ll now = 0;for(ll i=n-1;i>=0;i--){if(cnt[i]-now>0){m -= (cnt[i]-now)*(i+1);now = cnt[i];}}//cout << m << '\n';yn(m>=0);}int main(){lolicon;/*freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);*///cin >> t;t = 1;for(ll i=1;i<=t;i++){//cout << "Case #"<<i<<": ";solve();}}/*12*/