Codeforces Round 747 (Div. 2)
E1
Rubik's Cube Coloring (easy version)
Codeforces
1300
原题
← DE2 →
翻译中…

It is the easy version of the problem. The difference is that in this version, there are no nodes with already chosen colors.

翻译中…

Theofanis is starving, and he wants to eat his favorite food, sheftalia. However, he should first finish his homework. Can you help him with this problem?

翻译中…

You have a perfect binary tree of $2^k - 1$ nodes — a binary tree where all vertices $i$ from $1$ to $2^{k - 1} - 1$ have exactly two children: vertices $2i$ and $2i + 1$. Vertices from $2^{k - 1}$ to $2^k - 1$ don't have any children. You want to color its vertices with the $6$ Rubik's cube colors (White, Green, Red, Blue, Orange and Yellow).

翻译中…

Let's call a coloring good when all edges connect nodes with colors that are neighboring sides in the Rubik's cube.

翻译中…

imageimage A picture of Rubik's cube and its 2D map.

翻译中…

More formally:

翻译中…
  • a white node can not be neighboring with white and yellow nodes;
  • a yellow node can not be neighboring with white and yellow nodes;
  • a green node can not be neighboring with green and blue nodes;
  • a blue node can not be neighboring with green and blue nodes;
  • a red node can not be neighboring with red and orange nodes;
  • an orange node can not be neighboring with red and orange nodes;
翻译中…

You want to calculate the number of the good colorings of the binary tree. Two colorings are considered different if at least one node is colored with a different color.

翻译中…

The answer may be too large, so output the answer modulo $10^9+7$.

翻译中…

Input

翻译中…

The first and only line contains the integers $k$ ($1 \le k \le 60$) — the number of levels in the perfect binary tree you need to color.

翻译中…

Output

翻译中…

Print one integer — the number of the different colorings modulo $10^9+7$.

翻译中…

Note

翻译中…

In the picture below, you can see one of the correct colorings of the first example.

翻译中…

image

翻译中…

样例

Input #1
3
Output #1
24576
InputCopy OutputCopy
Input #2
14
Output #2
934234
InputCopy OutputCopy
题目信息
题号
1594E1
时间限制
2 s
内存限制
256 MB
标签
组合数学
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。