CF1594E1.Rubik's Cube Coloring (easy version)

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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 2k12^k - 1 nodes — a binary tree where all vertices ii from 11 to 2k112^{k - 1} - 1 have exactly two children: vertices 2i2i and 2i+12i + 1 . Vertices from 2k12^{k - 1} to 2k12^k - 1 don't have any children. You want to color its vertices with the 66 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.

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 109+710^9+7 .

输入格式

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

输出格式

Print one integer — the number of the different colorings modulo 109+710^9+7 .

输入输出样例

  • 输入#1

    3

    输出#1

    24576
  • 输入#2

    14

    输出#2

    934234

说明/提示

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

首页