Coloring Game(思维题)
Posted 明霞
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Coloring Game(思维题)相关的知识,希望对你有一定的参考价值。
David has a white board with 2×N2 \times N2×N grids.He decides to paint some grids black with his brush.He always starts at the top left corner and ends at the bottom right corner, where grids should be black ultimately.
Each time he can move his brush up(↑
), down(↓
), left(←
), right(→
), left up(↖
), left down(↙
), right up(↗
), right down (↘
) to the next grid.
For a grid visited before,the color is still black. Otherwise it changes from white to black.
David wants you to compute the number of different color schemes for a given board. Two color schemes are considered different if and only if the color of at least one corresponding position is different.
Input
One line including an integer n(0<n≤109)n(0<n \le 10^9)n(0<n≤109)
Output
One line including an integer, which represent the answer ?mod?1000000007\bmod 1000000007mod1000000007
样例输入1
2
样例输出1
4
样例解释1
样例输入2
3
样例输出2
12
样例解释2
以上是关于Coloring Game(思维题)的主要内容,如果未能解决你的问题,请参考以下文章
Codeforces 1137D - Cooperative Game - [交互题+思维题]
poj-2232 New Stone-Forfex-Cloth Game 思维题
vjudge A Funny Game 思维题 (其实今天讲的全是数学。。。)
解题报告——Block Game(思维题)(Benelux Algorithm Programming Contest 2016 Preliminary)(计蒜客)
Educational Codeforces Round 84 (Rated for Div. 2) C. Game with Chips(思维题)