Checking for negative input

Do we have to check for negative values of T, n and m? And if they are negative then we have to take input again? What are some other problems that could arise which prevent test cases from passing?

@rdadhich,

1 <= T<= 1000
1 <= N,M <= 100000

As mentioned in the questions, the range of T,N,M are positive. They will never be zero or negative.

See, the constraints are for you to know the range of the inputs. So that you can write code accordingly and prevent TLEs by computing the max possible Time Complexity allowed

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.