Max-query1 run time error

this is actually a complaint about the ide as it doesn’t tell which type of run time error has occured.

As in this question i can’t find why and where the run time error is?

in almost all online judges when ur submission is judged and ur code gets a Run Error u are not notified about where the problem occurred

for that reason u can access the test case for which u encountered a Run error

sorry but codeforces ide give the type of run time error and also tell in which line.

second thing is as you said to unlock the test cases ,actually i found these test cases are useless as no one can dry run them.
i have also unlocked the editorial and even i found the minor error i.e index out of bound error and i have resolved it.
Even now it is showing the run time error.
so i request you to help me to find the error.

i am not very familiar with codeforces ide…

This is a harder problem of segment trees. In this, we will maintain complete arrays at each node in a sorted manner.
Since the arrays at each node are sorted, we can apply binary searches.

To merge two arrays, you can use inbuilt merge function as well to save time and code.

Please have a look at the code in the editorial
i am attaching link of code