結果
| 問題 |
No.1736 Princess vs. Dragoness
|
| コンテスト | |
| ユーザー |
incuiio
|
| 提出日時 | 2023-05-10 16:48:12 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 936 bytes |
| コンパイル時間 | 925 ms |
| コンパイル使用メモリ | 128,452 KB |
| 最終ジャッジ日時 | 2025-02-12 21:11:39 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 7 |
ソースコード
#include <iostream>
#include <fstream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <unordered_map>
#include <map>
#include <queue>
#include <string>
#include <set>
#include <list>
#include <climits>
#include <bitset>
#include <numeric>
#include <cassert>
#include <regex>
using std::cout;
using std::cin;
using std::string;
using std::vector;
int main()
{
int n, a, b;
cin >> n >> a >> b;
long long x, y;
cin >> x >> y;
std::priority_queue<long long> arr;
long long total_health = 0;
for (int i = 0; i < n; i++)
{
long long health;
cin >> health;
arr.push(health);
total_health += health;
}
long long a_damage = 0;
while (a > 0)
{
a_damage += std::min(arr.top(), x);
a--;
}
if (a_damage >= total_health - b * y)
{
cout << "Yes";
}
else
{
cout << "No";
}
}
incuiio