結果
問題 | No.1736 Princess vs. Dragoness |
ユーザー |
![]() |
提出日時 | 2021-11-12 21:43:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 610 bytes |
コンパイル時間 | 1,713 ms |
コンパイル使用メモリ | 170,892 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-11-25 17:42:40 |
合計ジャッジ時間 | 11,840 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 TLE * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int,int>; #define rep(i, n) for(int i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() int main(){ ll n,a,b,x,y; cin >> n >> a >> b >> x >> y; priority_queue<ll> h; rep(i,n){ ll z; cin >> z; h.push(z); } rep(i,a){ ll hmax = h.top() - x; h.pop(); if(hmax>0) h.push(hmax); } ll tot = 0; while(h.size()){ tot += h.top(); h.pop(); } if(tot <= b*y) cout << "Yes" << endl; else cout << "No" << endl; return 0; }