307542: CF1371C. A Cookie for You
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
A Cookie for You
题意翻译
在一个宴会上,Anna 准备了 $a$ 块香草饼干和 $b$ 块巧克力饼干。她邀请了 $n$ 位第一类客人和 $m$ 位第二类客人来参加宴会。两类客人的爱好有不同。如果有 $v$ 块香草饼干,$c$ 块巧克力饼干,那么: - 如果 $v>c$,第一类客人会选择香草饼干,否则会选择巧克力饼干。 - 如果 $v>c$,第二类客人会选择巧克力饼干,否则会选择香草饼干。 在这之后,对于每位客人: - 如果至少有一块他所选择的饼干,拿走一块。 - 如果没有,客人会很生气,他会回家,不会拿走任何东西。 Anna 想知道是否存在一种客人选择饼干的顺序,这样所有客人都不会生气。 多组数据,数据组数 $t \leq 1000$,$0 \leq a,b,n,m \leq 10^{18},n+m \neq 0$ 翻译 by Meatherm题目描述
Anna is a girl so brave that she is loved by everyone in the city and citizens love her cookies. She is planning to hold a party with cookies. Now she has $ a $ vanilla cookies and $ b $ chocolate cookies for the party. She invited $ n $ guests of the first type and $ m $ guests of the second type to the party. They will come to the party in some order. After coming to the party, each guest will choose the type of cookie (vanilla or chocolate) to eat. There is a difference in the way how they choose that type: If there are $ v $ vanilla cookies and $ c $ chocolate cookies at the moment, when the guest comes, then - if the guest of the first type: if $ v>c $ the guest selects a vanilla cookie. Otherwise, the guest selects a chocolate cookie. - if the guest of the second type: if $ v>c $ the guest selects a chocolate cookie. Otherwise, the guest selects a vanilla cookie. After that: - If there is at least one cookie of the selected type, the guest eats one. - Otherwise (there are no cookies of the selected type), the guest gets angry and returns to home. Anna wants to know if there exists some order of guests, such that no one guest gets angry. Your task is to answer her question.输入输出格式
输入格式
The input consists of multiple test cases. The first line contains a single integer $ t $ ( $ 1 \le t \le 1000 $ ) — the number of test cases. Next $ t $ lines contain descriptions of test cases. For each test case, the only line contains four integers $ a $ , $ b $ , $ n $ , $ m $ ( $ 0 \le a,b,n,m \le 10^{18}, n+m \neq 0 $ ).
输出格式
For each test case, print the answer in one line. If there exists at least one valid order, print "Yes". Otherwise, print "No". You can print each letter in any case (upper or lower).
输入输出样例
输入样例 #1
6
2 2 1 2
0 100 0 1
12 13 25 1
27 83 14 25
0 0 1 0
1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000
输出样例 #1
Yes
No
No
Yes
No
Yes