結果
| 問題 |
No.1736 Princess vs. Dragoness
|
| コンテスト | |
| ユーザー |
se1ka2
|
| 提出日時 | 2021-11-12 21:24:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 570 bytes |
| コンパイル時間 | 656 ms |
| コンパイル使用メモリ | 72,224 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-07-04 14:02:00 |
| 合計ジャッジ時間 | 1,581 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
#include <iostream>
#include <queue>
using namespace std;
typedef long long ll;
int main()
{
int n, a, b;
ll x, y;
cin >> n >> a >> b >> x >> y;
priority_queue<ll> que;
for(int i = 0; i < n; i++){
ll h;
cin >> h;
que.push(h);
}
for(int i = 0; i < a; i++){
ll u = que.top();
que.pop();
u = max(0ll, u - x);
que.push(u);
}
ll s = 0;
while(que.size()){
s += que.top();
que.pop();
}
if(s > b * y) cout << "No" << endl;
else cout << "Yes" << endl;
}
se1ka2