ONE KING DIMENSION

doubt

#1

How many bombs are required to destroy [7,8] and [7,8] i.e two same kingdoms


#2

As you can see in the sample input, putting a bomb on x=2 destroys two kingdoms.
In the case you mentioned, only one bomb is required.


#3

by x=2 you meant x=7 or x=8 right?


#4

I was talking about the sample input, but now I see that the my last sentence was unclear. I edited it.


#5

@mogers, i’m getting wrong answer from last two days , any possible test case,i’m unable to trace it.