Задача Flags

Файл входного файла: flags.in
Файл выходного файла: flags.out
Ограничение по памяти: 64 MB
Ограничение по времени: 1 s

Описание

On the Day of the Flag of Russia a shop-owner decided to decorate the show-window of his shop with textile stripes of white, blue and red colors. He wants to satisfy the following conditions:

  1. Stripes of the same color cannot be placed next to each other.
  2. A blue stripe must always be placed between a white and a red or between a red and a white one.

Determine the number of the ways to fulfill his wish.

Example. For N = 3 result is following:

Формат входных данных

N, the number of the stripes, 1 ≤ N ≤ 90.

Формат выходных данных

M, the number of the ways to decorate the shop-window.

Примеры:

ввод вывод

3

4

Added: azonium
Difficulty: 1.02462433181
Accepted: 46
Submitted: 131
Источник задачи: acm.timus.ru
Analyze this Discuss

Обсуждение:

Начать обсуждение:

Powered by django, eJudge.