309411: CF1675A. Food for Animals
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Food for Animals
题意翻译
在宠物店出售的商品中有: - $a$ 包狗粮; - $b$ 包猫粮; - $c$ 包通用食物(这种食物既适合狗也适合猫)。 Polycarp 有 $x$ 只狗和 $y$ 只猫。他能从宠物店里为他所有的动物买食物吗?他的每只狗和每只猫都应该得到一包合适的食物。 **【输入格式】** 输入的第一行包含一个整数 $t$($ 1 \le t \le 10^4 $)—— 输入中的测试组数。 然后给出 $t$ 行,每行包含一组测试的描述。每组测试由五个整数 $a, b, c, x$ 和 $y$ 组成($ 0 \le a,b,c,x,y \le 10^8 $)。 **【输出格式】** 对于每组测试,输出: - `YES`,如果可以为 $x$ 只狗和 $y$ 只猫购买合适的食物; - `NO`,不可以。题目描述
In the pet store on sale there are: - $ a $ packs of dog food; - $ b $ packs of cat food; - $ c $ packs of universal food (such food is suitable for both dogs and cats). Polycarp has $ x $ dogs and $ y $ cats. Is it possible that he will be able to buy food for all his animals in the store? Each of his dogs and each of his cats should receive one pack of suitable food for it.输入输出格式
输入格式
The first line of input contains an integer $ t $ ( $ 1 \le t \le 10^4 $ ) — the number of test cases in the input. Then $ t $ lines are given, each containing a description of one test case. Each description consists of five integers $ a, b, c, x $ and $ y $ ( $ 0 \le a,b,c,x,y \le 10^8 $ ).
输出格式
For each test case in a separate line, output: - YES, if suitable food can be bought for each of $ x $ dogs and for each of $ y $ cats; - NO else. You can output YES and NO in any case (for example, strings yEs, yes, Yes and YES will be recognized as a positive response).
输入输出样例
输入样例 #1
7
1 1 4 2 3
0 0 0 0 0
5 5 0 4 6
1 1 1 1 1
50000000 50000000 100000000 100000000 100000000
0 0 0 100000000 100000000
1 3 2 2 5
输出样例 #1
YES
YES
NO
YES
YES
NO
NO