×

# One dimensional kingdom

 0 I've a doubt with a testcase [1 5][7 8][0 10] , i think that on destroying [0 10] ,then [1 5] and [7 8] gets automatically destroyed ,so ,only one bomb is required. am i right? asked 08 Jan '15, 22:58 2★ambika93 81●2●8 accept rate: 0%

 1 if u put a bomb on x=6 then only [0,10] kingdom can be destroyed. consider this statement 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. answered 08 Jan '15, 23:07 126●1●2●8 accept rate: 15% @raja44ever, will the answer for that is 2 or 1? (08 Jan '15, 23:17) ambika932★ 2 bombs. For example, one bomb at x=1 and another at x=7. (08 Jan '15, 23:50) mogers5★ Give me some important test case it is not passing last test case of the first task (09 Jan '15, 01:58) ambika932★ 1 You cannot ask for hints during the contest! (09 Jan '15, 03:28) what about the case when kingdoms are overlapping ?? like [0,1][1,2] from my understanding only 1 bomb is required. is it so ? (09 Jan '15, 08:28) grvana1★ yes 1 bomb is required.... you have to put a bomb in the range of any kingdom to destroy it whether there is overlapping or not....just put bomb efficiently so that minimum no of bombs is required (09 Jan '15, 15:34) showing 5 of 6 show all
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×294

question asked: 08 Jan '15, 22:58

question was seen: 2,649 times

last updated: 09 Jan '15, 15:34