There is a 3*n grid which is to be filled with 3 different colors.How many ways can we do it if no column or row have all the cells of same color. N<=20000 and mod 1e9+7
Can any one help with this problem.
There is a 3*n grid which is to be filled with 3 different colors.How many ways can we do it if no column or row have all the cells of same color. N<=20000 and mod 1e9+7