#137. 条件判断
条件判断
Conditional Check
Background
In daily programming, we often need to determine program behavior based on a series of conditions. This problem will test your understanding and application of conditional logic.
Problem Description
Given three integers , , , and a boolean value . Return true if is greater than and is greater than . However, with the exception that if is true, then does not need to be greater than .
Input Format
Input is given from standard input in the following format.
a b c bOk
Where , , are integers, and is a boolean value (represented as true or false).
Output Format
Output to standard output in the following format.
result
Where result is true or false.
Sample
1 2 4 false
true
1 2 1 false
false
1 1 2 true
true
Sample Explanation
Sample 1: . Since is false, we need and . Here, is true and is true. Both conditions are met, so the result is true.
Sample 2: . Since is false, we need and . Here, is true, but is false. Not all conditions are met, so the result is false.
Sample 3: . Since is true, we only need . Here, is true. The condition is met, so the result is true.
Constraints
Time limit: 1s, Memory limit: 1024KiB for each test case.