TSOC '16 Contest 1 #1 - Vasile and Haircuts

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 256M

Problem types

Vasile runs a barber shop. His customers tell him how long their hair is before he cuts it, and how much they want cut off.

Determine whether the length after the cut is inside the acceptable inclusive range.

Input Specification

The first line will contain an integer N, the number of haircuts he gives.

The following N lines contain 4 numbers. Each line represents a customer's order, where there will be four space-separated integers in the format L A B F, the initial length of the customer's hair, the minimum they want taken off, the maximum they want taken off, and the final length of their hair.

Output Specification

N lines, the i^\text{th} being Yes if the final length is within the acceptable range, or No if it isn't in the acceptable range.

Sample Input

20 5 10 12
10 2 4 8
15 3 5 10
3 1 2 3
20 2 3 1

Sample Output



There are no comments at the moment.