How many bombs are required to destroy [7,8] and [7,8] i.e two same kingdoms
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.
x=2 you meant
I was talking about the sample input, but now I see that the my last sentence was unclear. I edited it.