Editorial for APIO '08 P3 - DNA
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.
Submitting an official solution before solving the problem yourself is a bannable offence.
First, we ignore the templates and only count the number of sequences of form-
Let
Thus, we have the following recurrence:
This idea can be extended to count the number of sequences that also match the templates. Table
Given
Comments