Help needed!

Revision en1, by ss1073857, 2020-11-03 10:45:35

You are given n switches, each switch connected to a led. cost of switch of switch i is ci. intially all leds are on. When any switch is used, all leds in range [i-k,i+k] will get toggled off (on to off, off to on). Find minimum cost to switch off all leds.N<=10000, K<=1000, Ci<10^9

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ss1073857 2020-11-03 10:45:35 295 Initial revision (published)