CF1337B.Kana and Dragon Quest game
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic.
One day Kana gets interested in a new adventure game called Dragon Quest. In this game, her quest is to beat a dragon.

The dragon has a hit point of x initially. When its hit point goes to 0 or under 0, it will be defeated. In order to defeat the dragon, Kana can cast the two following types of spells.
-
Void Absorption
Assume that the dragon's current hit point is h, after casting this spell its hit point will become ⌊2h⌋+10. Here ⌊2h⌋ denotes h divided by two, rounded down.
-
Lightning Strike
This spell will decrease the dragon's hit point by 10. Assume that the dragon's current hit point is h, after casting this spell its hit point will be lowered to h−10.
Due to some reasons Kana can only cast no more than n Void Absorptions and m Lightning Strikes. She can cast the spells in any order and doesn't have to cast all the spells. Kana isn't good at math, so you are going to help her to find out whether it is possible to defeat the dragon.
卡娜原本只是一名普通的高中生,直到一位星探发现了她,随后她成为了一名偶像。但与刻板印象不同的是,她还是一名狂热的游戏迷。
某天,卡娜对一款名为《龙之 quest》的全新冒险游戏产生了兴趣。在这款游戏中,她的任务是击败一条巨龙。

巨龙初始生命值为 x。当其生命值降至 0 或更低时,即被击败。为了击败巨龙,卡娜可以施放以下两种法术:
-
虚空吸收(Void Absorption)
假设巨龙当前生命值为 h,施放该法术后,其生命值将变为 ⌊2h⌋+10。其中 ⌊2h⌋ 表示 h 除以 2 后向下取整。 -
闪电打击(Lightning Strike)
该法术使巨龙生命值减少 10。假设巨龙当前生命值为 h,施放该法术后,其生命值变为 h−10。
由于某些原因,卡娜最多只能施放 n 次“虚空吸收”和 m 次“闪电打击”。她可以按任意顺序施放法术,且不必用完所有法术次数。卡娜不擅长数学,因此你需要帮她判断:是否有可能击败这条巨龙?
输入格式
The first line contains a single integer t (1≤t≤1000) — the number of test cases.
The next t lines describe test cases. For each test case the only line contains three integers x, n, m (1≤x≤105, 0≤n,m≤30) — the dragon's intitial hit point, the maximum number of Void Absorptions and Lightning Strikes Kana can cast respectively.
第一行包含一个整数 t(1≤t≤1000)—— 测试用例的数量。
接下来的 t 行描述各个测试用例。每个测试用例仅有一行,包含三个整数 x、n、m(1≤x≤105,0≤n,m≤30)—— 分别表示巨龙的初始生命值、Kana 最多可施放的虚空吸收次数和雷击次数。
输出格式
If it is possible to defeat the dragon, print "YES" (without quotes). Otherwise, print "NO" (without quotes).
You can print each letter in any case (upper or lower).
如果可以击败恶龙,则输出 "YES"(不带引号);否则输出 "NO"(不带引号)。
每个字母可使用大写或小写形式输出。
输入输出样例
输入#1
7 100 3 4 189 3 4 64 2 3 63 2 3 30 27 7 10 9 1 69117 21 2
输出#1
YES NO NO YES YES YES YES
说明/提示
One possible casting sequence of the first test case is shown below:
- Void Absorption ⌊2100⌋+10=60.
- Lightning Strike 60−10=50.
- Void Absorption ⌊250⌋+10=35.
- Void Absorption ⌊235⌋+10=27.
- Lightning Strike 27−10=17.
- Lightning Strike 17−10=7.
- Lightning Strike 7−10=−3.
第一个测试用例的一种可能施法序列如下所示:
- 虚空吸收 ⌊2100⌋+10=60。
- 雷击 60−10=50。
- 虚空吸收 ⌊250⌋+10=35。
- 虚空吸收 ⌊235⌋+10=27。
- 雷击 27−10=17。
- 雷击 17−10=7。
- 雷击 7−10=−3。
输入解题思路,AI测评打分。不知道怎么写?