#C5627. Discount Eligibility Checker
Discount Eligibility Checker
Discount Eligibility Checker
This problem involves checking if customers are eligible for a discount based on their spending criteria. Each test case provides four integers: a spending threshold P, a minimum purchase requirement Q, and the customer's actual spending S and purchase count R. A customer qualifies for the discount if and only if their spending satisfies \( S \geq P \) and their purchase count satisfies \( R \geq Q \).
Your task is to read the input from standard input, determine the discount eligibility for each test case, and output YES
if the customer is eligible or NO
otherwise.
inputFormat
The input is given via standard input and has the following format:
- The first line contains an integer T representing the number of test cases.
- Each of the following T lines contains four space-separated integers P, Q, S, and R.
outputFormat
For each test case, output a single line to standard output with YES
if the customer's spending and purchase count meet or exceed the thresholds, otherwise output NO
.
4
500 10 600 11
1000 5 800 10
300 2 400 2
750 8 750 7
YES
NO
YES
NO
</p>