what will be the ans for this
1
3
1 1
2 2
1 3
is it 1 or 2??
the question doesn’t make it clear not the test cases…
what will be the ans for this
1
3
1 1
2 2
1 3
is it 1 or 2??
the question doesn’t make it clear not the test cases…
I think, the problem statement is clear:
A kingdom of the form [L, R] can be
destroyed completely by placing a bomb
at a point x on the real line if L ≤ x
≤ R.
As this is from an ongoing contest I can not not give you the answer.
So ask yourself these questions => can you destroy [1, 1] and [2, 2] with one bomb? If so then where will you place it?
Also remember, Do not assume something not written in the problem statement.
It is better not to discuss any test cases (other than the sample(s) given in the problem) during a LIVE contest.