POJ - 2778 DNA Sequence (AC自动机+矩阵快速幂)

NoSuchKey