Editorial for CTU Open Contest 2018 - Lighting


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
  • Dynamic Programming
  • Parameters:
    • position in bit string
    • number of ones so far
    • carry
  • Expand each state by adding 1 or 0

Complexity \mathcal O(NK)


Comments

There are no comments at the moment.