atcoder#AGC051A. [AGC051A] Dodecagon
[AGC051A] Dodecagon
Score : points
Problem Statement
Snuke has infinite number of square tiles and regular triangular tiles with side lengths . How many ways are there to form a regular dodecagon (-sided polygon) with side lengths using the tiles? Compute the answer modulo .
Formally speaking,
- He can use an arbitrary number of tiles.
- No two tiles may overlap.
- The union of the regions filled by the tiles must be a regular dodecagon without holes.
- We consider two ways to be the same if we can change one way to the other way by rotations and translations (but not reflections), such that each tile perfectly matches with a tile of the same type.
Constraints
- All values in the input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
1
1
The following picture shows the only way.