eolymp
bolt
Try our new interface for solving problems
Məsələlər

Hexagon and Rhombic Dominoes

Hexagon and Rhombic Dominoes

A regular hexagon with side length n is divided into \textbf{6n^2} unit triangles. \includegraphics{https://static.e-olymp.com/content/e0/e08fc5483d0ec42ba2e1e478108d4b256d0c9a37.jpg} Your task is to cover it with \textit{rhombic dominoes} --- pieces composed of two unit triangles sharing a side. \includegraphics{https://static.e-olymp.com/content/ac/acd2a93a80d498ed2591a88fe6a22ef617248f01.jpg} Each domino must be placed in such a way, that it covers exactly two unit triangles. No triangle must be covered with more than one domino. Count the number of ways to do so. For example there are two ways to cover a hexagon with side length \textbf{1}, they are shown on the picture. \includegraphics{https://static.e-olymp.com/content/e2/e2036f30ca2271e29f2e6f62773ae9d4e7f8be9d.jpg} \InputFile Input file contains \textbf{n} (\textbf{1} ≤ \textbf{n} ≤ \textbf{7}). \OutputFile Output the number of ways to cover hexagon with rombic dominoes.
Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
2
Çıxış verilənləri #1
20
Mənbə 2004 Петрозаводск, Лето, Контест Андрея Станкевича 7, Август 22, Задача D