結果
| 問題 |
No.1736 Princess vs. Dragoness
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2021-12-25 11:30:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 645 bytes |
| コンパイル時間 | 776 ms |
| コンパイル使用メモリ | 77,000 KB |
| 実行使用メモリ | 14,016 KB |
| 最終ジャッジ日時 | 2024-09-21 13:30:29 |
| 合計ジャッジ時間 | 4,667 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 TLE * 1 -- * 30 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
int main(){
long long n,a,b,x,y;cin>>n>>a>>b>>x>>y;
priority_queue<long long,vector<long long>> A;
for(int i = 0; n > i; i++){
long long t;cin>>t;
A.push(t);
}
while(a){
auto z = A.top();A.pop();
if(z > x){
A.push(z-x);
}
a--;
}
long long size = 0;
while(A.size()){
auto z = A.top();A.pop();
size+=z;
}
//cout << size << endl;
if(size > b*y){
cout << "No" << endl;
}else{
cout << "Yes" << endl;
}
}