Max query not running

https://ide.codingblocks.com/s/198639 is my code link
please tell what am i dong wrong?

Maybe your code for finding lower bound is not correct.
See this -:

ok sir thanks for the help