Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

How to solve this kind of problems

Правка en2, от prathams, 2015-07-23 16:21:40

In how many ways can you tile a 2 * n rectangle with triominoes? A triomino is a geometric shape made from three squares joined along complete edges. There are only two possible triominoes:

For example, you can tile a 2 * 3 rectangle only in 3 different ways. As the answer can be quite big, you just need to find the number of ways modulo 106.

Constraints : Number of test cases t (1≤t≤100). Each of the following t lines contains the value of n(0 < n < 109).

Output : Answer modulo 106.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский prathams 2015-07-23 16:21:40 12 (published)
en1 Английский prathams 2015-07-23 16:19:13 645 Initial revision (saved to drafts)