0
What are constraints that used in many code competitions?
I'm so confused when I start coding on CodeChef, when I try to search on google what constraints is.. It's so complex to understand. Does anyone who can explain it? For example: x<5<=100
4 Respuestas
+ 9
Perhaps it should be 5 < x <= 100
It means the value of x must be greater than 5 and less than or equal to 100. So valid values of x are: 6 to 100
You'll have to check x in your code in such a way that it works for all valid values of x, and any invalid value of x (like 0, 2, 5, 101, -7 etc.) can't be applied.
+ 2
Thank you Shamima Yasmin
+ 1
psosibly it(5<x<=100) may be x is greater than 5 and less than or equal 100....
0
thanks