Editorial for Art Academy VII: A Mysterious Object
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.
Author:
For the
For the remaining
The dp state should be
is between and the number of digits in . It represents which digit you are at in . is either , , or . It represents zero previous occurrences of , a previous occurrence of , and a previous occurrence of a and a , respectively. is either or . It represents if the number being considered is currently less than .
The transition is left as an exercise to the reader.
Comments