Five-Dimensional Chocolate
Time limit2sMemory limit512 MB
Count the ways to tile a 2x2x2x2xn five-dimensional box with 1x1x1x1x2 domino pieces, modulo 1000000007.
- Level
Hard8 of 10
- Topics
- Dynamic programming, Math, Combinatorics
- Solved
- No attempts yet
Problem
A chocolate bar of size sits in a five-dimensional world. It consists of unit cubes.
You want to cut it into pieces of size . Write a program that counts the ways to cut it.
The orientation of a piece does not matter, so and are possible sizes too. Two ways are counted as different when some piece covers a different pair of unit cubes.
Input
The first line contains ().
Output
Print the number of ways modulo on the first line.