Help in atcoder GC problem(b) colorful slimes

Правка en2, от atlasworld, 2019-03-18 19:42:26

IN the problem colorful slimes you have to pick all color in minimum moves ,

Its mentioned in the editorial for a particular color i we need

min{a[i] , a[i-1] , ... , a[i-k]} . i dont understand how author uses this condition . and should we iterate for each k and then each i or for each i and the each k . how to deal with cycles , that is when we reach last index , how to relate it with first.

Can anyone who solved this problem , share approach .

> < > < >

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский atlasworld 2019-03-18 19:42:26 5 Tiny change: 'oach .\n\n> > >\n\n' -> 'oach .\n\n > < > < >\n\n'
en1 Английский atlasworld 2019-03-18 19:41:13 636 Initial revision (published)