CF461D Appleman and Complicated Task
Description
Toastman came up with a very complicated task. He gives it to Appleman, but Appleman doesn't know how to solve it. Can you help him?
Given a $ n×n $ checkerboard. Each cell of the board has either character 'x', or character 'o', or nothing. How many ways to fill all the empty cells with 'x' or 'o' (each cell must contain only one character in the end) are there, such that for each cell the number of adjacent cells with 'o' will be even? Find the number of ways modulo $ 1000000007 $ $ (10^{9}+7) $ . Two cells of the board are adjacent if they share a side.
Input Format
N/A
Output Format
N/A
Explanation/Hint
In the first example there are two ways:
`
xxo xoo
xox ooo
oxx oox
`
xxo xoo
xox ooo
oxx oox
`