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

NoSuchKey