Help with approach

prob: https://atcoder.jp/contests/abc153/tasks/abc153_f

editorial: https://img.atcoder.jp/abc153/editorial.pdf

I realize that it is best to hit a bomb at a coordinate which is able to hit the rightmost distance possible but how do I calculate the amount of bombs used.

hello @raghav007

the bomb required to kill ith moster will be
ceil of X[i] / A.

how do I use sliding window here

are u aware of scaline algorithm?

no Im not aware of it

pls study it first.

to solve this question u should know scaline algo , binary search,sliding window

do we need all three techniques in 1 implementation, also should I learn segment tree someone on youtube was talking about solving this problem using it

yes.

yeah we can solve this using segment tree as well.

can you recommend some resource for learning scanline algorithm I tried but couldn’t find anything good

check on youtube. . . . . .

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.