Help needed with this Atcoder problem

Revision en2, by fiwisr, 2019-03-24 17:09:04

Problem:- https://atcoder.jp/contests/abc122/tasks/abc122_d

I can't figure out what is wrong with my DP solution.

https://p.ip.fi/dn_u

The DP state dp[i][j][k] represents number of strings of length i with last letters j and k. The letters A,G,C and T are 0,1,2 and 3 respectively. It doesn't work from n=4.

Thank you.

Tags #atcoder, #dp, #strings, #help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English fiwisr 2019-03-24 17:09:04 4
en1 English fiwisr 2019-03-24 17:06:37 366 Initial revision (published)