Problem in the solution

I have used lower_bound and upper_bound function but the solution is coming to be wrong. Please explain the problem with my solution.

@nikhil.gupta.225 please share your code by saving it on ide.codingblocks.com

@nikhil.gupta.225 you are not printing newline character after printing “-1 -1”
Please mark the doubt as resolved if you are satisfied