#C6121. Running Goals
Running Goals
Running Goals
Joey sets specific running goals for himself and each day he attempts to run a certain distance. His goal for each day is defined by a lower bound A and an upper bound B, and the actual distance he ran is C. Your task is to determine if Joey has met his goal each day. If his run distance C falls within the target range [A, B] (inclusive), then his goal is considered to be met; otherwise, it is not met.
The problem requires you to process multiple test cases. For each test case, you will be given three integers A, B, and C, and you should output "ON TARGET" if A \leq C \leq B
or "OFF TARGET" otherwise.
Note: Use LaTeX formatting for any formulas. For example, the condition can be written as: \(A \leq C \leq B\).
inputFormat
The input is given via standard input (stdin). The first line contains a single integer T, representing the number of test cases. Each of the following T lines contains three space-separated integers A, B, and C, where:\
- A is the lower bound of the target,\
- B is the upper bound of the target, and\
- C is the actual achieved value.
outputFormat
For each test case, output a single line with the string "ON TARGET" if C is between A and B (inclusive), or "OFF TARGET" if it is not.## sample
4
5 10 7
3 8 2
2 5 5
1 4 4
ON TARGET
OFF TARGET
ON TARGET
ON TARGET
</p>