考虑用4^n-不存在连续4个相同的. f(i,j,k,l)表示以i为结尾的序列,最后三位分别是j,k,l时的方案. 可以转移,写一个64*64的转移矩阵. 貌似可以优化?……未完待续. #include<cstdio> #include<vector> #include<iostream> using namespace std; typedef long long ll; #define MOD 1000000009ll typedef vector<ll>…
DNA Sequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14758 Accepted: 5716 Description It's well known that DNA Sequence is a sequence only contains A, C, T and G, and it's very useful to analyze a segment of DNA Sequence,For exampl…