Problem #72
GitHub
You are given six characters G I T H U B
to make a string of length N. However there are some limitations:
I
can not come directly afterG
.H
can not come directly afterG
orB
.T
can not come directly afterT
orU
.- The string should be a palindrome.
How many ways are there to form a string of length N = 7162534?
Submit the answer modulo 1000000007.