#C5887. Larry's Workshop Benefit Evaluation
Larry's Workshop Benefit Evaluation
Larry's Workshop Benefit Evaluation
Larry needs to decide whether attending a series of workshops is beneficial for him. Each workshop is characterized by six parameters: a, p, b, q, c, and r. These parameters are defined as follows:
- \(a\): Minimum participation time required (in minutes).
- \(p\): Actual participation time (in minutes).
- \(b\): Minimum actionable advice required.
- \(q\): Actual actionable advice received.
- \(c\): Maximum allowable extension time for the Q&A session (in minutes).
- \(r\): Actual extension time for the Q&A session (in minutes).
Larry benefits from a workshop if all of the following conditions are met:
- The actual participation time \(p\) is greater than or equal to the required time \(a\).
- The actionable advice received \(q\) is greater than or equal to the required amount \(b\).
- The actual Q&A extension time \(r\) is less than or equal to the allowed extension \(c\).
Your task is to process a series of workshops and determine for each whether Larry benefits. Output YES
if he does, and NO
if he does not.
inputFormat
The input is read from stdin and has the following format:
- The first line contains an integer \(n\), the number of workshops.
- Each of the following \(n\) lines contains six space-separated integers: \(a\), \(p\), \(b\), \(q\), \(c\), and \(r\).
outputFormat
For each workshop, output a separate line to stdout containing YES
if Larry benefits from the workshop, or NO
otherwise.
1
60 90 15 20 5 3
YES
</p>