Help with understanding the editorial

Правка en2, от Aleph-null, 2023-01-28 17:45:43

For problem this, the editorial suggests a naive way in which we break the chain and linearly kill all the monsters(then they present an optimization based on this), how do we know that this is the optimal way? Why can't I first kill monsters from one segment and then once the cascading effect stops, I jump to another monster which(say) has the highest b[i]/a[i] ratio? I need help in understanding this. Thanks in advance. (You can ask for further clarification from me if required)


  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Aleph-null 2023-01-28 17:45:43 18
en1 Английский Aleph-null 2023-01-28 17:45:24 558 Initial revision (published)